@luma.gl/core 9.0.0-alpha.9 → 9.0.0-beta.2

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 (306) hide show
  1. package/LICENSE +3 -1
  2. package/README.md +4 -4
  3. package/dist/adapter/attribute-utils/get-attribute-from-layouts.d.ts +52 -0
  4. package/dist/adapter/attribute-utils/get-attribute-from-layouts.d.ts.map +1 -0
  5. package/dist/adapter/attribute-utils/get-attribute-from-layouts.js +130 -0
  6. package/dist/adapter/attribute-utils/get-attribute-from-layouts.js.map +1 -0
  7. package/dist/adapter/canvas-context.d.ts +109 -0
  8. package/dist/adapter/canvas-context.d.ts.map +1 -0
  9. package/dist/adapter/canvas-context.js +254 -0
  10. package/dist/adapter/canvas-context.js.map +1 -0
  11. package/dist/adapter/device.d.ts +219 -0
  12. package/dist/adapter/device.d.ts.map +1 -0
  13. package/dist/adapter/device.js +99 -0
  14. package/dist/adapter/device.js.map +1 -0
  15. package/dist/adapter/resources/buffer.d.ts +56 -0
  16. package/dist/adapter/resources/buffer.d.ts.map +1 -0
  17. package/dist/adapter/resources/buffer.js +62 -0
  18. package/dist/adapter/resources/buffer.js.map +1 -0
  19. package/dist/adapter/resources/command-buffer.d.ts +12 -0
  20. package/dist/adapter/resources/command-buffer.d.ts.map +1 -0
  21. package/dist/adapter/resources/command-buffer.js +15 -0
  22. package/dist/adapter/resources/command-buffer.js.map +1 -0
  23. package/dist/adapter/resources/command-encoder.d.ts +113 -0
  24. package/dist/adapter/resources/command-encoder.d.ts.map +1 -0
  25. package/dist/adapter/resources/command-encoder.js +19 -0
  26. package/dist/adapter/resources/command-encoder.js.map +1 -0
  27. package/dist/adapter/resources/compute-pass.d.ts +31 -0
  28. package/dist/adapter/resources/compute-pass.d.ts.map +1 -0
  29. package/dist/adapter/resources/compute-pass.js +15 -0
  30. package/dist/adapter/resources/compute-pass.js.map +1 -0
  31. package/dist/adapter/resources/compute-pipeline.d.ts +24 -0
  32. package/dist/adapter/resources/compute-pipeline.d.ts.map +1 -0
  33. package/dist/adapter/resources/compute-pipeline.js +20 -0
  34. package/dist/adapter/resources/compute-pipeline.js.map +1 -0
  35. package/dist/adapter/resources/external-texture.d.ts +12 -0
  36. package/dist/adapter/resources/external-texture.d.ts.map +1 -0
  37. package/dist/adapter/resources/external-texture.js +17 -0
  38. package/dist/adapter/resources/external-texture.js.map +1 -0
  39. package/dist/adapter/resources/framebuffer.d.ts +50 -0
  40. package/dist/adapter/resources/framebuffer.d.ts.map +1 -0
  41. package/dist/adapter/resources/framebuffer.js +102 -0
  42. package/dist/adapter/resources/framebuffer.js.map +1 -0
  43. package/dist/adapter/resources/render-pass.d.ts +51 -0
  44. package/dist/adapter/resources/render-pass.d.ts.map +1 -0
  45. package/dist/adapter/resources/render-pass.js +23 -0
  46. package/dist/adapter/resources/render-pass.js.map +1 -0
  47. package/dist/adapter/resources/render-pipeline.d.ts +89 -0
  48. package/dist/adapter/resources/render-pipeline.d.ts.map +1 -0
  49. package/dist/adapter/resources/render-pipeline.js +36 -0
  50. package/dist/adapter/resources/render-pipeline.js.map +1 -0
  51. package/dist/adapter/resources/resource.d.ts +73 -0
  52. package/dist/adapter/resources/resource.d.ts.map +1 -0
  53. package/dist/adapter/resources/resource.js +101 -0
  54. package/dist/adapter/resources/resource.js.map +1 -0
  55. package/dist/adapter/resources/sampler.d.ts +42 -0
  56. package/dist/adapter/resources/sampler.d.ts.map +1 -0
  57. package/dist/adapter/resources/sampler.js +26 -0
  58. package/dist/adapter/resources/sampler.js.map +1 -0
  59. package/dist/adapter/resources/shader.d.ts +45 -0
  60. package/dist/adapter/resources/shader.d.ts.map +1 -0
  61. package/dist/adapter/resources/shader.js +90 -0
  62. package/dist/adapter/resources/shader.js.map +1 -0
  63. package/dist/adapter/resources/texture.d.ts +90 -0
  64. package/dist/adapter/resources/texture.d.ts.map +1 -0
  65. package/dist/adapter/resources/texture.js +45 -0
  66. package/dist/adapter/resources/texture.js.map +1 -0
  67. package/dist/adapter/resources/transform-feedback.d.ts +30 -0
  68. package/dist/adapter/resources/transform-feedback.d.ts.map +1 -0
  69. package/dist/adapter/resources/transform-feedback.js +17 -0
  70. package/dist/adapter/resources/transform-feedback.js.map +1 -0
  71. package/dist/adapter/resources/vertex-array.d.ts +40 -0
  72. package/dist/adapter/resources/vertex-array.d.ts.map +1 -0
  73. package/dist/adapter/resources/vertex-array.js +24 -0
  74. package/dist/adapter/resources/vertex-array.js.map +1 -0
  75. package/dist/adapter/type-utils/decode-attribute-type.d.ts +20 -0
  76. package/dist/adapter/type-utils/decode-attribute-type.d.ts.map +1 -0
  77. package/dist/adapter/type-utils/decode-attribute-type.js +60 -0
  78. package/dist/adapter/type-utils/decode-attribute-type.js.map +1 -0
  79. package/dist/adapter/type-utils/decode-data-type.d.ts +16 -0
  80. package/dist/adapter/type-utils/decode-data-type.d.ts.map +1 -0
  81. package/dist/adapter/type-utils/decode-data-type.js +43 -0
  82. package/dist/adapter/type-utils/decode-data-type.js.map +1 -0
  83. package/dist/adapter/type-utils/decode-shader-types.d.ts +9 -0
  84. package/dist/adapter/type-utils/decode-shader-types.d.ts.map +1 -0
  85. package/dist/adapter/type-utils/decode-shader-types.js +103 -0
  86. package/dist/adapter/type-utils/decode-shader-types.js.map +1 -0
  87. package/dist/adapter/type-utils/decode-texture-format.d.ts +19 -0
  88. package/dist/adapter/type-utils/decode-texture-format.d.ts.map +1 -0
  89. package/dist/adapter/type-utils/decode-texture-format.js +101 -0
  90. package/dist/adapter/type-utils/decode-texture-format.js.map +1 -0
  91. package/dist/adapter/type-utils/decode-vertex-format.d.ts +22 -0
  92. package/dist/adapter/type-utils/decode-vertex-format.d.ts.map +1 -0
  93. package/dist/adapter/type-utils/decode-vertex-format.js +25 -0
  94. package/dist/adapter/type-utils/decode-vertex-format.js.map +1 -0
  95. package/dist/adapter/type-utils/vertex-format-from-attribute.d.ts +10 -0
  96. package/dist/adapter/type-utils/vertex-format-from-attribute.d.ts.map +1 -0
  97. package/dist/adapter/type-utils/vertex-format-from-attribute.js +76 -0
  98. package/dist/adapter/type-utils/vertex-format-from-attribute.js.map +1 -0
  99. package/dist/adapter/type-utils/wgsl-utils.d.ts +4 -0
  100. package/dist/adapter/type-utils/wgsl-utils.d.ts.map +1 -0
  101. package/dist/adapter/type-utils/wgsl-utils.js +15 -0
  102. package/dist/adapter/type-utils/wgsl-utils.js.map +1 -0
  103. package/dist/adapter/types/accessor.d.ts +23 -0
  104. package/dist/adapter/types/accessor.d.ts.map +1 -0
  105. package/dist/adapter/types/accessor.js +2 -0
  106. package/dist/adapter/types/accessor.js.map +1 -0
  107. package/dist/adapter/types/buffer-layout.d.ts +59 -0
  108. package/dist/adapter/types/buffer-layout.d.ts.map +1 -0
  109. package/dist/adapter/types/buffer-layout.js +2 -0
  110. package/dist/adapter/types/buffer-layout.js.map +1 -0
  111. package/dist/adapter/types/parameters.d.ts +97 -0
  112. package/dist/adapter/types/parameters.d.ts.map +1 -0
  113. package/dist/adapter/types/parameters.js +28 -0
  114. package/dist/adapter/types/parameters.js.map +1 -0
  115. package/dist/adapter/types/shader-layout.d.ts +145 -0
  116. package/dist/adapter/types/shader-layout.d.ts.map +1 -0
  117. package/dist/adapter/types/shader-layout.js +2 -0
  118. package/dist/adapter/types/shader-layout.js.map +1 -0
  119. package/dist/adapter/types/shader-types.d.ts +21 -0
  120. package/dist/adapter/types/shader-types.d.ts.map +1 -0
  121. package/dist/adapter/types/shader-types.js +2 -0
  122. package/dist/adapter/types/shader-types.js.map +1 -0
  123. package/dist/adapter/types/texture-formats.d.ts +12 -0
  124. package/dist/adapter/types/texture-formats.d.ts.map +1 -0
  125. package/dist/adapter/types/texture-formats.js +2 -0
  126. package/dist/adapter/types/texture-formats.js.map +1 -0
  127. package/dist/adapter/types/types.d.ts +90 -0
  128. package/dist/adapter/types/types.d.ts.map +1 -0
  129. package/dist/adapter/types/types.js +2 -0
  130. package/dist/adapter/types/types.js.map +1 -0
  131. package/dist/adapter/types/vertex-formats.d.ts +14 -0
  132. package/dist/adapter/types/vertex-formats.d.ts.map +1 -0
  133. package/dist/adapter/types/vertex-formats.js +2 -0
  134. package/dist/adapter/types/vertex-formats.js.map +1 -0
  135. package/dist/dist.dev.js +2976 -0
  136. package/dist/index.cjs +2445 -0
  137. package/dist/index.d.ts +81 -128
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +45 -18
  140. package/dist/index.js.map +1 -1
  141. package/dist/init.d.ts +5 -0
  142. package/dist/init.d.ts.map +1 -0
  143. package/dist/init.js +24 -0
  144. package/dist/init.js.map +1 -0
  145. package/dist/lib/compiler-log/compiler-message.d.ts +8 -0
  146. package/dist/lib/compiler-log/compiler-message.d.ts.map +1 -0
  147. package/dist/lib/compiler-log/compiler-message.js +2 -0
  148. package/dist/lib/compiler-log/compiler-message.js.map +1 -0
  149. package/dist/lib/compiler-log/format-compiler-log.d.ts +8 -0
  150. package/dist/lib/compiler-log/format-compiler-log.d.ts.map +1 -0
  151. package/dist/lib/compiler-log/format-compiler-log.js +64 -0
  152. package/dist/lib/compiler-log/format-compiler-log.js.map +1 -0
  153. package/dist/lib/compiler-log/get-shader-info.d.ts +9 -0
  154. package/dist/lib/compiler-log/get-shader-info.d.ts.map +1 -0
  155. package/dist/lib/compiler-log/get-shader-info.js +25 -0
  156. package/dist/lib/compiler-log/get-shader-info.js.map +1 -0
  157. package/dist/lib/luma.d.ts +22 -0
  158. package/dist/lib/luma.d.ts.map +1 -0
  159. package/dist/lib/luma.js +63 -0
  160. package/dist/lib/luma.js.map +1 -0
  161. package/dist/lib/uniforms/uniform-block.d.ts +29 -0
  162. package/dist/lib/uniforms/uniform-block.d.ts.map +1 -0
  163. package/dist/lib/uniforms/uniform-block.js +48 -0
  164. package/dist/lib/uniforms/uniform-block.js.map +1 -0
  165. package/dist/lib/uniforms/uniform-buffer-layout.d.ts +27 -0
  166. package/dist/lib/uniforms/uniform-buffer-layout.d.ts.map +1 -0
  167. package/dist/lib/uniforms/uniform-buffer-layout.js +76 -0
  168. package/dist/lib/uniforms/uniform-buffer-layout.js.map +1 -0
  169. package/dist/lib/uniforms/uniform-store.d.ts +62 -0
  170. package/dist/lib/uniforms/uniform-store.d.ts.map +1 -0
  171. package/dist/lib/uniforms/uniform-store.js +89 -0
  172. package/dist/lib/uniforms/uniform-store.js.map +1 -0
  173. package/dist/lib/uniforms/uniform.d.ts +10 -0
  174. package/dist/lib/uniforms/uniform.d.ts.map +1 -0
  175. package/dist/lib/uniforms/uniform.js +20 -0
  176. package/dist/lib/uniforms/uniform.js.map +1 -0
  177. package/dist/types.d.ts +19 -0
  178. package/dist/types.d.ts.map +1 -0
  179. package/dist/types.js +3 -0
  180. package/dist/types.js.map +1 -0
  181. package/dist/utils/array-equal.d.ts +5 -0
  182. package/dist/utils/array-equal.d.ts.map +1 -0
  183. package/dist/utils/array-equal.js +28 -0
  184. package/dist/utils/array-equal.js.map +1 -0
  185. package/dist/utils/array-utils-flat.d.ts +10 -0
  186. package/dist/utils/array-utils-flat.d.ts.map +1 -0
  187. package/dist/utils/array-utils-flat.js +36 -0
  188. package/dist/utils/array-utils-flat.js.map +1 -0
  189. package/dist/utils/assert.d.ts +2 -0
  190. package/dist/utils/assert.d.ts.map +1 -0
  191. package/dist/utils/assert.js +6 -0
  192. package/dist/utils/assert.js.map +1 -0
  193. package/dist/utils/cast.d.ts +3 -0
  194. package/dist/utils/cast.d.ts.map +1 -0
  195. package/dist/utils/cast.js +4 -0
  196. package/dist/utils/cast.js.map +1 -0
  197. package/dist/utils/check-props.d.ts +7 -0
  198. package/dist/utils/check-props.d.ts.map +1 -0
  199. package/dist/utils/check-props.js +32 -0
  200. package/dist/utils/check-props.js.map +1 -0
  201. package/dist/utils/deep-equal.d.ts +9 -0
  202. package/dist/utils/deep-equal.d.ts.map +1 -0
  203. package/dist/utils/deep-equal.js +40 -0
  204. package/dist/utils/deep-equal.js.map +1 -0
  205. package/dist/utils/format-value.d.ts +7 -0
  206. package/dist/utils/format-value.d.ts.map +1 -0
  207. package/dist/utils/format-value.js +42 -0
  208. package/dist/utils/format-value.js.map +1 -0
  209. package/dist/utils/is-array.d.ts +16 -0
  210. package/dist/utils/is-array.d.ts.map +1 -0
  211. package/dist/utils/is-array.js +10 -0
  212. package/dist/utils/is-array.js.map +1 -0
  213. package/dist/utils/load-file.d.ts +35 -0
  214. package/dist/utils/load-file.d.ts.map +1 -0
  215. package/dist/utils/load-file.js +48 -0
  216. package/dist/utils/load-file.js.map +1 -0
  217. package/dist/utils/log.d.ts +4 -0
  218. package/dist/utils/log.d.ts.map +1 -0
  219. package/dist/utils/log.js +5 -0
  220. package/dist/utils/log.js.map +1 -0
  221. package/dist/utils/random.d.ts +5 -0
  222. package/dist/utils/random.d.ts.map +1 -0
  223. package/dist/utils/random.js +14 -0
  224. package/dist/utils/random.js.map +1 -0
  225. package/dist/utils/request-animation-frame.d.ts +3 -0
  226. package/dist/utils/request-animation-frame.d.ts.map +1 -0
  227. package/dist/utils/request-animation-frame.js +7 -0
  228. package/dist/utils/request-animation-frame.js.map +1 -0
  229. package/dist/utils/stats-manager.d.ts +12 -0
  230. package/dist/utils/stats-manager.d.ts.map +1 -0
  231. package/dist/utils/stats-manager.js +19 -0
  232. package/dist/utils/stats-manager.js.map +1 -0
  233. package/dist/utils/stub-methods.d.ts +2 -0
  234. package/dist/utils/stub-methods.d.ts.map +1 -0
  235. package/dist/utils/stub-methods.js +16 -0
  236. package/dist/utils/stub-methods.js.map +1 -0
  237. package/dist/utils/utils.d.ts +15 -0
  238. package/dist/utils/utils.d.ts.map +1 -0
  239. package/dist/utils/utils.js +19 -0
  240. package/dist/utils/utils.js.map +1 -0
  241. package/dist.min.js +33 -0
  242. package/package.json +17 -12
  243. package/src/adapter/attribute-utils/get-attribute-from-layouts.ts +259 -0
  244. package/src/adapter/canvas-context.ts +433 -0
  245. package/src/adapter/device.ts +435 -0
  246. package/src/adapter/resources/buffer.ts +106 -0
  247. package/src/adapter/resources/command-buffer.ts +38 -0
  248. package/src/adapter/resources/command-encoder.ts +172 -0
  249. package/src/adapter/resources/compute-pass.ts +52 -0
  250. package/src/adapter/resources/compute-pipeline.ts +39 -0
  251. package/src/adapter/resources/external-texture.ts +20 -0
  252. package/src/adapter/resources/framebuffer.ts +230 -0
  253. package/src/adapter/resources/render-pass.ts +117 -0
  254. package/src/adapter/resources/render-pipeline.ts +133 -0
  255. package/src/adapter/resources/resource.ts +176 -0
  256. package/src/adapter/resources/sampler.ts +69 -0
  257. package/src/adapter/resources/shader.ts +143 -0
  258. package/src/adapter/resources/texture.ts +140 -0
  259. package/src/adapter/resources/transform-feedback.ts +45 -0
  260. package/src/adapter/resources/vertex-array.ts +65 -0
  261. package/src/adapter/type-utils/decode-attribute-type.ts +82 -0
  262. package/src/adapter/type-utils/decode-data-type.ts +62 -0
  263. package/src/adapter/type-utils/decode-shader-types.ts +48 -0
  264. package/src/adapter/type-utils/decode-texture-format.ts +190 -0
  265. package/src/adapter/type-utils/decode-vertex-format.ts +49 -0
  266. package/src/adapter/type-utils/vertex-format-from-attribute.ts +103 -0
  267. package/src/adapter/type-utils/wgsl-utils.ts +18 -0
  268. package/src/adapter/types/accessor.ts +34 -0
  269. package/src/adapter/types/buffer-layout.ts +62 -0
  270. package/src/adapter/types/parameters.ts +250 -0
  271. package/src/adapter/types/shader-layout.ts +193 -0
  272. package/src/adapter/types/shader-types.ts +77 -0
  273. package/src/adapter/types/texture-formats.ts +168 -0
  274. package/src/adapter/types/types.ts +109 -0
  275. package/src/adapter/types/vertex-formats.ts +91 -0
  276. package/src/index.ts +160 -92
  277. package/src/init.ts +47 -0
  278. package/src/lib/compiler-log/compiler-message.ts +10 -0
  279. package/src/lib/compiler-log/format-compiler-log.ts +113 -0
  280. package/src/lib/compiler-log/get-shader-info.ts +41 -0
  281. package/src/lib/luma.ts +84 -0
  282. package/src/lib/uniforms/uniform-block.ts +80 -0
  283. package/src/lib/uniforms/uniform-buffer-layout.ts +109 -0
  284. package/src/lib/uniforms/uniform-store.ts +173 -0
  285. package/src/lib/uniforms/uniform.ts +25 -0
  286. package/src/types.ts +33 -0
  287. package/src/utils/array-equal.ts +33 -0
  288. package/src/utils/array-utils-flat.ts +43 -0
  289. package/src/utils/assert.ts +7 -0
  290. package/src/utils/cast.ts +4 -0
  291. package/src/utils/check-props.ts +74 -0
  292. package/src/utils/deep-equal.ts +47 -0
  293. package/src/utils/format-value.ts +40 -0
  294. package/src/utils/is-array.ts +24 -0
  295. package/src/utils/load-file.ts +89 -0
  296. package/src/utils/log.ts +4 -0
  297. package/src/utils/random.ts +17 -0
  298. package/src/utils/request-animation-frame.ts +15 -0
  299. package/src/utils/stats-manager.ts +23 -0
  300. package/src/utils/stub-methods.ts +20 -0
  301. package/src/utils/utils.ts +36 -0
  302. package/dist/bundle.d.ts +0 -2
  303. package/dist/bundle.d.ts.map +0 -1
  304. package/dist/bundle.js +0 -5
  305. package/dist/bundle.js.map +0 -1
  306. package/src/bundle.ts +0 -4
package/dist/index.d.ts CHANGED
@@ -1,129 +1,82 @@
1
- export { log, assert, uid } from '@luma.gl/api';
2
- export { Timeline } from '@luma.gl/engine';
3
- export { ClassicAnimationLoop as AnimationLoop, ClassicModel as Model, Transform, ProgramManager, ClipSpace } from '@luma.gl/gltools';
4
- export { Geometry, ConeGeometry, CubeGeometry, CylinderGeometry, IcoSphereGeometry, PlaneGeometry, SphereGeometry, TruncatedConeGeometry } from '@luma.gl/engine';
5
- export { createGLContext, instrumentGLContext, FEATURES, hasFeature, hasFeatures } from '@luma.gl/gltools';
6
- /** @deprecated Use luma.stats */
7
- export declare const lumaStats: import("@luma.gl/api").StatsManager;
8
- export { isWebGL, isWebGL2, getParameters, setParameters, withParameters, resetParameters, cssToDeviceRatio, cssToDevicePixels, Buffer, Program, Framebuffer, Renderbuffer, Texture2D, TextureCube, clear, readPixelsToArray, readPixelsToBuffer, cloneTextureFrom, copyToTexture, Texture3D, TransformFeedback } from '@luma.gl/gltools';
9
- import { normalizeShaderModule as normalizeShaderModuleDeprecated } from '@luma.gl/shadertools';
10
- /** @deprecated Import directly from `@luma.gl/shadertools` */
11
- export declare const normalizeShaderModule: typeof normalizeShaderModuleDeprecated;
12
- /** @deprecated Import directly from `@luma.gl/shadertools` */
13
- export declare const fp32: {
14
- name: string;
15
- vs: string;
16
- };
17
- /** @deprecated Import directly from `@luma.gl/shadertools` */
18
- export declare const fp64: {
19
- name: string;
20
- vs: string;
21
- dependencies: {
22
- name: string;
23
- vs: string;
24
- getUniforms: () => {
25
- ONE: number;
26
- };
27
- fp64ify: typeof import("@luma.gl/shadertools/modules/fp64/fp64-utils").fp64ify;
28
- fp64LowPart: typeof import("@luma.gl/shadertools/modules/fp64/fp64-utils").fp64LowPart;
29
- fp64ifyMatrix4: typeof import("@luma.gl/shadertools/modules/fp64/fp64-utils").fp64ifyMatrix4;
30
- }[];
31
- fp64ify: typeof import("@luma.gl/shadertools/modules/fp64/fp64-utils").fp64ify;
32
- fp64LowPart: typeof import("@luma.gl/shadertools/modules/fp64/fp64-utils").fp64LowPart;
33
- fp64ifyMatrix4: typeof import("@luma.gl/shadertools/modules/fp64/fp64-utils").fp64ifyMatrix4;
34
- };
35
- /** @deprecated Import directly from `@luma.gl/shadertools` */
36
- export declare const project: {
37
- name: string;
38
- getUniforms: (opts?: {
39
- modelMatrix: number[];
40
- viewMatrix: number[];
41
- projectionMatrix: number[];
42
- cameraPositionWorld: number[];
43
- }, prevUniforms?: {}) => Record<string, any>;
44
- vs: string;
45
- fs: string;
46
- };
47
- /** @deprecated Import directly from `@luma.gl/shadertools` */
48
- export declare const dirlight: {
49
- name: string;
50
- fs: string;
51
- getUniforms: (opts?: import("@luma.gl/shadertools/modules/dirlight/dirlight").DirlightOptions) => Record<string, any>;
52
- dependencies: {
53
- name: string;
54
- getUniforms: (opts?: {
55
- modelMatrix: number[];
56
- viewMatrix: number[];
57
- projectionMatrix: number[];
58
- cameraPositionWorld: number[];
59
- }, prevUniforms?: {}) => Record<string, any>;
60
- vs: string;
61
- fs: string;
62
- }[];
63
- };
64
- /** @deprecated Import directly from `@luma.gl/shadertools` */
65
- export declare const picking: {
66
- name: string;
67
- vs: string;
68
- fs: string;
69
- getUniforms: (opts?: Required<import("@luma.gl/shadertools/modules/picking/picking").PickingOptions>) => Record<string, any>;
70
- };
71
- /** @deprecated Import directly from `@luma.gl/shadertools` */
72
- export declare const gouraudLighting: {
73
- name: string;
74
- dependencies: {
75
- name: string;
76
- vs: string;
77
- fs: string;
78
- getUniforms: (opts?: import("@luma.gl/shadertools/modules/lights/lights").LightsOptions) => Record<string, any>;
79
- defines: {
80
- MAX_LIGHTS: number;
81
- };
82
- }[];
83
- vs: string;
84
- defines: {
85
- LIGHTING_VERTEX: number;
86
- };
87
- getUniforms: (opts?: {
88
- material?: import("@luma.gl/shadertools/modules/phong-lighting/phong-lighting").PhongLightingProps;
89
- }) => Record<string, any>;
90
- };
91
- /** @deprecated Import directly from `@luma.gl/shadertools` */
92
- export declare const phongLighting: {
93
- name: string;
94
- dependencies: {
95
- name: string;
96
- vs: string;
97
- fs: string;
98
- getUniforms: (opts?: import("@luma.gl/shadertools/modules/lights/lights").LightsOptions) => Record<string, any>;
99
- defines: {
100
- MAX_LIGHTS: number;
101
- };
102
- }[];
103
- fs: string;
104
- defines: {
105
- LIGHTING_FRAGMENT: number;
106
- };
107
- getUniforms: (opts?: {
108
- material?: import("@luma.gl/shadertools/modules/phong-lighting/phong-lighting").PhongLightingProps;
109
- }) => Record<string, any>;
110
- };
111
- /** @deprecated Import directly from `@luma.gl/shadertools` */
112
- export declare const pbr: {
113
- name: string;
114
- vs: string;
115
- fs: string;
116
- defines: {
117
- LIGHTING_FRAGMENT: number;
118
- };
119
- dependencies: {
120
- name: string;
121
- vs: string;
122
- fs: string;
123
- getUniforms: (opts?: import("@luma.gl/shadertools/modules/lights/lights").LightsOptions) => Record<string, any>;
124
- defines: {
125
- MAX_LIGHTS: number;
126
- };
127
- }[];
128
- };
1
+ export { VERSION } from './init';
2
+ export type { ConstructorOf, PartialBy } from './types';
3
+ export type { TypedArray, TypedArrayConstructor, NumberArray, BigIntOrNumberArray } from './types';
4
+ export { isTypedArray, isNumberArray } from './utils/is-array';
5
+ export { luma } from './lib/luma';
6
+ export type { DeviceProps, DeviceLimits, DeviceInfo, DeviceFeature } from './adapter/device';
7
+ export { Device } from './adapter/device';
8
+ export type { CanvasContextProps } from './adapter/canvas-context';
9
+ export { CanvasContext } from './adapter/canvas-context';
10
+ export type { ResourceProps } from './adapter/resources/resource';
11
+ export { Resource } from './adapter/resources/resource';
12
+ export type { BufferProps } from './adapter/resources/buffer';
13
+ export { Buffer } from './adapter/resources/buffer';
14
+ export type { TextureProps, TextureData } from './adapter/resources/texture';
15
+ export { Texture } from './adapter/resources/texture';
16
+ export type { ExternalTextureProps } from './adapter/resources/external-texture';
17
+ export { ExternalTexture } from './adapter/resources/external-texture';
18
+ export type { ShaderProps } from './adapter/resources/shader';
19
+ export { Shader } from './adapter/resources/shader';
20
+ export type { SamplerProps, SamplerParameters } from './adapter/resources/sampler';
21
+ export { Sampler } from './adapter/resources/sampler';
22
+ export type { FramebufferProps } from './adapter/resources/framebuffer';
23
+ export { Framebuffer } from './adapter/resources/framebuffer';
24
+ export type { RenderPipelineProps } from './adapter/resources/render-pipeline';
25
+ export { RenderPipeline } from './adapter/resources/render-pipeline';
26
+ export type { ComputePipelineProps } from './adapter/resources/compute-pipeline';
27
+ export { ComputePipeline } from './adapter/resources/compute-pipeline';
28
+ export type { RenderPassProps } from './adapter/resources/render-pass';
29
+ export { RenderPass } from './adapter/resources/render-pass';
30
+ export type { ComputePassProps } from './adapter/resources/compute-pass';
31
+ export { ComputePass } from './adapter/resources/compute-pass';
32
+ export type { CommandEncoderProps } from './adapter/resources/command-encoder';
33
+ export { CommandEncoder } from './adapter/resources/command-encoder';
34
+ export type { CommandBufferProps } from './adapter/resources/command-buffer';
35
+ export { CommandBuffer } from './adapter/resources/command-buffer';
36
+ export type { VertexArrayProps } from './adapter/resources/vertex-array';
37
+ export { VertexArray } from './adapter/resources/vertex-array';
38
+ export type { BufferRange, TransformFeedbackProps } from './adapter/resources/transform-feedback';
39
+ export { TransformFeedback } from './adapter/resources/transform-feedback';
40
+ export type { AccessorObject } from './adapter/types/accessor';
41
+ export type { Parameters, PrimitiveTopology, IndexFormat, CullMode, FrontFace, RasterizationParameters, CompareFunction, StencilOperation, DepthStencilParameters, BlendFactor, BlendOperation, ColorParameters, MultisampleParameters, RenderPassParameters, RenderPipelineParameters } from './adapter/types/parameters';
42
+ export type { VertexFormat, VertexType } from './adapter/types/vertex-formats';
43
+ export type { TextureFormat, ColorTextureFormat, DepthStencilTextureFormat } from './adapter/types/texture-formats';
44
+ export type { ShaderDataType, ShaderAttributeType, ShaderUniformType } from './adapter/types/shader-types';
45
+ export type { ColorAttachment, DepthStencilAttachment } from './adapter/types/types';
46
+ export type { ShaderLayout, AttributeDeclaration, BindingDeclaration, Binding } from './adapter/types/shader-layout';
47
+ export type { BufferLayout, BufferAttributeLayout } from './adapter/types/buffer-layout';
48
+ export type { AttributeBinding, UniformBinding, UniformBlockBinding, VaryingBinding } from './adapter/types/shader-layout';
49
+ export type { UniformValue } from './adapter/types/types';
50
+ export { UniformBufferLayout } from './lib/uniforms/uniform-buffer-layout';
51
+ export { UniformBlock } from './lib/uniforms/uniform-block';
52
+ export { UniformStore } from './lib/uniforms/uniform-store';
53
+ export { decodeVertexFormat } from './adapter/type-utils/decode-vertex-format';
54
+ export { decodeTextureFormat } from './adapter/type-utils/decode-texture-format';
55
+ export { getDataTypeFromTypedArray, getTypedArrayFromDataType, getVertexFormatFromAttribute } from './adapter/type-utils/vertex-format-from-attribute';
56
+ export { decodeShaderUniformType } from './adapter/type-utils/decode-shader-types';
57
+ export { decodeShaderAttributeType } from './adapter/type-utils/decode-attribute-type';
58
+ export type { CompilerMessage } from './lib/compiler-log/compiler-message';
59
+ export { formatCompilerLog } from './lib/compiler-log/format-compiler-log';
60
+ export type { AttributeInfo } from './adapter/attribute-utils/get-attribute-from-layouts';
61
+ export { getAttributeInfosFromLayouts, mergeShaderLayout } from './adapter/attribute-utils/get-attribute-from-layouts';
62
+ export { StatsManager } from './utils/stats-manager';
63
+ export { assert } from './utils/assert';
64
+ export { cast } from './utils/cast';
65
+ export { log } from './utils/log';
66
+ export { uid, isPowerOfTwo, isObjectEmpty } from './utils/utils';
67
+ export { isUniformValue, splitUniformsAndBindings } from './lib/uniforms/uniform';
68
+ export { formatValue } from './utils/format-value';
69
+ export { stubRemovedMethods } from './utils/stub-methods';
70
+ export { checkProps } from './utils/check-props';
71
+ export { setPathPrefix, loadFile, loadImage, loadImageBitmap, loadScript } from './utils/load-file';
72
+ export { getScratchArrayBuffer, getScratchArray, fillArray } from './utils/array-utils-flat';
73
+ export { makeRandomNumberGenerator, random } from './utils/random';
74
+ export { deepEqual } from './utils/deep-equal';
75
+ export { requestAnimationFrame, cancelAnimationFrame } from './utils/request-animation-frame';
76
+ /**
77
+ * Marks GLSL shaders for syntax highlighting: glsl`...`
78
+ * Install https://marketplace.visualstudio.com/items?itemName=boyswan.glsl-literal
79
+ */
80
+ export declare const glsl: (x: TemplateStringsArray) => string;
81
+ export type { CopyBufferToBufferOptions, CopyBufferToTextureOptions, CopyTextureToBufferOptions, CopyTextureToTextureOptions } from './adapter/resources/command-encoder';
129
82
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAC,MAAM,cAAc,CAAC;AAK9C,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EACL,oBAAoB,IAAI,aAAa,EACrC,YAAY,IAAI,KAAK,EACrB,SAAS,EACT,cAAc,EACd,SAAS,EACV,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,c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AAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAChC,OAAO,EAAC,GAAG,EAAE,YAAY,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACT,eAAe,EACf,UAAU,EACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAC,qBAAqB,EAAE,eAAe,EAAE,SAAS,EAAC,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAAC,yBAAyB,EAAE,MAAM,EAAC,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAG7C,OAAO,EAAC,qBAAqB,EAAE,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AAI5F;;;GAGG;AACH,eAAO,MAAM,IAAI,MAAO,oBAAoB,WAAW,CAAC;AAIxD,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,qCAAqC,CAAC"}
package/dist/index.js CHANGED
@@ -1,19 +1,46 @@
1
- export { log, assert, uid } from '@luma.gl/api';
2
- export { Timeline } from '@luma.gl/engine';
3
- export { ClassicAnimationLoop as AnimationLoop, ClassicModel as Model, Transform, ProgramManager, ClipSpace } from '@luma.gl/gltools';
4
- export { Geometry, ConeGeometry, CubeGeometry, CylinderGeometry, IcoSphereGeometry, PlaneGeometry, SphereGeometry, TruncatedConeGeometry } from '@luma.gl/engine';
5
- export { createGLContext, instrumentGLContext, FEATURES, hasFeature, hasFeatures } from '@luma.gl/gltools';
6
- import { luma } from '@luma.gl/api';
7
- export const lumaStats = luma.stats;
8
- export { isWebGL, isWebGL2, getParameters, setParameters, withParameters, resetParameters, cssToDeviceRatio, cssToDevicePixels, Buffer, Program, Framebuffer, Renderbuffer, Texture2D, TextureCube, clear, readPixelsToArray, readPixelsToBuffer, cloneTextureFrom, copyToTexture, Texture3D, TransformFeedback } from '@luma.gl/gltools';
9
- import { normalizeShaderModule as normalizeShaderModuleDeprecated, fp32 as fp32Deprecated, fp64 as fp64Deprecated, project as projectDeprecated, dirlight as dirlightDeprecated, picking as pickingDeprecated, gouraudLighting as gouraudLightingDeprecated, phongLighting as phongLightingDeprecated, pbr as pbrDeprecated } from '@luma.gl/shadertools';
10
- export const normalizeShaderModule = normalizeShaderModuleDeprecated;
11
- export const fp32 = fp32Deprecated;
12
- export const fp64 = fp64Deprecated;
13
- export const project = projectDeprecated;
14
- export const dirlight = dirlightDeprecated;
15
- export const picking = pickingDeprecated;
16
- export const gouraudLighting = gouraudLightingDeprecated;
17
- export const phongLighting = phongLightingDeprecated;
18
- export const pbr = pbrDeprecated;
1
+ export { VERSION } from "./init.js";
2
+ export { isTypedArray, isNumberArray } from "./utils/is-array.js";
3
+ export { luma } from "./lib/luma.js";
4
+ export { Device } from "./adapter/device.js";
5
+ export { CanvasContext } from "./adapter/canvas-context.js";
6
+ export { Resource } from "./adapter/resources/resource.js";
7
+ export { Buffer } from "./adapter/resources/buffer.js";
8
+ export { Texture } from "./adapter/resources/texture.js";
9
+ export { ExternalTexture } from "./adapter/resources/external-texture.js";
10
+ export { Shader } from "./adapter/resources/shader.js";
11
+ export { Sampler } from "./adapter/resources/sampler.js";
12
+ export { Framebuffer } from "./adapter/resources/framebuffer.js";
13
+ export { RenderPipeline } from "./adapter/resources/render-pipeline.js";
14
+ export { ComputePipeline } from "./adapter/resources/compute-pipeline.js";
15
+ export { RenderPass } from "./adapter/resources/render-pass.js";
16
+ export { ComputePass } from "./adapter/resources/compute-pass.js";
17
+ export { CommandEncoder } from "./adapter/resources/command-encoder.js";
18
+ export { CommandBuffer } from "./adapter/resources/command-buffer.js";
19
+ export { VertexArray } from "./adapter/resources/vertex-array.js";
20
+ export { TransformFeedback } from "./adapter/resources/transform-feedback.js";
21
+ export { UniformBufferLayout } from "./lib/uniforms/uniform-buffer-layout.js";
22
+ export { UniformBlock } from "./lib/uniforms/uniform-block.js";
23
+ export { UniformStore } from "./lib/uniforms/uniform-store.js";
24
+ export { decodeVertexFormat } from "./adapter/type-utils/decode-vertex-format.js";
25
+ export { decodeTextureFormat } from "./adapter/type-utils/decode-texture-format.js";
26
+ export { getDataTypeFromTypedArray, getTypedArrayFromDataType, getVertexFormatFromAttribute } from "./adapter/type-utils/vertex-format-from-attribute.js";
27
+ export { decodeShaderUniformType } from "./adapter/type-utils/decode-shader-types.js";
28
+ export { decodeShaderAttributeType } from "./adapter/type-utils/decode-attribute-type.js";
29
+ export { formatCompilerLog } from "./lib/compiler-log/format-compiler-log.js";
30
+ export { getAttributeInfosFromLayouts, mergeShaderLayout } from "./adapter/attribute-utils/get-attribute-from-layouts.js";
31
+ export { StatsManager } from "./utils/stats-manager.js";
32
+ export { assert } from "./utils/assert.js";
33
+ export { cast } from "./utils/cast.js";
34
+ export { log } from "./utils/log.js";
35
+ export { uid, isPowerOfTwo, isObjectEmpty } from "./utils/utils.js";
36
+ export { isUniformValue, splitUniformsAndBindings } from "./lib/uniforms/uniform.js";
37
+ export { formatValue } from "./utils/format-value.js";
38
+ export { stubRemovedMethods } from "./utils/stub-methods.js";
39
+ export { checkProps } from "./utils/check-props.js";
40
+ export { setPathPrefix, loadFile, loadImage, loadImageBitmap, loadScript } from "./utils/load-file.js";
41
+ export { getScratchArrayBuffer, getScratchArray, fillArray } from "./utils/array-utils-flat.js";
42
+ export { makeRandomNumberGenerator, random } from "./utils/random.js";
43
+ export { deepEqual } from "./utils/deep-equal.js";
44
+ export { requestAnimationFrame, cancelAnimationFrame } from "./utils/request-animation-frame.js";
45
+ export const glsl = x => `${x}`;
19
46
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["log","assert","uid","Timeline","ClassicAnimationLoop","AnimationLoop","ClassicModel","Model","Transform","ProgramManager","ClipSpace","Geometry","ConeGeometry","CubeGeometry","CylinderGeometry","IcoSphereGeometry","PlaneGeometry","SphereGeometry","TruncatedConeGeometry","createGLContext","instrumentGLContext","FEATURES","hasFeature","hasFeatures","luma","lumaStats","stats","isWebGL","isWebGL2","getParameters","setParameters","withParameters","resetParameters","cssToDeviceRatio","cssToDevicePixels","Buffer","Program","Framebuffer","Renderbuffer","Texture2D","TextureCube","clear","readPixelsToArray","readPixelsToBuffer","cloneTextureFrom","copyToTexture","Texture3D","TransformFeedback","normalizeShaderModule","normalizeShaderModuleDeprecated","fp32","fp32Deprecated","fp64","fp64Deprecated","project","projectDeprecated","dirlight","dirlightDeprecated","picking","pickingDeprecated","gouraudLighting","gouraudLightingDeprecated","phongLighting","phongLightingDeprecated","pbr","pbrDeprecated"],"mappings":"AAIA,SAAQA,GAAR,EAAaC,MAAb,EAAqBC,GAArB,QAA+B,cAA/B;AAKA,SAAQC,QAAR,QAAuB,iBAAvB;AAEA,SACEC,oBAAoB,IAAIC,aAD1B,EAEEC,YAAY,IAAIC,KAFlB,EAGEC,SAHF,EAIEC,cAJF,EAKEC,SALF,QAMO,kBANP;AAQA,SACEC,QADF,EAEEC,YAFF,EAGEC,YAHF,EAIEC,gBAJF,EAKEC,iBALF,EAMEC,aANF,EAOEC,cAPF,EAQEC,qBARF,QASO,iBATP;AAgBA,SACEC,eADF,EAEEC,mBAFF,EAGEC,QAHF,EAIEC,UAJF,EAKEC,WALF,QAMO,kBANP;AAQA,SAAQC,IAAR,QAAmB,cAAnB;AAEA,OAAO,MAAMC,SAAS,GAAGD,IAAI,CAACE,KAAvB;AAEP,SACEC,OADF,EAEEC,QAFF,EAGEC,aAHF,EAIEC,aAJF,EAKEC,cALF,EAMEC,eANF,EAOEC,gBAPF,EAQEC,iBARF,EASEC,MATF,EAUEC,OAVF,EAWEC,WAXF,EAYEC,YAZF,EAaEC,SAbF,EAcEC,WAdF,EAeEC,KAfF,EAgBEC,iBAhBF,EAiBEC,kBAjBF,EAkBEC,gBAlBF,EAmBEC,aAnBF,EAoBEC,SApBF,EAqBEC,iBArBF,QAsBO,kBAtBP;AA0BA,SAEEC,qBAAqB,IAAIC,+BAF3B,EAIEC,IAAI,IAAIC,cAJV,EAKEC,IAAI,IAAIC,cALV,EAMEC,OAAO,IAAIC,iBANb,EAOEC,QAAQ,IAAIC,kBAPd,EAQEC,OAAO,IAAIC,iBARb,EASEC,eAAe,IAAIC,yBATrB,EAUEC,aAAa,IAAIC,uBAVnB,EAWEC,GAAG,IAAIC,aAXT,QAYO,sBAZP;AAeA,OAAO,MAAMjB,qBAAqB,GAAGC,+BAA9B;AAEP,OAAO,MAAMC,IAAI,GAAGC,cAAb;AAEP,OAAO,MAAMC,IAAI,GAAGC,cAAb;AAEP,OAAO,MAAMC,OAAO,GAAGC,iBAAhB;AAEP,OAAO,MAAMC,QAAQ,GAAGC,kBAAjB;AAEP,OAAO,MAAMC,OAAO,GAAGC,iBAAhB;AAEP,OAAO,MAAMC,eAAe,GAAGC,yBAAxB;AAEP,OAAO,MAAMC,aAAa,GAAGC,uBAAtB;AAEP,OAAO,MAAMC,GAAG,GAAGC,aAAZ","sourcesContent":["// luma.gl, MIT license\n// core module exports\n\n// UTILS: undocumented API for other luma.gl modules\nexport {log, assert, uid} from '@luma.gl/api';\n\n// CORE MODULE EXPORTS FOR LUMA.GL\n\n// ENGINE\nexport {Timeline} from '@luma.gl/engine';\n\nexport {\n ClassicAnimationLoop as AnimationLoop,\n ClassicModel as Model,\n Transform,\n ProgramManager,\n ClipSpace\n} from '@luma.gl/gltools';\n\nexport {\n Geometry,\n ConeGeometry,\n CubeGeometry,\n CylinderGeometry,\n IcoSphereGeometry,\n PlaneGeometry,\n SphereGeometry,\n TruncatedConeGeometry\n} from '@luma.gl/engine';\n\n// TODO - the following exports will be removed in v9\n\n// WEBGL - importing from `@luma.gl/core` is deprecated\n\n// GLTOOLS\nexport {\n createGLContext,\n instrumentGLContext,\n FEATURES,\n hasFeature,\n hasFeatures\n} from '@luma.gl/gltools';\n\nimport {luma} from '@luma.gl/api';\n/** @deprecated Use luma.stats */\nexport const lumaStats = luma.stats;\n\nexport {\n isWebGL,\n isWebGL2,\n getParameters,\n setParameters,\n withParameters,\n resetParameters,\n cssToDeviceRatio,\n cssToDevicePixels,\n Buffer,\n Program,\n Framebuffer,\n Renderbuffer,\n Texture2D,\n TextureCube,\n clear,\n readPixelsToArray,\n readPixelsToBuffer,\n cloneTextureFrom,\n copyToTexture,\n Texture3D,\n TransformFeedback\n} from '@luma.gl/gltools';\n\n// SHADERTOOLS - importing from `@luma.gl/core` is deprecated\n\nimport {\n // HELPERS\n normalizeShaderModule as normalizeShaderModuleDeprecated,\n // SHADER MODULES\n fp32 as fp32Deprecated,\n fp64 as fp64Deprecated,\n project as projectDeprecated,\n dirlight as dirlightDeprecated,\n picking as pickingDeprecated,\n gouraudLighting as gouraudLightingDeprecated,\n phongLighting as phongLightingDeprecated,\n pbr as pbrDeprecated\n} from '@luma.gl/shadertools';\n\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const normalizeShaderModule = normalizeShaderModuleDeprecated;\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const fp32 = fp32Deprecated;\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const fp64 = fp64Deprecated;\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const project = projectDeprecated;\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const dirlight = dirlightDeprecated;\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const picking = pickingDeprecated;\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const gouraudLighting = gouraudLightingDeprecated;\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const phongLighting = phongLightingDeprecated;\n/** @deprecated Import directly from `@luma.gl/shadertools` */\nexport const pbr = pbrDeprecated;\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":["VERSION","isTypedArray","isNumberArray","luma","Device","CanvasContext","Resource","Buffer","Texture","ExternalTexture","Shader","Sampler","Framebuffer","RenderPipeline","ComputePipeline","RenderPass","ComputePass","CommandEncoder","CommandBuffer","VertexArray","TransformFeedback","UniformBufferLayout","UniformBlock","UniformStore","decodeVertexFormat","decodeTextureFormat","getDataTypeFromTypedArray","getTypedArrayFromDataType","getVertexFormatFromAttribute","decodeShaderUniformType","decodeShaderAttributeType","formatCompilerLog","getAttributeInfosFromLayouts","mergeShaderLayout","StatsManager","assert","cast","log","uid","isPowerOfTwo","isObjectEmpty","isUniformValue","splitUniformsAndBindings","formatValue","stubRemovedMethods","checkProps","setPathPrefix","loadFile","loadImage","loadImageBitmap","loadScript","getScratchArrayBuffer","getScratchArray","fillArray","makeRandomNumberGenerator","random","deepEqual","requestAnimationFrame","cancelAnimationFrame","glsl","x"],"sources":["../src/index.ts"],"sourcesContent":["// luma.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nexport {VERSION} from './init';\n\n// GENERAL TYPES\nexport type {ConstructorOf, PartialBy} from './types';\n\n// NUMERIC TYPES - TODO: could be imported from @math.gl/types\nexport type {TypedArray, TypedArrayConstructor, NumberArray, BigIntOrNumberArray} from './types';\n\nexport {isTypedArray, isNumberArray} from './utils/is-array';\n\n// MAIN API ACCESS POINTS\nexport {luma} from './lib/luma';\n\nexport type {DeviceProps, DeviceLimits, DeviceInfo, DeviceFeature} from './adapter/device';\nexport {Device} from './adapter/device';\nexport type {CanvasContextProps} from './adapter/canvas-context';\nexport {CanvasContext} from './adapter/canvas-context';\n\n// GPU RESOURCES\nexport type {ResourceProps} from './adapter/resources/resource';\nexport {Resource} from './adapter/resources/resource';\nexport type {BufferProps} from './adapter/resources/buffer';\nexport {Buffer} from './adapter/resources/buffer';\nexport type {TextureProps, TextureData} from './adapter/resources/texture';\nexport {Texture} from './adapter/resources/texture';\nexport type {ExternalTextureProps} from './adapter/resources/external-texture';\nexport {ExternalTexture} from './adapter/resources/external-texture';\nexport type {ShaderProps} from './adapter/resources/shader';\nexport {Shader} from './adapter/resources/shader';\nexport type {SamplerProps, SamplerParameters} from './adapter/resources/sampler';\nexport {Sampler} from './adapter/resources/sampler';\nexport type {FramebufferProps} from './adapter/resources/framebuffer';\nexport {Framebuffer} from './adapter/resources/framebuffer';\n\nexport type {RenderPipelineProps} from './adapter/resources/render-pipeline';\nexport {RenderPipeline} from './adapter/resources/render-pipeline';\n\nexport type {ComputePipelineProps} from './adapter/resources/compute-pipeline';\nexport {ComputePipeline} from './adapter/resources/compute-pipeline';\nexport type {RenderPassProps} from './adapter/resources/render-pass';\nexport {RenderPass} from './adapter/resources/render-pass';\nexport type {ComputePassProps} from './adapter/resources/compute-pass';\nexport {ComputePass} from './adapter/resources/compute-pass';\nexport type {CommandEncoderProps} from './adapter/resources/command-encoder';\nexport {CommandEncoder} from './adapter/resources/command-encoder';\nexport type {CommandBufferProps} from './adapter/resources/command-buffer';\nexport {CommandBuffer} from './adapter/resources/command-buffer';\n\nexport type {VertexArrayProps} from './adapter/resources/vertex-array';\nexport {VertexArray} from './adapter/resources/vertex-array';\n\nexport type {BufferRange, TransformFeedbackProps} from './adapter/resources/transform-feedback';\nexport {TransformFeedback} from './adapter/resources/transform-feedback';\n\n// API TYPES\nexport type {AccessorObject} from './adapter/types/accessor';\nexport type {\n Parameters,\n PrimitiveTopology,\n IndexFormat,\n CullMode,\n FrontFace,\n RasterizationParameters,\n CompareFunction,\n StencilOperation,\n DepthStencilParameters,\n BlendFactor,\n BlendOperation,\n ColorParameters,\n MultisampleParameters,\n RenderPassParameters,\n RenderPipelineParameters\n} from './adapter/types/parameters';\n\n// MEMORY LAYOUT TYPES\nexport type {VertexFormat, VertexType} from './adapter/types/vertex-formats';\nexport type {\n TextureFormat,\n ColorTextureFormat,\n DepthStencilTextureFormat\n} from './adapter/types/texture-formats';\nexport type {\n ShaderDataType,\n ShaderAttributeType,\n ShaderUniformType\n} from './adapter/types/shader-types';\n\nexport type {ColorAttachment, DepthStencilAttachment} from './adapter/types/types';\n\nexport type {\n ShaderLayout,\n AttributeDeclaration,\n BindingDeclaration,\n Binding\n} from './adapter/types/shader-layout';\nexport type {BufferLayout, BufferAttributeLayout} from './adapter/types/buffer-layout';\nexport type {\n // Deprecated, todo\n AttributeBinding,\n UniformBinding,\n UniformBlockBinding,\n VaryingBinding\n} from './adapter/types/shader-layout';\n\nexport type {UniformValue} from './adapter/types/types';\nexport {UniformBufferLayout} from './lib/uniforms/uniform-buffer-layout';\nexport {UniformBlock} from './lib/uniforms/uniform-block';\nexport {UniformStore} from './lib/uniforms/uniform-store';\n\n// TYPE UTILS\nexport {decodeVertexFormat} from './adapter/type-utils/decode-vertex-format';\nexport {decodeTextureFormat} from './adapter/type-utils/decode-texture-format';\nexport {getDataTypeFromTypedArray, getTypedArrayFromDataType, getVertexFormatFromAttribute} from './adapter/type-utils/vertex-format-from-attribute';\n\n// SHADER TYPE UTILS\nexport {decodeShaderUniformType} from './adapter/type-utils/decode-shader-types';\nexport {decodeShaderAttributeType} from './adapter/type-utils/decode-attribute-type';\n\n// COMPILER LOG\nexport type {CompilerMessage} from './lib/compiler-log/compiler-message';\nexport {formatCompilerLog} from './lib/compiler-log/format-compiler-log';\n\n//\nexport type {AttributeInfo} from './adapter/attribute-utils/get-attribute-from-layouts';\nexport {\n getAttributeInfosFromLayouts,\n mergeShaderLayout\n} from './adapter/attribute-utils/get-attribute-from-layouts';\n\n// GENERAL UTILS\n\nexport {StatsManager} from './utils/stats-manager';\nexport {assert} from './utils/assert';\nexport {cast} from './utils/cast';\nexport {log} from './utils/log';\nexport {uid, isPowerOfTwo, isObjectEmpty} from './utils/utils';\nexport {isUniformValue, splitUniformsAndBindings} from './lib/uniforms/uniform';\nexport {formatValue} from './utils/format-value';\nexport {stubRemovedMethods} from './utils/stub-methods';\nexport {checkProps} from './utils/check-props';\nexport {\n setPathPrefix,\n loadFile,\n loadImage,\n loadImageBitmap,\n loadScript\n} from './utils/load-file';\nexport {getScratchArrayBuffer, getScratchArray, fillArray} from './utils/array-utils-flat';\nexport {makeRandomNumberGenerator, random} from './utils/random';\nexport {deepEqual} from './utils/deep-equal';\n\n// ENGINE - TODO/move to @luma.gl/engine once that module is webgl-independent?\nexport {requestAnimationFrame, cancelAnimationFrame} from './utils/request-animation-frame';\n\n// SHADER HELPERS\n\n/**\n * Marks GLSL shaders for syntax highlighting: glsl`...`\n * Install https://marketplace.visualstudio.com/items?itemName=boyswan.glsl-literal\n */\nexport const glsl = (x: TemplateStringsArray) => `${x}`;\n\n// INTERNAL\n\nexport type {\n CopyBufferToBufferOptions,\n CopyBufferToTextureOptions,\n CopyTextureToBufferOptions,\n CopyTextureToTextureOptions\n} from './adapter/resources/command-encoder';\n"],"mappings":"SAGQA,OAAO;AAAA,SAQPC,YAAY,EAAEC,aAAa;AAAA,SAG3BC,IAAI;AAAA,SAGJC,MAAM;AAAA,SAENC,aAAa;AAAA,SAIbC,QAAQ;AAAA,SAERC,MAAM;AAAA,SAENC,OAAO;AAAA,SAEPC,eAAe;AAAA,SAEfC,MAAM;AAAA,SAENC,OAAO;AAAA,SAEPC,WAAW;AAAA,SAGXC,cAAc;AAAA,SAGdC,eAAe;AAAA,SAEfC,UAAU;AAAA,SAEVC,WAAW;AAAA,SAEXC,cAAc;AAAA,SAEdC,aAAa;AAAA,SAGbC,WAAW;AAAA,SAGXC,iBAAiB;AAAA,SAqDjBC,mBAAmB;AAAA,SACnBC,YAAY;AAAA,SACZC,YAAY;AAAA,SAGZC,kBAAkB;AAAA,SAClBC,mBAAmB;AAAA,SACnBC,yBAAyB,EAAEC,yBAAyB,EAAEC,4BAA4B;AAAA,SAGlFC,uBAAuB;AAAA,SACvBC,yBAAyB;AAAA,SAIzBC,iBAAiB;AAAA,SAKvBC,4BAA4B,EAC5BC,iBAAiB;AAAA,SAKXC,YAAY;AAAA,SACZC,MAAM;AAAA,SACNC,IAAI;AAAA,SACJC,GAAG;AAAA,SACHC,GAAG,EAAEC,YAAY,EAAEC,aAAa;AAAA,SAChCC,cAAc,EAAEC,wBAAwB;AAAA,SACxCC,WAAW;AAAA,SACXC,kBAAkB;AAAA,SAClBC,UAAU;AAAA,SAEhBC,aAAa,EACbC,QAAQ,EACRC,SAAS,EACTC,eAAe,EACfC,UAAU;AAAA,SAEJC,qBAAqB,EAAEC,eAAe,EAAEC,SAAS;AAAA,SACjDC,yBAAyB,EAAEC,MAAM;AAAA,SACjCC,SAAS;AAAA,SAGTC,qBAAqB,EAAEC,oBAAoB;AAQnD,OAAO,MAAMC,IAAI,GAAIC,CAAuB,IAAM,GAAEA,CAAE,EAAC"}
package/dist/init.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ declare global {
2
+ var luma: any;
3
+ }
4
+ export declare const VERSION: string;
5
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,IAAI,EAAE,GAAG,CAAA;CACd;AAuCD,eAAO,MAAM,OAAO,QAAmB,CAAC"}
package/dist/init.js ADDED
@@ -0,0 +1,24 @@
1
+ import { isBrowser } from '@probe.gl/env';
2
+ import { log } from "./utils/log.js";
3
+ import { lumaStats } from "./utils/stats-manager.js";
4
+ function initializeLuma() {
5
+ const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'running from source';
6
+ const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';
7
+ if (globalThis.luma && globalThis.luma.VERSION !== VERSION) {
8
+ throw new Error(`luma.gl - multiple VERSIONs detected: ${globalThis.luma.VERSION} vs ${VERSION}`);
9
+ }
10
+ if (!globalThis.luma) {
11
+ if (isBrowser()) {
12
+ log.log(1, `${VERSION} - ${STARTUP_MESSAGE}`)();
13
+ }
14
+ globalThis.luma = globalThis.luma || {
15
+ VERSION,
16
+ version: VERSION,
17
+ log,
18
+ stats: lumaStats
19
+ };
20
+ }
21
+ return VERSION;
22
+ }
23
+ export const VERSION = initializeLuma();
24
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","names":["isBrowser","log","lumaStats","initializeLuma","VERSION","__VERSION__","STARTUP_MESSAGE","globalThis","luma","Error","version","stats"],"sources":["../src/init.ts"],"sourcesContent":["import {isBrowser} from '@probe.gl/env';\nimport {log} from './utils/log';\nimport {lumaStats} from './utils/stats-manager';\n\ndeclare global {\n // eslint-disable-next-line no-var\n var luma: any\n}\n\n/** \n * By adding the result of init() to Device.VERSION we guarantee it will be called\n * @returns version\n */\nfunction initializeLuma(): string {\n // Version detection using babel plugin\n // @ts-expect-error\n const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'running from source';\n\n const STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';\n // Assign luma.log.level in console to control logging: \\\n // 0: none, 1: minimal, 2: verbose, 3: attribute/uniforms, 4: gl logs\n // luma.log.break[], set to gl funcs, luma.log.profile[] set to model names`;\n\n if (globalThis.luma && globalThis.luma.VERSION !== VERSION) {\n throw new Error(`luma.gl - multiple VERSIONs detected: ${globalThis.luma.VERSION} vs ${VERSION}`);\n }\n\n if (!globalThis.luma) {\n if (isBrowser()) {\n log.log(1, `${VERSION} - ${STARTUP_MESSAGE}`)();\n }\n\n globalThis.luma = globalThis.luma || {\n VERSION,\n version: VERSION,\n log,\n\n // A global stats object that various components can add information to\n // E.g. see webgl/resource.js\n stats: lumaStats,\n };\n }\n\n return VERSION;\n}\n\nexport const VERSION = initializeLuma();\n"],"mappings":"AAAA,SAAQA,SAAS,QAAO,eAAe;AAAC,SAChCC,GAAG;AAAA,SACHC,SAAS;AAWjB,SAASC,cAAcA,CAAA,EAAW;EAGhC,MAAMC,OAAO,GAAG,OAAOC,WAAW,KAAK,WAAW,GAAGA,WAAW,GAAG,qBAAqB;EAExF,MAAMC,eAAe,GAAG,qDAAqD;EAK7E,IAAIC,UAAU,CAACC,IAAI,IAAID,UAAU,CAACC,IAAI,CAACJ,OAAO,KAAKA,OAAO,EAAE;IAC1D,MAAM,IAAIK,KAAK,CAAE,yCAAwCF,UAAU,CAACC,IAAI,CAACJ,OAAQ,OAAMA,OAAQ,EAAC,CAAC;EACnG;EAEA,IAAI,CAACG,UAAU,CAACC,IAAI,EAAE;IACpB,IAAIR,SAAS,CAAC,CAAC,EAAE;MACfC,GAAG,CAACA,GAAG,CAAC,CAAC,EAAG,GAAEG,OAAQ,MAAKE,eAAgB,EAAC,CAAC,CAAC,CAAC;IACjD;IAEAC,UAAU,CAACC,IAAI,GAAGD,UAAU,CAACC,IAAI,IAAI;MACnCJ,OAAO;MACPM,OAAO,EAAEN,OAAO;MAChBH,GAAG;MAIHU,KAAK,EAAET;IACT,CAAC;EACH;EAEA,OAAOE,OAAO;AAChB;AAEA,OAAO,MAAMA,OAAO,GAAGD,cAAc,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /** WebGPU style compiler message */
2
+ export type CompilerMessage = {
3
+ type: 'error' | 'warning' | 'info';
4
+ message: string;
5
+ lineNum: number;
6
+ linePos: number;
7
+ };
8
+ //# sourceMappingURL=compiler-message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiler-message.d.ts","sourceRoot":"","sources":["../../../src/lib/compiler-log/compiler-message.ts"],"names":[],"mappings":"AAGA,oCAAoC;AACpC,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=compiler-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compiler-message.js","names":[],"sources":["../../../src/lib/compiler-log/compiler-message.ts"],"sourcesContent":["// luma.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n/** WebGPU style compiler message */\nexport type CompilerMessage = {\n type: 'error' | 'warning' | 'info';\n message: string;\n lineNum: number;\n linePos: number;\n}\n"],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { CompilerMessage } from './compiler-message';
2
+ /** @returns annotated errors or warnings */
3
+ export declare function formatCompilerLog(shaderLog: readonly CompilerMessage[], source: string, options?: {
4
+ /** Include source code in the log. Either just the lines before issues or all source code */
5
+ showSourceCode?: 'no' | 'issues' | 'all';
6
+ html?: boolean;
7
+ }): string;
8
+ //# sourceMappingURL=format-compiler-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-compiler-log.d.ts","sourceRoot":"","sources":["../../../src/lib/compiler-log/format-compiler-log.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAExD,4CAA4C;AAC5C,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,SAAS,eAAe,EAAE,EACrC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IACR,6FAA6F;IAC7F,cAAc,CAAC,EAAE,IAAI,GAAG,QAAQ,GAAG,KAAK,CAAC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GACA,MAAM,CA+BR"}
@@ -0,0 +1,64 @@
1
+ export function formatCompilerLog(shaderLog, source, options) {
2
+ let formattedLog = '';
3
+ const lines = source.split(/\r?\n/);
4
+ const log = shaderLog.slice().sort((a, b) => a.lineNum - b.lineNum);
5
+ switch ((options === null || options === void 0 ? void 0 : options.showSourceCode) || 'no') {
6
+ case 'all':
7
+ let currentMessage = 0;
8
+ for (let lineNum = 1; lineNum <= lines.length; lineNum++) {
9
+ formattedLog += getNumberedLine(lines[lineNum - 1], lineNum, options);
10
+ while (log.length > currentMessage && log[currentMessage].lineNum === lineNum) {
11
+ const message = log[currentMessage++];
12
+ formattedLog += formatCompilerMessage(message, lines, message.lineNum, {
13
+ ...options,
14
+ inlineSource: false
15
+ });
16
+ }
17
+ }
18
+ return formattedLog;
19
+ case 'issues':
20
+ case 'no':
21
+ for (const message of shaderLog) {
22
+ formattedLog += formatCompilerMessage(message, lines, message.lineNum, {
23
+ inlineSource: (options === null || options === void 0 ? void 0 : options.showSourceCode) !== 'no'
24
+ });
25
+ }
26
+ return formattedLog;
27
+ }
28
+ }
29
+ function formatCompilerMessage(message, lines, lineNum, options) {
30
+ if (options !== null && options !== void 0 && options.inlineSource) {
31
+ const numberedLines = getNumberedLines(lines, lineNum);
32
+ const positionIndicator = message.linePos > 0 ? `${' '.repeat(message.linePos + 5)}^^^\n` : '';
33
+ return `
34
+ ${numberedLines}${positionIndicator}${message.type.toUpperCase()}: ${message.message}
35
+
36
+ `;
37
+ }
38
+ return options !== null && options !== void 0 && options.html ? `<div class='luma-compiler-log-error' style="color:red;"><b> ${message.type.toUpperCase()}: ${message.message}</b></div>` : `${message.type.toUpperCase()}: ${message.message}`;
39
+ }
40
+ function getNumberedLines(lines, lineNum, options) {
41
+ let numberedLines = '';
42
+ for (let lineIndex = lineNum - 2; lineIndex <= lineNum; lineIndex++) {
43
+ const sourceLine = lines[lineIndex - 1];
44
+ if (sourceLine !== undefined) {
45
+ numberedLines += getNumberedLine(sourceLine, lineNum, options);
46
+ }
47
+ }
48
+ return numberedLines;
49
+ }
50
+ function getNumberedLine(line, lineNum, options) {
51
+ const escapedLine = options !== null && options !== void 0 && options.html ? escapeHTML(line) : line;
52
+ return `${padLeft(String(lineNum), 4)}: ${escapedLine}${options !== null && options !== void 0 && options.html ? '<br/>' : '\n'}`;
53
+ }
54
+ function padLeft(string, paddedLength) {
55
+ let result = '';
56
+ for (let i = string.length; i < paddedLength; ++i) {
57
+ result += ' ';
58
+ }
59
+ return result + string;
60
+ }
61
+ function escapeHTML(unsafe) {
62
+ return unsafe.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll('\'', '&#039;');
63
+ }
64
+ //# sourceMappingURL=format-compiler-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-compiler-log.js","names":["formatCompilerLog","shaderLog","source","options","formattedLog","lines","split","log","slice","sort","a","b","lineNum","showSourceCode","currentMessage","length","getNumberedLine","message","formatCompilerMessage","inlineSource","numberedLines","getNumberedLines","positionIndicator","linePos","repeat","type","toUpperCase","html","lineIndex","sourceLine","undefined","line","escapedLine","escapeHTML","padLeft","String","string","paddedLength","result","i","unsafe","replaceAll"],"sources":["../../../src/lib/compiler-log/format-compiler-log.ts"],"sourcesContent":["// luma.gl, MIT license\nimport type {CompilerMessage} from './compiler-message';\n\n/** @returns annotated errors or warnings */\nexport function formatCompilerLog(\n shaderLog: readonly CompilerMessage[],\n source: string,\n options?: {\n /** Include source code in the log. Either just the lines before issues or all source code */\n showSourceCode?: 'no' | 'issues' | 'all';\n html?: boolean;\n }\n): string {\n let formattedLog = '';\n const lines = source.split(/\\r?\\n/);\n const log = shaderLog.slice().sort((a, b) => a.lineNum - b.lineNum);\n\n switch (options?.showSourceCode || 'no') {\n case 'all':\n // Parse the error - note: browser and driver dependent\n let currentMessage = 0;\n for (let lineNum = 1; lineNum <= lines.length; lineNum++) {\n formattedLog += getNumberedLine(lines[lineNum - 1], lineNum, options);\n while (log.length > currentMessage && log[currentMessage].lineNum === lineNum) {\n const message = log[currentMessage++];\n formattedLog += formatCompilerMessage(message, lines, message.lineNum, {\n ...options,\n inlineSource: false\n });\n }\n }\n return formattedLog;\n\n case 'issues':\n case 'no':\n // Parse the error - note: browser and driver dependent\n for (const message of shaderLog) {\n formattedLog += formatCompilerMessage(message, lines, message.lineNum, {\n inlineSource: options?.showSourceCode !== 'no'\n });\n }\n return formattedLog;\n }\n}\n\n// Helpers\n\n/** Format one message */\nfunction formatCompilerMessage(\n message: CompilerMessage,\n lines: readonly string[],\n lineNum: number,\n options: {\n inlineSource?: boolean;\n html?: boolean;\n }\n): string {\n if (options?.inlineSource) {\n const numberedLines = getNumberedLines(lines, lineNum);\n // If we got error position on line add a `^^^` indicator on next line\n const positionIndicator = message.linePos > 0 ? `${' '.repeat(message.linePos + 5)}^^^\\n` : '';\n return `\n${numberedLines}${positionIndicator}${message.type.toUpperCase()}: ${message.message}\n\n`;\n }\n return options?.html\n ? `<div class='luma-compiler-log-error' style=\"color:red;\"><b> ${message.type.toUpperCase()}: ${message.message}</b></div>`\n : `${message.type.toUpperCase()}: ${message.message}`;\n}\n\nfunction getNumberedLines(\n lines: readonly string[],\n lineNum: number,\n options?: {html?: boolean}\n): string {\n let numberedLines = '';\n for (let lineIndex = lineNum - 2; lineIndex <= lineNum; lineIndex++) {\n const sourceLine = lines[lineIndex - 1];\n if (sourceLine !== undefined) {\n numberedLines += getNumberedLine(sourceLine, lineNum, options);\n }\n }\n return numberedLines;\n}\n\nfunction getNumberedLine(line: string, lineNum: number, options?: {html?: boolean}): string {\n const escapedLine = options?.html ? escapeHTML(line) : line;\n return `${padLeft(String(lineNum), 4)}: ${escapedLine}${options?.html ? '<br/>' : '\\n'}`;\n}\n\n/**\n * Pads a string with a number of spaces (space characters) to the left\n * @param {String} string - string to pad\n * @param {Number} digits - number of spaces to add\n * @return {String} string - The padded string\n */\nfunction padLeft(string: string, paddedLength: number): string {\n let result = '';\n for (let i = string.length; i < paddedLength; ++i) {\n result += ' ';\n }\n return result + string;\n}\n\nfunction escapeHTML(unsafe: string): string {\n return unsafe\n .replaceAll('&', '&amp;')\n .replaceAll('<', '&lt;')\n .replaceAll('>', '&gt;')\n .replaceAll('\"', '&quot;')\n .replaceAll('\\'', '&#039;');\n}\n"],"mappings":"AAIA,OAAO,SAASA,iBAAiBA,CAC/BC,SAAqC,EAC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AEnB,OAAe,EAAET,OAA0B,EAAU;EAC1F,MAAM6B,WAAW,GAAG7B,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEwB,IAAI,GAAGM,UAAU,CAACF,IAAI,CAAC,GAAGA,IAAI;EAC3D,OAAQ,GAAEG,OAAO,CAACC,MAAM,CAACvB,OAAO,CAAC,EAAE,CAAC,CAAE,KAAIoB,WAAY,GAAE7B,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEwB,IAAI,GAAG,OAAO,GAAG,IAAK,EAAC;AAC1F;AAQA,SAASO,OAAOA,CAACE,MAAc,EAAEC,YAAoB,EAAU;EAC7D,IAAIC,MAAM,GAAG,EAAE;EACf,KAAK,IAAIC,CAAC,GAAGH,MAAM,CAACrB,MAAM,EAAEwB,CAAC,GAAGF,YAAY,EAAE,EAAEE,CAAC,EAAE;IACjDD,MAAM,IAAI,GAAG;EACf;EACA,OAAOA,MAAM,GAAGF,MAAM;AACxB;AAEA,SAASH,UAAUA,CAACO,MAAc,EAAU;EAC1C,OAAOA,MAAM,CACVC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,CACxBA,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CACvBA,UAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CACvBA,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CACzBA,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC/B"}
@@ -0,0 +1,9 @@
1
+ /** Information extracted from shader source code */
2
+ export type ShaderInfo = {
3
+ name: string;
4
+ language: 'glsl' | 'wgsl';
5
+ version: number;
6
+ };
7
+ /** Extracts information from shader source code */
8
+ export declare function getShaderInfo(source: string, defaultName?: string): ShaderInfo;
9
+ //# sourceMappingURL=get-shader-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-shader-info.d.ts","sourceRoot":"","sources":["../../../src/lib/compiler-log/get-shader-info.ts"],"names":[],"mappings":"AAMA,oDAAoD;AACpD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,mDAAmD;AACnD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,CAM9E"}
@@ -0,0 +1,25 @@
1
+ export function getShaderInfo(source, defaultName) {
2
+ return {
3
+ name: getShaderName(source, defaultName),
4
+ language: 'glsl',
5
+ version: getShaderVersion(source)
6
+ };
7
+ }
8
+ function getShaderName(shader) {
9
+ let defaultName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'unnamed';
10
+ const SHADER_NAME_REGEXP = /#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/;
11
+ const match = SHADER_NAME_REGEXP.exec(shader);
12
+ return match ? match[1] : defaultName;
13
+ }
14
+ function getShaderVersion(source) {
15
+ let version = 100;
16
+ const words = source.match(/[^\s]+/g);
17
+ if (words && words.length >= 2 && words[0] === '#version') {
18
+ const v = parseInt(words[1], 10);
19
+ if (Number.isFinite(v)) {
20
+ version = v;
21
+ }
22
+ }
23
+ return version;
24
+ }
25
+ //# sourceMappingURL=get-shader-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-shader-info.js","names":["getShaderInfo","source","defaultName","name","getShaderName","language","version","getShaderVersion","shader","arguments","length","undefined","SHADER_NAME_REGEXP","match","exec","words","v","parseInt","Number","isFinite"],"sources":["../../../src/lib/compiler-log/get-shader-info.ts"],"sourcesContent":["// luma.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n// Note: This was the only dependency that made @luma.gl/webgl depend on @luma.gl/shadertools\n// This file was coped from shadertools to avoid the dependency\n\n/** Information extracted from shader source code */\nexport type ShaderInfo = {\n name: string;\n language: 'glsl' | 'wgsl';\n version: number;\n};\n\n/** Extracts information from shader source code */\nexport function getShaderInfo(source: string, defaultName?: string): ShaderInfo {\n return {\n name: getShaderName(source, defaultName),\n language: 'glsl',\n version: getShaderVersion(source)\n };\n}\n\n/** Extracts GLSLIFY style naming of shaders: `#define SHADER_NAME ...` */\nfunction getShaderName(shader: string, defaultName: string = 'unnamed'): string {\n const SHADER_NAME_REGEXP = /#define[\\s*]SHADER_NAME[\\s*]([A-Za-z0-9_-]+)[\\s*]/;\n const match = SHADER_NAME_REGEXP.exec(shader);\n return match ? match[1] : defaultName;\n}\n\n/** returns GLSL shader version of given shader string */\nfunction getShaderVersion(source: string): number {\n let version = 100;\n const words = source.match(/[^\\s]+/g);\n if (words && words.length >= 2 && words[0] === '#version') {\n const v = parseInt(words[1], 10);\n if (Number.isFinite(v)) {\n version = v;\n }\n }\n return version;\n}\n"],"mappings":"AAcA,OAAO,SAASA,aAAaA,CAACC,MAAc,EAAEC,WAAoB,EAAc;EAC9E,OAAO;IACLC,IAAI,EAAEC,aAAa,CAACH,MAAM,EAAEC,WAAW,CAAC;IACxCG,QAAQ,EAAE,MAAM;IAChBC,OAAO,EAAEC,gBAAgB,CAACN,MAAM;EAClC,CAAC;AACH;AAGA,SAASG,aAAaA,CAACI,MAAc,EAA2C;EAAA,IAAzCN,WAAmB,GAAAO,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,SAAS;EACpE,MAAMG,kBAAkB,GAAG,mDAAmD;EAC9E,MAAMC,KAAK,GAAGD,kBAAkB,CAACE,IAAI,CAACN,MAAM,CAAC;EAC7C,OAAOK,KAAK,GAAGA,KAAK,CAAC,CAAC,CAAC,GAAGX,WAAW;AACvC;AAGA,SAASK,gBAAgBA,CAACN,MAAc,EAAU;EAChD,IAAIK,OAAO,GAAG,GAAG;EACjB,MAAMS,KAAK,GAAGd,MAAM,CAACY,KAAK,CAAC,SAAS,CAAC;EACrC,IAAIE,KAAK,IAAIA,KAAK,CAACL,MAAM,IAAI,CAAC,IAAIK,KAAK,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE;IACzD,MAAMC,CAAC,GAAGC,QAAQ,CAACF,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAChC,IAAIG,MAAM,CAACC,QAAQ,CAACH,CAAC,CAAC,EAAE;MACtBV,OAAO,GAAGU,CAAC;IACb;EACF;EACA,OAAOV,OAAO;AAChB"}
@@ -0,0 +1,22 @@
1
+ import type { Log } from '@probe.gl/log';
2
+ import type { DeviceProps } from '../adapter/device';
3
+ import { Device } from '../adapter/device';
4
+ import { StatsManager } from '../utils/stats-manager';
5
+ /**
6
+ * Entry point to the luma.gl GPU abstraction
7
+ * Register WebGPU and/or WebGL devices (controls application bundle size)
8
+ * Run-time selection of the first available Device
9
+ */
10
+ export declare class luma {
11
+ /** Global stats for all devices */
12
+ static stats: StatsManager;
13
+ /** Global log */
14
+ static log: Log;
15
+ static registerDevices(deviceClasses: any[]): void;
16
+ static getAvailableDevices(): string[];
17
+ static getSupportedDevices(): string[];
18
+ static setDefaultDeviceProps(props: DeviceProps): void;
19
+ /** Creates a device. Asynchronously. */
20
+ static createDevice(props?: DeviceProps): Promise<Device>;
21
+ }
22
+ //# sourceMappingURL=luma.d.ts.map