@snap/camera-kit 1.6.1 → 1.8.0

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 (210) hide show
  1. package/README.md +1 -1
  2. package/dist/environment.js +1 -1
  3. package/dist/environment.js.map +1 -1
  4. package/dist/handlers/retryingHandler.d.ts.map +1 -1
  5. package/dist/handlers/retryingHandler.js +30 -30
  6. package/dist/handlers/retryingHandler.js.map +1 -1
  7. package/dist/lens-core-module/loader/bootstrapURLs.d.ts +1 -1
  8. package/dist/lens-core-module/loader/bootstrapURLs.d.ts.map +1 -1
  9. package/dist/lens-core-module/loader/bootstrapURLs.js +5 -13
  10. package/dist/lens-core-module/loader/bootstrapURLs.js.map +1 -1
  11. package/dist/lensCoreWasmVersions.js +3 -3
  12. package/dist/lensCoreWasmVersions.js.map +1 -1
  13. package/dist/platform/platformCapabilities.d.ts +0 -1
  14. package/dist/platform/platformCapabilities.d.ts.map +1 -1
  15. package/dist/platform/platformCapabilities.js +2 -4
  16. package/dist/platform/platformCapabilities.js.map +1 -1
  17. package/docs/html/classes/CameraKit.html +2 -2
  18. package/docs/html/classes/CameraKitSession.html +2 -2
  19. package/docs/html/classes/CameraKitSource.html +2 -2
  20. package/docs/html/classes/LensPerformanceMeasurement.html +2 -2
  21. package/docs/html/classes/LensPerformanceMetrics.html +2 -2
  22. package/docs/html/classes/LensRepository.html +2 -2
  23. package/docs/html/classes/Transform2D.html +2 -2
  24. package/docs/html/classes/TypedCustomEvent.html +2 -2
  25. package/docs/html/classes/TypedEventTarget.html +2 -2
  26. package/docs/html/enums/Lens_CameraFacing.html +2 -2
  27. package/docs/html/functions/bootstrapCameraKit.html +2 -2
  28. package/docs/html/functions/createExtension.html +2 -2
  29. package/docs/html/functions/createImageSource.html +2 -2
  30. package/docs/html/functions/createMediaStreamSource.html +2 -2
  31. package/docs/html/functions/createVideoSource.html +2 -2
  32. package/docs/html/functions/estimateLensPerformance.html +2 -2
  33. package/docs/html/functions/filePickerFactory.html +2 -2
  34. package/docs/html/functions/getExtensionRequestContext.html +2 -2
  35. package/docs/html/functions/lensSourcesFactory.html +2 -2
  36. package/docs/html/functions/remoteApiServicesFactory.html +1 -1
  37. package/docs/html/hierarchy.html +1 -1
  38. package/docs/html/index.html +3 -3
  39. package/docs/html/interfaces/BitmojiUserInfo.html +2 -2
  40. package/docs/html/interfaces/CameraKitBootstrapConfiguration.html +2 -2
  41. package/docs/html/interfaces/CameraKitDeviceOptions.html +2 -2
  42. package/docs/html/interfaces/CameraKitSourceInfo.html +2 -2
  43. package/docs/html/interfaces/CameraKitSourceSubscriber.html +2 -2
  44. package/docs/html/interfaces/ComputedFrameMetrics.html +2 -2
  45. package/docs/html/interfaces/CreateSessionOptions.html +2 -2
  46. package/docs/html/interfaces/EstimatedLensPerformance.html +2 -2
  47. package/docs/html/interfaces/Font.html +2 -2
  48. package/docs/html/interfaces/FriendUserInfo.html +2 -2
  49. package/docs/html/interfaces/FunctionSourceOptions.html +2 -2
  50. package/docs/html/interfaces/Keyboard.html +2 -2
  51. package/docs/html/interfaces/KeyboardActiveEvent.html +2 -2
  52. package/docs/html/interfaces/Lens.html +2 -2
  53. package/docs/html/interfaces/LensCreator.html +2 -2
  54. package/docs/html/interfaces/LensHttpRequest.html +2 -2
  55. package/docs/html/interfaces/LensLaunchData.html +2 -2
  56. package/docs/html/interfaces/LensSource.html +2 -2
  57. package/docs/html/interfaces/LensUserData.html +2 -2
  58. package/docs/html/interfaces/LoadAssetRequest.html +2 -2
  59. package/docs/html/interfaces/MediaStreamSourceOptions.html +2 -2
  60. package/docs/html/interfaces/Preview.html +2 -2
  61. package/docs/html/interfaces/RemoteApiRequest.html +2 -2
  62. package/docs/html/interfaces/RemoteApiResponse.html +2 -2
  63. package/docs/html/interfaces/RemoteApiService.html +2 -2
  64. package/docs/html/interfaces/Snapcode.html +2 -2
  65. package/docs/html/interfaces/UriCancelRequest.html +2 -2
  66. package/docs/html/interfaces/UriRequest.html +2 -2
  67. package/docs/html/interfaces/UriResponse.html +2 -2
  68. package/docs/html/interfaces/VideoSourceOptions.html +2 -2
  69. package/docs/html/modules.html +1 -1
  70. package/docs/html/types/ArgumentValidationError.html +2 -2
  71. package/docs/html/types/AssetLoader.html +2 -2
  72. package/docs/html/types/AssetResponse.html +1 -1
  73. package/docs/html/types/AssetTiming.html +2 -2
  74. package/docs/html/types/BenchmarkError.html +1 -1
  75. package/docs/html/types/BootstrapError.html +2 -2
  76. package/docs/html/types/CacheKeyNotFoundError.html +1 -1
  77. package/docs/html/types/CameraKitSessionEventListener.html +2 -2
  78. package/docs/html/types/CameraKitSessionEvents.html +2 -2
  79. package/docs/html/types/CameraKitSourceError.html +1 -1
  80. package/docs/html/types/ConfigurationError.html +2 -2
  81. package/docs/html/types/FetchHandler.html +1 -1
  82. package/docs/html/types/FilePicker.html +2 -2
  83. package/docs/html/types/FilePickerOptions.html +2 -2
  84. package/docs/html/types/FilePickerResult.html +2 -2
  85. package/docs/html/types/KeyboardEventListener.html +2 -2
  86. package/docs/html/types/KeyboardEvents.html +2 -2
  87. package/docs/html/types/LegalError.html +1 -1
  88. package/docs/html/types/LensAbortError.html +2 -2
  89. package/docs/html/types/LensAssetError.html +2 -2
  90. package/docs/html/types/LensContentValidationError.html +1 -1
  91. package/docs/html/types/LensError.html +1 -1
  92. package/docs/html/types/LensExecutionError.html +2 -2
  93. package/docs/html/types/LensHttpHandler.html +2 -2
  94. package/docs/html/types/LensImagePickerError.html +2 -2
  95. package/docs/html/types/LensLaunchParams.html +2 -2
  96. package/docs/html/types/LensMetricsEvents.html +2 -2
  97. package/docs/html/types/LensPerformanceCluster.html +1 -1
  98. package/docs/html/types/LensView.html +2 -2
  99. package/docs/html/types/LensWait.html +2 -2
  100. package/docs/html/types/Matrix.html +2 -2
  101. package/docs/html/types/PersistentStoreError.html +2 -2
  102. package/docs/html/types/PlatformNotSupportedError.html +2 -2
  103. package/docs/html/types/PublicContainer.html +2 -2
  104. package/docs/html/types/PublicServices.html +2 -2
  105. package/docs/html/types/RemoteApiCancelRequestHandler.html +2 -2
  106. package/docs/html/types/RemoteApiRequestHandler.html +2 -2
  107. package/docs/html/types/RemoteApiServices.html +1 -1
  108. package/docs/html/types/RemoteApiStatus.html +2 -2
  109. package/docs/html/types/RenderTarget.html +2 -2
  110. package/docs/html/types/Uri.html +1 -1
  111. package/docs/html/types/WebGLError.html +1 -1
  112. package/docs/html/types/Zodiac.html +1 -1
  113. package/docs/html/variables/extensionRequestContext.html +2 -2
  114. package/docs/md/README.md +2 -2
  115. package/docs/md/classes/CameraKit.md +1 -1
  116. package/docs/md/classes/CameraKitSession.md +1 -1
  117. package/docs/md/classes/CameraKitSource.md +1 -1
  118. package/docs/md/classes/LensPerformanceMeasurement.md +1 -1
  119. package/docs/md/classes/LensPerformanceMetrics.md +1 -1
  120. package/docs/md/classes/LensRepository.md +1 -1
  121. package/docs/md/classes/Transform2D.md +1 -1
  122. package/docs/md/classes/TypedCustomEvent.md +1 -1
  123. package/docs/md/classes/TypedEventTarget.md +1 -1
  124. package/docs/md/enumerations/Lens_CameraFacing.md +1 -1
  125. package/docs/md/functions/bootstrapCameraKit.md +1 -1
  126. package/docs/md/functions/createExtension.md +1 -1
  127. package/docs/md/functions/createImageSource.md +1 -1
  128. package/docs/md/functions/createMediaStreamSource.md +1 -1
  129. package/docs/md/functions/createVideoSource.md +1 -1
  130. package/docs/md/functions/estimateLensPerformance.md +1 -1
  131. package/docs/md/functions/filePickerFactory.md +1 -1
  132. package/docs/md/functions/getExtensionRequestContext.md +1 -1
  133. package/docs/md/functions/lensSourcesFactory.md +1 -1
  134. package/docs/md/functions/remoteApiServicesFactory.md +1 -1
  135. package/docs/md/globals.md +2 -2
  136. package/docs/md/interfaces/BitmojiUserInfo.md +1 -1
  137. package/docs/md/interfaces/CameraKitBootstrapConfiguration.md +1 -1
  138. package/docs/md/interfaces/CameraKitDeviceOptions.md +1 -1
  139. package/docs/md/interfaces/CameraKitSourceInfo.md +1 -1
  140. package/docs/md/interfaces/CameraKitSourceSubscriber.md +1 -1
  141. package/docs/md/interfaces/ComputedFrameMetrics.md +1 -1
  142. package/docs/md/interfaces/CreateSessionOptions.md +1 -1
  143. package/docs/md/interfaces/EstimatedLensPerformance.md +1 -1
  144. package/docs/md/interfaces/Font.md +1 -1
  145. package/docs/md/interfaces/FriendUserInfo.md +1 -1
  146. package/docs/md/interfaces/FunctionSourceOptions.md +1 -1
  147. package/docs/md/interfaces/Keyboard.md +1 -1
  148. package/docs/md/interfaces/KeyboardActiveEvent.md +1 -1
  149. package/docs/md/interfaces/Lens.md +1 -1
  150. package/docs/md/interfaces/LensCreator.md +1 -1
  151. package/docs/md/interfaces/LensHttpRequest.md +1 -1
  152. package/docs/md/interfaces/LensLaunchData.md +1 -1
  153. package/docs/md/interfaces/LensSource.md +1 -1
  154. package/docs/md/interfaces/LensUserData.md +1 -1
  155. package/docs/md/interfaces/LoadAssetRequest.md +1 -1
  156. package/docs/md/interfaces/MediaStreamSourceOptions.md +1 -1
  157. package/docs/md/interfaces/Preview.md +1 -1
  158. package/docs/md/interfaces/RemoteApiRequest.md +1 -1
  159. package/docs/md/interfaces/RemoteApiResponse.md +1 -1
  160. package/docs/md/interfaces/RemoteApiService.md +1 -1
  161. package/docs/md/interfaces/Snapcode.md +1 -1
  162. package/docs/md/interfaces/UriCancelRequest.md +1 -1
  163. package/docs/md/interfaces/UriRequest.md +1 -1
  164. package/docs/md/interfaces/UriResponse.md +1 -1
  165. package/docs/md/interfaces/VideoSourceOptions.md +1 -1
  166. package/docs/md/type-aliases/ArgumentValidationError.md +1 -1
  167. package/docs/md/type-aliases/AssetLoader.md +1 -1
  168. package/docs/md/type-aliases/AssetResponse.md +1 -1
  169. package/docs/md/type-aliases/AssetTiming.md +1 -1
  170. package/docs/md/type-aliases/BenchmarkError.md +1 -1
  171. package/docs/md/type-aliases/BootstrapError.md +1 -1
  172. package/docs/md/type-aliases/CacheKeyNotFoundError.md +1 -1
  173. package/docs/md/type-aliases/CameraKitSessionEventListener.md +1 -1
  174. package/docs/md/type-aliases/CameraKitSessionEvents.md +1 -1
  175. package/docs/md/type-aliases/CameraKitSourceError.md +1 -1
  176. package/docs/md/type-aliases/ConfigurationError.md +1 -1
  177. package/docs/md/type-aliases/FetchHandler.md +1 -1
  178. package/docs/md/type-aliases/FilePicker.md +1 -1
  179. package/docs/md/type-aliases/FilePickerOptions.md +1 -1
  180. package/docs/md/type-aliases/FilePickerResult.md +1 -1
  181. package/docs/md/type-aliases/KeyboardEventListener.md +1 -1
  182. package/docs/md/type-aliases/KeyboardEvents.md +1 -1
  183. package/docs/md/type-aliases/LegalError.md +1 -1
  184. package/docs/md/type-aliases/LensAbortError.md +1 -1
  185. package/docs/md/type-aliases/LensAssetError.md +1 -1
  186. package/docs/md/type-aliases/LensContentValidationError.md +1 -1
  187. package/docs/md/type-aliases/LensError.md +1 -1
  188. package/docs/md/type-aliases/LensExecutionError.md +1 -1
  189. package/docs/md/type-aliases/LensHttpHandler.md +1 -1
  190. package/docs/md/type-aliases/LensImagePickerError.md +1 -1
  191. package/docs/md/type-aliases/LensLaunchParams.md +1 -1
  192. package/docs/md/type-aliases/LensMetricsEvents.md +1 -1
  193. package/docs/md/type-aliases/LensPerformanceCluster.md +1 -1
  194. package/docs/md/type-aliases/LensView.md +1 -1
  195. package/docs/md/type-aliases/LensWait.md +1 -1
  196. package/docs/md/type-aliases/Matrix.md +1 -1
  197. package/docs/md/type-aliases/PersistentStoreError.md +1 -1
  198. package/docs/md/type-aliases/PlatformNotSupportedError.md +1 -1
  199. package/docs/md/type-aliases/PublicContainer.md +1 -1
  200. package/docs/md/type-aliases/PublicServices.md +1 -1
  201. package/docs/md/type-aliases/RemoteApiCancelRequestHandler.md +1 -1
  202. package/docs/md/type-aliases/RemoteApiRequestHandler.md +1 -1
  203. package/docs/md/type-aliases/RemoteApiServices.md +1 -1
  204. package/docs/md/type-aliases/RemoteApiStatus.md +1 -1
  205. package/docs/md/type-aliases/RenderTarget.md +1 -1
  206. package/docs/md/type-aliases/Uri.md +1 -1
  207. package/docs/md/type-aliases/WebGLError.md +1 -1
  208. package/docs/md/type-aliases/Zodiac.md +1 -1
  209. package/docs/md/variables/extensionRequestContext.md +1 -1
  210. package/package.json +2 -2
package/README.md CHANGED
@@ -181,7 +181,7 @@ session.pause('capture');
181
181
 
182
182
  ## Error Handling
183
183
 
184
- Camera Kit Web SDK methods may throw errors, or return rejected Promises -- these are documented in the [API docs](https://kit.snapchat.com/reference/CameraKit/web/1.6.1/index.html). It is good practice to handle such cases, to provide a good experience to your users.
184
+ Camera Kit Web SDK methods may throw errors, or return rejected Promises -- these are documented in the [API docs](https://kit.snapchat.com/reference/CameraKit/web/1.8.0/index.html). It is good practice to handle such cases, to provide a good experience to your users.
185
185
 
186
186
  Errors may also occur during Lens rendering. For example, Lenses contain their own scripting, which could throw an error. A rendering error could also occur if a Lens attempts to use a feature that is not supported by Camera Kit Web SDK.
187
187
 
@@ -1,2 +1,2 @@
1
- export default { PACKAGE_VERSION: "1.6.1" };
1
+ export default { PACKAGE_VERSION: "1.8.0" };
2
2
  //# sourceMappingURL=environment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC","sourcesContent":["export default { PACKAGE_VERSION: \"1.6.1\" };\n"]}
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC","sourcesContent":["export default { PACKAGE_VERSION: \"1.8.0\" };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"retryingHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/retryingHandler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAW,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA0BxF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAElD;AAED,MAAM,WAAW,sBAAsB,CAAC,GAAG;IACvC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,cAAc,EAAE,CAAC,eAAe,EAAE,GAAG,GAAG,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CACjF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,wIA0DjC,CAAC"}
1
+ {"version":3,"file":"retryingHandler.d.ts","sourceRoot":"","sources":["../../src/handlers/retryingHandler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA0B/E;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAElD;AAED,MAAM,WAAW,sBAAsB,CAAC,GAAG;IACvC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,cAAc,EAAE,CAAC,eAAe,EAAE,GAAG,GAAG,KAAK,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;CACjF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,wIA8DjC,CAAC"}
@@ -20,43 +20,43 @@ export function ensureClonedRequest(input) {
20
20
  export const createRetryingHandler = (options = {}) => {
21
21
  const definedOptions = copyDefinedProperties(options);
22
22
  const { backoffMultiple, baseSleep, maxSleep, maxRetries, retryPredicate } = Object.assign(Object.assign({}, defaultOptions), definedOptions);
23
- let retryCount = -1;
24
23
  const jitterSleep = (priorSleep) => __awaiter(void 0, void 0, void 0, function* () {
25
24
  const nextSleep = Math.min(maxSleep, randomInRange(baseSleep, priorSleep * backoffMultiple));
26
25
  yield sleep(nextSleep);
27
26
  return nextSleep;
28
27
  });
29
- const makeRequestAttempt = (next, priorSleep = baseSleep) => (req, metadata) => __awaiter(void 0, void 0, void 0, function* () {
30
- var _a, _b;
31
- retryCount++;
32
- try {
33
- const response = yield next(ensureClonedRequest(req), metadata);
34
- if (retryCount < maxRetries && retryPredicate(response, retryCount)) {
35
- const nextSleep = yield jitterSleep(priorSleep);
36
- if ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.signal) === null || _a === void 0 ? void 0 : _a.aborted)
37
- return response;
38
- logRetry(response, nextSleep);
39
- return makeRequestAttempt(next, nextSleep)(req, metadata);
28
+ return (next) => (req, metadata) => {
29
+ const attemptFn = (priorSleep, retryCount) => (() => __awaiter(void 0, void 0, void 0, function* () {
30
+ var _a, _b;
31
+ try {
32
+ const response = yield next(ensureClonedRequest(req), metadata);
33
+ if (retryCount < maxRetries && retryPredicate(response, retryCount)) {
34
+ const nextSleep = yield jitterSleep(priorSleep);
35
+ if ((_a = metadata === null || metadata === void 0 ? void 0 : metadata.signal) === null || _a === void 0 ? void 0 : _a.aborted)
36
+ return response;
37
+ logRetry(response, nextSleep);
38
+ return attemptFn(nextSleep, retryCount + 1);
39
+ }
40
+ return response;
40
41
  }
41
- return response;
42
- }
43
- catch (error) {
44
- if (!(error instanceof Error)) {
45
- throw new Error("Invalid type caught by retrying handler. Handlers may only throw Errors. Got " +
46
- `${JSON.stringify(error)}`);
47
- }
48
- if (error.name === "AbortError")
49
- throw error;
50
- if (retryCount < maxRetries && retryPredicate(error, retryCount)) {
51
- const nextSleep = yield jitterSleep(priorSleep);
52
- if ((_b = metadata === null || metadata === void 0 ? void 0 : metadata.signal) === null || _b === void 0 ? void 0 : _b.aborted)
42
+ catch (error) {
43
+ if (!(error instanceof Error)) {
44
+ throw new Error("Invalid type caught by retrying handler. Handlers may only throw Errors. Got " +
45
+ `${JSON.stringify(error)}`);
46
+ }
47
+ if (error.name === "AbortError")
53
48
  throw error;
54
- logRetry(error, nextSleep);
55
- return makeRequestAttempt(next, nextSleep)(req, metadata);
49
+ if (retryCount < maxRetries && retryPredicate(error, retryCount)) {
50
+ const nextSleep = yield jitterSleep(priorSleep);
51
+ if ((_b = metadata === null || metadata === void 0 ? void 0 : metadata.signal) === null || _b === void 0 ? void 0 : _b.aborted)
52
+ throw error;
53
+ logRetry(error, nextSleep);
54
+ return attemptFn(nextSleep, retryCount + 1);
55
+ }
56
+ throw error;
56
57
  }
57
- throw error;
58
- }
59
- });
60
- return (next) => makeRequestAttempt(next);
58
+ }))();
59
+ return attemptFn(baseSleep, 0);
60
+ };
61
61
  };
62
62
  //# sourceMappingURL=retryingHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"retryingHandler.js","sourceRoot":"","sources":["../../src/handlers/retryingHandler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,MAAM,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAE5C,MAAM,QAAQ,GAAG,CAAC,eAAoB,EAAE,KAAa,EAAE,EAAE;IACrD,MAAM,CAAC,IAAI,CACP,uCAAuC,EACvC,eAAe,EACf,UAAU,KAAK,gCAAgC,CAClD,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAExF,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE,CAAC,I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;SACf;IACL,CAAC,CAAA,CAAC;IAEN,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC,CAAC","sourcesContent":["import { copyDefinedProperties } from \"../common/copyDefinedProperties\";\nimport { getLogger } from \"../logger/logger\";\nimport type { ChainableHandler, Handler, RequestMetadata } from \"./HandlerChainBuilder\";\n\nconst logger = getLogger(\"retryingHandler\");\n\nconst logRetry = (responseOrError: any, sleep: number) => {\n logger.warn(\n `Retrying handler got failed response:`,\n responseOrError,\n `Waited ${sleep} millis, attempting retry now.`\n );\n};\n\nconst sleep = (millis: number) => new Promise((resolve) => setTimeout(resolve, millis));\n\nconst randomInRange = (min: number, max: number) => Math.round(Math.random() * (max - min) + min);\n\nconst defaultOptions: RetryingHandlerOptions<unknown> = {\n backoffMultiple: 3,\n baseSleep: 500,\n maxSleep: 5 * 1000,\n maxRetries: 10,\n\n // The Response type is very common, so our default predicate special-cases to retry all failed Responses.\n retryPredicate: (responseOrError: unknown) => (responseOrError instanceof Response ? !responseOrError.ok : true),\n};\n\n/**\n * Returns a cloned instance of Request if the input is of that type, otherwise returns the input unchanged.\n *\n * This is necessary when attempting to retry a request.\n * It is not possible to reuse the same Request instance that has already been sent.\n */\nexport function ensureClonedRequest<T>(input: T): T {\n return input instanceof Request ? (input.clone() as T) : input;\n}\n\nexport interface RetryingHandlerOptions<Req> {\n /**\n * Multiple used to increase the random backoff between attempts. Default is 3, usually doesn't need to be changed.\n */\n backoffMultiple: number;\n\n /**\n * The minimum number of milliseconds to sleep between attempts.\n *\n * The actual number of milliseconds slept between attempts is chosen at random.\n */\n baseSleep: number;\n\n /**\n * The maximum number of milliseconds to sleep between attempts. Note that this is not a timeout -- if multiple\n * request attempts are made, the total request latency will be longer than this.\n *\n * The actual number of milliseconds slept between attempts is chosen at random.\n */\n maxSleep: number;\n\n /**\n * The maximum number of retry attempts. The initial request is not counted against this number.\n */\n maxRetries: number;\n\n /**\n * Determine if a given error is retryable. If `false` is returned, the error will be passed up to the Handler's\n * caller and no additional retry attempts will be made.\n */\n retryPredicate: (responseOrError: Req | Error, retryCount: number) => boolean;\n}\n\n/**\n * Retry requests using an exponential backoff with jitter strategy.\n *\n * More about this approach to retries can be found\n * [here](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/). This implementation uses the\n * \"Decorrelated jitter\" algorithm described in that post. This offers a good tradeoff between call volume and latency,\n * and also allows for convenient configurability.\n *\n * @param options\n * @returns {@link ChainableHandler}, suitable for use in {@link HandlerChainBuilder.map}\n */\nexport const createRetryingHandler = <Req, Res, Meta extends RequestMetadata>(\n options: Partial<RetryingHandlerOptions<Res>> = {}\n): ChainableHandler<Req, Res, Req, Res, Meta> => {\n const definedOptions = copyDefinedProperties(options);\n const { backoffMultiple, baseSleep, maxSleep, maxRetries, retryPredicate } = {\n ...defaultOptions,\n ...definedOptions,\n };\n let retryCount = -1;\n\n const jitterSleep = async (priorSleep: number) => {\n const nextSleep = Math.min(maxSleep, randomInRange(baseSleep, priorSleep * backoffMultiple));\n await sleep(nextSleep);\n return nextSleep;\n };\n\n const makeRequestAttempt =\n (next: Handler<Req, Res, Meta>, priorSleep = baseSleep) =>\n async (req: Req, metadata?: Meta): Promise<Res> => {\n retryCount++;\n\n try {\n const response = await next(ensureClonedRequest(req), metadata);\n if (retryCount < maxRetries && retryPredicate(response, retryCount)) {\n const nextSleep = await jitterSleep(priorSleep);\n // The request may have been aborted while we were sleeping. In that case, we'll resolve\n // with the failed response. In many cases this will be ignored, because an AbortError has already\n // been returned to the caller of the Handler chain – but this prevents us from doing\n // any extra work, and there may be edge cases where the caller could find the response useful.\n if (metadata?.signal?.aborted) return response;\n logRetry(response, nextSleep);\n return makeRequestAttempt(next, nextSleep)(req, metadata);\n }\n return response;\n } catch (error) {\n if (!(error instanceof Error)) {\n throw new Error(\n \"Invalid type caught by retrying handler. Handlers may only throw Errors. Got \" +\n `${JSON.stringify(error)}`\n );\n }\n\n // If the request fails because it was aborted, we assume this was done intentionally and we can stop.\n if (error.name === \"AbortError\") throw error;\n\n if (retryCount < maxRetries && retryPredicate(error, retryCount)) {\n const nextSleep = await jitterSleep(priorSleep);\n if (metadata?.signal?.aborted) throw error;\n logRetry(error, nextSleep);\n return makeRequestAttempt(next, nextSleep)(req, metadata);\n }\n\n // If no retry is to be attempted, return the error to the caller.\n throw error;\n }\n };\n\n return (next) => makeRequestAttempt(next);\n};\n"]}
1
+ {"version":3,"file":"retryingHandler.js","sourceRoot":"","sources":["../../src/handlers/retryingHandler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,MAAM,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAE5C,MAAM,QAAQ,GAAG,CAAC,eAAoB,EAAE,KAAa,EAAE,EAAE;IACrD,MAAM,CAAC,IAAI,CACP,uCAAuC,EACvC,eAAe,EACf,UAAU,KAAK,gCAAgC,CAClD,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAExF,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AAElG,MAAM,cAAc,GAAoC;IACpD,eAAe,EAAE,CAAC;IAClB,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,CAAC,GAAG,IAAI;IAClB,UAAU,EAAE,EAAE;IAGd,cAAc,EAAE,CAAC,eAAwB,EAAE,EAAE,CAAC,CAAC,eAAe,YAAY,QAAQ,CAAC,CAAC,CA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wBAAE,OAAO,QAAQ,CAAC;oBAC/C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;oBAC9B,OAAO,SAAS,CAAC,SAAS,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;iBAC/C;gBACD,OAAO,QAAQ,CAAC;aACnB;YAAC,OAAO,KAAK,EAAE;gBACZ,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,EAAE;oBAC3B,MAAM,IAAI,KAAK,CACX,+EAA+E;wBAC3E,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CACjC,CAAC;iBACL;gBAID,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY;oBAAE,MAAM,KAAK,CAAC;gBAE7C,IAAI,UAAU,GAAG,UAAU,IAAI,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE;oBAC9D,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,UAAU,CAAC,CAAC;oBAChD,IAAI,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,0CAAE,OAAO;wBAAE,MAAM,KAAK,CAAC;oBAC3C,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;oBAC3B,OAAO,SAAS,CAAC,SAAS,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;iBAC/C;gBAGD,MAAM,KAAK,CAAC;aACf;QACL,CAAC,CAAA,CAAC,EAAE,CAAC;QAGT,OAAO,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;AACV,CAAC,CAAC","sourcesContent":["import { copyDefinedProperties } from \"../common/copyDefinedProperties\";\nimport { getLogger } from \"../logger/logger\";\nimport type { ChainableHandler, RequestMetadata } from \"./HandlerChainBuilder\";\n\nconst logger = getLogger(\"retryingHandler\");\n\nconst logRetry = (responseOrError: any, sleep: number) => {\n logger.warn(\n `Retrying handler got failed response:`,\n responseOrError,\n `Waited ${sleep} millis, attempting retry now.`\n );\n};\n\nconst sleep = (millis: number) => new Promise((resolve) => setTimeout(resolve, millis));\n\nconst randomInRange = (min: number, max: number) => Math.round(Math.random() * (max - min) + min);\n\nconst defaultOptions: RetryingHandlerOptions<unknown> = {\n backoffMultiple: 3,\n baseSleep: 500,\n maxSleep: 5 * 1000,\n maxRetries: 10,\n\n // The Response type is very common, so our default predicate special-cases to retry all failed Responses.\n retryPredicate: (responseOrError: unknown) => (responseOrError instanceof Response ? !responseOrError.ok : true),\n};\n\n/**\n * Returns a cloned instance of Request if the input is of that type, otherwise returns the input unchanged.\n *\n * This is necessary when attempting to retry a request.\n * It is not possible to reuse the same Request instance that has already been sent.\n */\nexport function ensureClonedRequest<T>(input: T): T {\n return input instanceof Request ? (input.clone() as T) : input;\n}\n\nexport interface RetryingHandlerOptions<Req> {\n /**\n * Multiple used to increase the random backoff between attempts. Default is 3, usually doesn't need to be changed.\n */\n backoffMultiple: number;\n\n /**\n * The minimum number of milliseconds to sleep between attempts.\n *\n * The actual number of milliseconds slept between attempts is chosen at random.\n */\n baseSleep: number;\n\n /**\n * The maximum number of milliseconds to sleep between attempts. Note that this is not a timeout -- if multiple\n * request attempts are made, the total request latency will be longer than this.\n *\n * The actual number of milliseconds slept between attempts is chosen at random.\n */\n maxSleep: number;\n\n /**\n * The maximum number of retry attempts. The initial request is not counted against this number.\n */\n maxRetries: number;\n\n /**\n * Determine if a given error is retryable. If `false` is returned, the error will be passed up to the Handler's\n * caller and no additional retry attempts will be made.\n */\n retryPredicate: (responseOrError: Req | Error, retryCount: number) => boolean;\n}\n\n/**\n * Retry requests using an exponential backoff with jitter strategy.\n *\n * More about this approach to retries can be found\n * [here](https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/). This implementation uses the\n * \"Decorrelated jitter\" algorithm described in that post. This offers a good tradeoff between call volume and latency,\n * and also allows for convenient configurability.\n *\n * @param options\n * @returns {@link ChainableHandler}, suitable for use in {@link HandlerChainBuilder.map}\n */\nexport const createRetryingHandler = <Req, Res, Meta extends RequestMetadata>(\n options: Partial<RetryingHandlerOptions<Res>> = {}\n): ChainableHandler<Req, Res, Req, Res, Meta> => {\n const definedOptions = copyDefinedProperties(options);\n const { backoffMultiple, baseSleep, maxSleep, maxRetries, retryPredicate } = {\n ...defaultOptions,\n ...definedOptions,\n };\n\n const jitterSleep = async (priorSleep: number) => {\n const nextSleep = Math.min(maxSleep, randomInRange(baseSleep, priorSleep * backoffMultiple));\n await sleep(nextSleep);\n return nextSleep;\n };\n\n return (next) =>\n /* this wrapper is created once, but returns a fresh attemptFn for every call */\n (req: Req, metadata?: Meta): Promise<Res> => {\n // start a brand-new counter for *this* request\n const attemptFn = (priorSleep: number, retryCount: number): Promise<Res> =>\n (async () => {\n try {\n const response = await next(ensureClonedRequest(req), metadata);\n if (retryCount < maxRetries && retryPredicate(response, retryCount)) {\n const nextSleep = await jitterSleep(priorSleep);\n // The request may have been aborted while we were sleeping. In that case, we'll resolve\n // with the failed response. In many cases this will be ignored,\n // because an AbortError has already been returned to the caller of the Handler chain – but\n // this prevents us from doing any extra work,\n // and there may be edge cases where the caller could find the response useful.\n if (metadata?.signal?.aborted) return response;\n logRetry(response, nextSleep);\n return attemptFn(nextSleep, retryCount + 1);\n }\n return response;\n } catch (error) {\n if (!(error instanceof Error)) {\n throw new Error(\n \"Invalid type caught by retrying handler. Handlers may only throw Errors. Got \" +\n `${JSON.stringify(error)}`\n );\n }\n\n // If the request fails because it was aborted,\n // we assume this was done intentionally and we can stop.\n if (error.name === \"AbortError\") throw error;\n\n if (retryCount < maxRetries && retryPredicate(error, retryCount)) {\n const nextSleep = await jitterSleep(priorSleep);\n if (metadata?.signal?.aborted) throw error;\n logRetry(error, nextSleep);\n return attemptFn(nextSleep, retryCount + 1);\n }\n\n // If no retry is to be attempted, return the error to the caller.\n throw error;\n }\n })();\n\n // first attempt: priorSleep = baseSleep, retryCount = 0\n return attemptFn(baseSleep, 0);\n };\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { WasmFeatures } from "../../platform/platformCapabilities";
2
- export declare function getBuildFlavor({ simd, exceptionHandling, relaxedSimd }: WasmFeatures, buildNumber: string): "release" | "rel-relaxed-simd-neh" | "rel-simd-neh" | "release-simd" | "rel-neh";
2
+ export declare function getBuildFlavor({ simd, relaxedSimd }: WasmFeatures, versionNumber: string): "rel-relaxed-simd-neh" | "rel-simd-neh" | "rel-neh";
3
3
  /**
4
4
  * Returns a list of URLs for resources which will be fetched during {@link bootstrapCameraKit}.
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrapURLs.d.ts","sourceRoot":"","sources":["../../../src/lens-core-module/loader/bootstrapURLs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAMxE,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,oFAsBzG;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAgB3F"}
1
+ {"version":3,"file":"bootstrapURLs.d.ts","sourceRoot":"","sources":["../../../src/lens-core-module/loader/bootstrapURLs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAMxE,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,uDAYxF;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,wBAAwB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAgB3F"}
@@ -2,24 +2,16 @@ import { __awaiter } from "tslib";
2
2
  import { getPlatformCapabilities } from "../../platform/platformCapabilities";
3
3
  import { getPlatformInfo } from "../../platform/platformInfo";
4
4
  const wasmAssets = ["LensCoreWebAssembly.js", "LensCoreWebAssembly.wasm"];
5
- export function getBuildFlavor({ simd, exceptionHandling, relaxedSimd }, buildNumber) {
6
- const relaxedBuildAvailable = parseInt(buildNumber) >= Number.MAX_SAFE_INTEGER;
5
+ export function getBuildFlavor({ simd, relaxedSimd }, versionNumber) {
6
+ const relaxedBuildAvailable = parseInt(versionNumber) >= 282;
7
7
  if (relaxedBuildAvailable && relaxedSimd) {
8
8
  return "rel-relaxed-simd-neh";
9
9
  }
10
10
  else if (simd) {
11
- if (exceptionHandling) {
12
- return "rel-simd-neh";
13
- }
14
- else {
15
- return "release-simd";
16
- }
17
- }
18
- else if (exceptionHandling) {
19
- return "rel-neh";
11
+ return "rel-simd-neh";
20
12
  }
21
13
  else {
22
- return "release";
14
+ return "rel-neh";
23
15
  }
24
16
  }
25
17
  export function getRequiredBootstrapURLs(endpointOverride) {
@@ -31,7 +23,7 @@ export function getRequiredBootstrapURLs(endpointOverride) {
31
23
  const { lensCore } = getPlatformInfo();
32
24
  const version = lensCore.version;
33
25
  const buildNumber = lensCore.buildNumber;
34
- const flavor = getBuildFlavor(wasm.wasmFeatures, buildNumber);
26
+ const flavor = getBuildFlavor(wasm.wasmFeatures, version);
35
27
  return wasmAssets.map((asset) => {
36
28
  if (endpoint)
37
29
  return `${endpoint}/${asset}`;
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrapURLs.js","sourceRoot":"","sources":["../../../src/lens-core-module/loader/bootstrapURLs.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,UAAU,GAAG,CAAC,wBAAwB,EAAE,0BAA0B,CAAC,CAAC;AAE1E,MAAM,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAgB,EAAE,WAAmB;IAQtG,MAAM,qBAAqB,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,MAAM,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AC;CAAA","sourcesContent":["import type { WasmFeatures } from \"../../platform/platformCapabilities\";\nimport { getPlatformCapabilities } from \"../../platform/platformCapabilities\";\nimport { getPlatformInfo } from \"../../platform/platformInfo\";\n\nconst wasmAssets = [\"LensCoreWebAssembly.js\", \"LensCoreWebAssembly.wasm\"];\n\nexport function getBuildFlavor({ simd, exceptionHandling, relaxedSimd }: WasmFeatures, buildNumber: string) {\n // Starting from build {!!TODO: UPDATE WITH ACTUAL NUMBER!!}, LensCore now includes relaxed builds.\n // We need to check for this because we allow customization of Camera Kit\n // with any LensCore builds, which may not include a relaxed build.\n // TODO: https://jira.sc-corp.net/browse/CAMKIT-6390\n // Due to bug https://jira.sc-corp.net/browse/CAMKIT-6455, we decided to rollback emscripten,\n // which allowed us to have relaxed builds. Once the bug is addressed and relaxed builds are available\n // update the check below with actual LensCore build number.\n const relaxedBuildAvailable = parseInt(buildNumber) >= Number.MAX_SAFE_INTEGER;\n if (relaxedBuildAvailable && relaxedSimd) {\n return \"rel-relaxed-simd-neh\";\n } else if (simd) {\n if (exceptionHandling) {\n return \"rel-simd-neh\";\n } else {\n return \"release-simd\";\n }\n } else if (exceptionHandling) {\n return \"rel-neh\";\n } else {\n return \"release\";\n }\n}\n\n/**\n * Returns a list of URLs for resources which will be fetched during {@link bootstrapCameraKit}.\n *\n * When CameraKit is used on a website, these URLs must be reachable in order for CameraKit to be successfully\n * bootstrapped.\n *\n * @param endpointOverride Optional endpoint override to load the assets from.\n * @returns An array of asset URLs.\n *\n * @category Bootstrapping and Configuration\n */\nexport async function getRequiredBootstrapURLs(endpointOverride?: string): Promise<string[]> {\n // If we have an endpoint override, remove trailing `/` so we can construct a valid URL.\n const endpoint = endpointOverride?.replace(/[\\/]+$/, \"\");\n\n const { wasm } = await getPlatformCapabilities();\n if (!wasm.supported) throw wasm.error;\n\n const { lensCore } = getPlatformInfo();\n const version = lensCore.version;\n const buildNumber = lensCore.buildNumber;\n const flavor = getBuildFlavor(wasm.wasmFeatures, buildNumber);\n return wasmAssets.map((asset) => {\n if (endpoint) return `${endpoint}/${asset}`;\n const { origin, pathname, search } = new URL(lensCore.baseUrl);\n return `${origin}${pathname}/${version}/${buildNumber}/${flavor}/${asset}${search}`;\n });\n}\n"]}
1
+ {"version":3,"file":"bootstrapURLs.js","sourceRoot":"","sources":["../../../src/lens-core-module/loader/bootstrapURLs.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,UAAU,GAAG,CAAC,wBAAwB,EAAE,0BAA0B,CAAC,CAAC;AAE1E,MAAM,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE,WAAW,EAAgB,EAAE,aAAqB;IAIrF,MAAM,qBAAqB,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,GAAG,CAAC;IAC7D,IAAI,qBAAqB,IAAI,WAAW,EAAE;QACtC,OAAO,sBAAsB,CAAC;KACjC;SAAM,IAAI,IAAI,EAAE;QACb,OAAO,cAAc,CAAC;KACzB;SAAM;QACH,OAAO,SAAS,CAAC;KACpB;AACL,CAAC;AAaD,MAAM,UAAgB,wBAAwB,CAAC,gBAAyB;;QAEpE,MAAM,QAAQ,GAAG,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAEzD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,uBAAuB,EAAE,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,MAAM,IAAI,CAAC,KAAK,CAAC;QAEtC,MAAM,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC;QACjC,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,CAAC;QACzC,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC1D,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC5B,IAAI,QAAQ;gBAAE,OAAO,GAAG,QAAQ,IAAI,KAAK,EAAE,CAAC;YAC5C,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAC/D,OAAO,GAAG,MAAM,GAAG,QAAQ,IAAI,OAAO,IAAI,WAAW,IAAI,MAAM,IAAI,KAAK,GAAG,MAAM,EAAE,CAAC;QACxF,CAAC,CAAC,CAAC;IACP,CAAC;CAAA","sourcesContent":["import type { WasmFeatures } from \"../../platform/platformCapabilities\";\nimport { getPlatformCapabilities } from \"../../platform/platformCapabilities\";\nimport { getPlatformInfo } from \"../../platform/platformInfo\";\n\nconst wasmAssets = [\"LensCoreWebAssembly.js\", \"LensCoreWebAssembly.wasm\"];\n\nexport function getBuildFlavor({ simd, relaxedSimd }: WasmFeatures, versionNumber: string) {\n // Starting from approx build 282, LensCore now includes relaxed builds.\n // We need to check for this because we allow customization of Camera Kit\n // with any LensCore builds, which may not include a relaxed build.\n const relaxedBuildAvailable = parseInt(versionNumber) >= 282;\n if (relaxedBuildAvailable && relaxedSimd) {\n return \"rel-relaxed-simd-neh\";\n } else if (simd) {\n return \"rel-simd-neh\";\n } else {\n return \"rel-neh\";\n }\n}\n\n/**\n * Returns a list of URLs for resources which will be fetched during {@link bootstrapCameraKit}.\n *\n * When CameraKit is used on a website, these URLs must be reachable in order for CameraKit to be successfully\n * bootstrapped.\n *\n * @param endpointOverride Optional endpoint override to load the assets from.\n * @returns An array of asset URLs.\n *\n * @category Bootstrapping and Configuration\n */\nexport async function getRequiredBootstrapURLs(endpointOverride?: string): Promise<string[]> {\n // If we have an endpoint override, remove trailing `/` so we can construct a valid URL.\n const endpoint = endpointOverride?.replace(/[\\/]+$/, \"\");\n\n const { wasm } = await getPlatformCapabilities();\n if (!wasm.supported) throw wasm.error;\n\n const { lensCore } = getPlatformInfo();\n const version = lensCore.version;\n const buildNumber = lensCore.buildNumber;\n const flavor = getBuildFlavor(wasm.wasmFeatures, version);\n return wasmAssets.map((asset) => {\n if (endpoint) return `${endpoint}/${asset}`;\n const { origin, pathname, search } = new URL(lensCore.baseUrl);\n return `${origin}${pathname}/${version}/${buildNumber}/${flavor}/${asset}${search}`;\n });\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  export default {
2
- version: "313",
3
- buildNumber: "629",
4
- baseUrl: "https://cf-st.sc-cdn.net/d/0HAchv75u9EAJsMvZsIut?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92",
2
+ version: "321",
3
+ buildNumber: "f0dcf22e9e600f2f958cb3d88e7e3382d61a3c7b",
4
+ baseUrl: "https://cf-st.sc-cdn.net/d/kBNrxHyWHvtw40dRbIB7O?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92",
5
5
  };
6
6
  //# sourceMappingURL=lensCoreWasmVersions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lensCoreWasmVersions.js","sourceRoot":"","sources":["../src/lensCoreWasmVersions.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,KAAK;IAClB,OAAO,EAAE,oFAAoF;CAChG,CAAC","sourcesContent":["export default {\n version: \"313\",\n buildNumber: \"629\",\n baseUrl: \"https://cf-st.sc-cdn.net/d/0HAchv75u9EAJsMvZsIut?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92\",\n};\n"]}
1
+ {"version":3,"file":"lensCoreWasmVersions.js","sourceRoot":"","sources":["../src/lensCoreWasmVersions.ts"],"names":[],"mappings":"AAAA,eAAe;IACX,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,0CAA0C;IACvD,OAAO,EAAE,oFAAoF;CAChG,CAAC","sourcesContent":["export default {\n version: \"321\",\n buildNumber: \"f0dcf22e9e600f2f958cb3d88e7e3382d61a3c7b\",\n baseUrl: \"https://cf-st.sc-cdn.net/d/kBNrxHyWHvtw40dRbIB7O?go=IgsKCTIBBEgBUFxgAQ%3D%3D&uc=92\",\n};\n"]}
@@ -15,7 +15,6 @@ type WebGlCapability = Capability<{
15
15
  }>;
16
16
  export interface WasmFeatures {
17
17
  simd: boolean;
18
- exceptionHandling: boolean;
19
18
  relaxedSimd: boolean;
20
19
  }
21
20
  type WasmCapability = Capability<{
@@ -1 +1 @@
1
- {"version":3,"file":"platformCapabilities.d.ts","sourceRoot":"","sources":["../../src/platform/platformCapabilities.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAI1E,gBAAgB;AAChB,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,SAAS,EAAE,IAAI,CAAA;CAAE,CAAC;AAC7D,gBAAgB;AAChB,MAAM,MAAM,qBAAqB,GAAG;IAAE,SAAS,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC;AACvE,gBAAgB;AAChB,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC;AAMlF,KAAK,eAAe,GAAG,UAAU,CAAC;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AA8C9D,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,iBAAiB,EAAE,OAAO,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;CACxB;AAED,KAAK,cAAc,GAAG,UAAU,CAAC;IAC7B,YAAY,EAAE,YAAY,CAAC;CAC9B,CAAC,CAAC;AAwCH,KAAK,eAAe,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAalD;;;;;GAKG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,eAAe,CAAC,CAuBrE;AAED,gBAAgB;AA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;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,6CAAqD,QAAQ,oBAAoB,CAAC,CAMpH,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { __awaiter } from "tslib";
2
- import { exceptions as getExceptions, simd as getSimd, relaxedSimd as getRelaxedSimd } from "wasm-feature-detect";
2
+ import { simd as getSimd, relaxedSimd as getRelaxedSimd } from "wasm-feature-detect";
3
3
  import { memoize } from "../common/memoize";
4
4
  import { platformNotSupportedError } from "../namedErrors";
5
5
  import { getPlatformInfo } from "./platformInfo";
@@ -35,20 +35,18 @@ function getWebAssemblyCapabilities() {
35
35
  supported: false,
36
36
  error: platformNotSupportedError("CameraKit requires WebAssembly, but this browser does not support WebAssembly."),
37
37
  };
38
- const [simd, exceptionHandling, relaxedSimd] = yield Promise.all([
38
+ const [simd, relaxedSimd] = yield Promise.all([
39
39
  getSimd().then((simd) => {
40
40
  if (getPlatformInfo().browser.brand === "Safari")
41
41
  return false;
42
42
  return simd;
43
43
  }),
44
- getExceptions(),
45
44
  getRelaxedSimd(),
46
45
  ]);
47
46
  return {
48
47
  supported: true,
49
48
  wasmFeatures: {
50
49
  simd,
51
- exceptionHandling,
52
50
  relaxedSimd,
53
51
  },
54
52
  };
@@ -1 +1 @@
1
- {"version":3,"file":"platformCapabilities.js","sourceRoot":"","sources":["../../src/platform/platformCapabilities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,IAAI,IAAI,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAClH,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAmBjD,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAOvC,SAAS,eAAe;;IACpB,MAAM,GAAG,GAAG,MAAA,UAAU,CAAC,Q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oBAAoB,EAAE;SACtC,CAAC;IACN,CAAC;CAAA,CAAC,CAAC","sourcesContent":["import { exceptions as getExceptions, simd as getSimd, relaxedSimd as getRelaxedSimd } from \"wasm-feature-detect\";\nimport { memoize } from \"../common/memoize\";\nimport type { XrCapabilities } from \"../lens-core-module/generated-types\";\nimport { platformNotSupportedError } from \"../namedErrors\";\nimport { getPlatformInfo } from \"./platformInfo\";\n\n/** @internal */\nexport type SupportedCapability<T> = T & { supported: true };\n/** @internal */\nexport type UnsupportedCapability = { supported: false; error: Error };\n/** @internal */\nexport type Capability<T = void> = SupportedCapability<T> | UnsupportedCapability;\n\n//-----------\n// WebGL\n//-----------\n\ntype WebGlCapability = Capability<{ maxTextureSize: number }>;\n\n// This required minimum max texture size is based on data from\n// https://web3dsurvey.com/webgl/parameters/MAX_TEXTURE_SIZE. Checking for a reasonable minimum MAX_TEXTURE_SIZE avoids\n// attempting to run lenses on platforms that will not support them -- most commonly, we've seen some platforms that\n// report 0 MAX_TEXTURE_SIZE, which will cause errors for all lenses.\nconst minRequiredMaxTextureSize = 1024;\n\n/**\n * @returns An object with fields describing support for various WebGL features.\n *\n * @internal\n */\nfunction getWebGlSupport(): WebGlCapability {\n const ctx = globalThis.document?.createElement(\"canvas\").getContext(\"webgl2\");\n if (!ctx) {\n const cause = globalThis.document?.createElement(\"canvas\").getContext(\"webgl\")\n ? \"platform_not_supported_only_webgl1\"\n : typeof globalThis.WebGLRenderingContext === \"function\"\n ? \"platform_not_supported_likely_no_hw_accel\"\n : \"platform_not_supported_no_webgl_browser_support\";\n return {\n supported: false,\n error: platformNotSupportedError(\n \"CameraKit requires WebGL2, but this browser does not support WebGL2.\",\n new Error(cause)\n ),\n };\n }\n const maxTextureSize = ctx.getParameter(ctx.MAX_TEXTURE_SIZE);\n const supported = maxTextureSize >= minRequiredMaxTextureSize;\n return supported\n ? { supported, maxTextureSize }\n : {\n supported,\n error: platformNotSupportedError(\n `CameraKit requires WebGL's MAX_TEXTURE_SIZE exceed a minimum value of ` +\n `${minRequiredMaxTextureSize}, but the browser's reported MAX_TEXTURE_SIZE is ${maxTextureSize}.`\n ),\n };\n}\n\n//-----------\n// WASM\n//-----------\n\nexport interface WasmFeatures {\n simd: boolean;\n exceptionHandling: boolean;\n relaxedSimd: boolean;\n}\n\ntype WasmCapability = Capability<{\n wasmFeatures: WasmFeatures;\n}>;\n\n/**\n * @returns A non-negative integer representing the combination of supported WebAssembly features, or -1 if WebAssembly\n * is not supported at all.\n *\n * @internal\n */\nasync function getWebAssemblyCapabilities(): Promise<WasmCapability> {\n if (globalThis.WebAssembly === undefined)\n return {\n supported: false,\n error: platformNotSupportedError(\n \"CameraKit requires WebAssembly, but this browser does not support WebAssembly.\"\n ),\n };\n const [simd, exceptionHandling, relaxedSimd] = await Promise.all([\n getSimd().then((simd) => {\n // Although Safari 16.4 reports SIMD support, LensCore encounters rendering bugs when using\n // SIMD in Safari 16.4. We will disable SIMD for now until Safari stabilizes the feature.\n if (getPlatformInfo().browser.brand === \"Safari\") return false;\n return simd;\n }),\n getExceptions(),\n getRelaxedSimd(),\n ]);\n return {\n supported: true,\n wasmFeatures: {\n simd,\n exceptionHandling,\n relaxedSimd,\n },\n };\n}\n\n//-----------\n// WebXR\n//-----------\n\ntype WebXrCapability = Capability<XrCapabilities>;\n\nfunction getGenericWebXrNotSupported(cause?: unknown): WebXrCapability {\n return {\n supported: false,\n error: platformNotSupportedError(\n `Use of this feature requires WebXR support for immersive AR sessions, but ` +\n `this browser does not support immersive AR sessions.`,\n cause\n ),\n };\n}\n\n/**\n * @returns A Promise containing an object with fields describing the support of various WebXR features. This object's\n * type is defined by LensCore, as they consume these capabilities and adjust behavior accordingly.\n *\n * @internal\n */\nexport async function getWebXrCapabilities(): Promise<WebXrCapability> {\n try {\n if (!isSecureContext || !navigator.xr) return getGenericWebXrNotSupported();\n const isImmersiveArSupported = await navigator.xr.isSessionSupported(\"immersive-ar\");\n return isImmersiveArSupported\n ? {\n supported: true,\n sixDofSupported: true,\n sceneDepthSupported: true,\n }\n : getGenericWebXrNotSupported();\n } catch (error) {\n if (error instanceof Error && error.name === \"SecurityError\") {\n return {\n supported: false,\n error: platformNotSupportedError(\n \"Failed to check XR capabilities due to permissions or other issues.\",\n error\n ),\n };\n }\n return getGenericWebXrNotSupported(error);\n }\n}\n\n/** @internal */\nexport interface PlatformCapabilities {\n webgl: WebGlCapability;\n wasm: WasmCapability;\n webxr: WebXrCapability;\n}\n\n/**\n * Get information about the current platform capabilities, including:\n * - WebGL support and various WebGL parameters.\n * - WASM support and support for various WASM features.\n * - WebXR support and support for various WebXR features.\n *\n * @internal\n */\nexport const getPlatformCapabilities = memoize(async function getPlatformCapabilities(): Promise<PlatformCapabilities> {\n return {\n webgl: getWebGlSupport(),\n wasm: await getWebAssemblyCapabilities(),\n webxr: await getWebXrCapabilities(),\n };\n});\n"]}
1
+ {"version":3,"file":"platformCapabilities.js","sourceRoot":"","sources":["../../src/platform/platformCapabilities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAmBjD,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAOvC,SAAS,eAAe;;IACpB,MAAM,GAAG,GAAG,MAAA,UAAU,CAAC,QAAQ,0CAAE,aAAa,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC9E,IAAI,CAAC,GAAG,EAAE;QACN,MAAM,KAAK,GAAG,CAAA,MAAA,UAAU,CAAC,QAAQ,0CAAE,aAAa,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC;YAC1E,CAAC,CAAC,oCAAoC;YACtC,CAAC,CAAC,OAAO,UAAU,CAAC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B,CAC5B,4EAA4E;YACxE,sDAAsD,EAC1D,KAAK,CACR;KACJ,CAAC;AACN,CAAC;AAQD,MAAM,UAAgB,oBAAoB;;QACtC,IAAI;YACA,IAAI,CAAC,eAAe,IAAI,CAAC,SAAS,CAAC,EAAE;gBAAE,OAAO,2BAA2B,EAAE,CAAC;YAC5E,MAAM,sBAAsB,GAAG,MAAM,SAAS,CAAC,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;YACrF,OAAO,sBAAsB;gBACzB,CAAC,CAAC;oBACI,SAAS,EAAE,IAAI;oBACf,eAAe,EAAE,IAAI;oBACrB,mBAAmB,EAAE,IAAI;iBAC5B;gBACH,CAAC,CAAC,2BAA2B,EAAE,CAAC;SACvC;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe,EAAE;gBAC1D,OAAO;oBACH,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,yBAAyB,CAC5B,qEAAqE,EACrE,KAAK,CACR;iBACJ,CAAC;aACL;YACD,OAAO,2BAA2B,CAAC,KAAK,CAAC,CAAC;SAC7C;IACL,CAAC;CAAA;AAiBD,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC,SAAe,uBAAuB;;QACjF,OAAO;YACH,KAAK,EAAE,eAAe,EAAE;YACxB,IAAI,EAAE,MAAM,0BAA0B,EAAE;YACxC,KAAK,EAAE,MAAM,oBAAoB,EAAE;SACtC,CAAC;IACN,CAAC;CAAA,CAAC,CAAC","sourcesContent":["import { simd as getSimd, relaxedSimd as getRelaxedSimd } from \"wasm-feature-detect\";\nimport { memoize } from \"../common/memoize\";\nimport type { XrCapabilities } from \"../lens-core-module/generated-types\";\nimport { platformNotSupportedError } from \"../namedErrors\";\nimport { getPlatformInfo } from \"./platformInfo\";\n\n/** @internal */\nexport type SupportedCapability<T> = T & { supported: true };\n/** @internal */\nexport type UnsupportedCapability = { supported: false; error: Error };\n/** @internal */\nexport type Capability<T = void> = SupportedCapability<T> | UnsupportedCapability;\n\n//-----------\n// WebGL\n//-----------\n\ntype WebGlCapability = Capability<{ maxTextureSize: number }>;\n\n// This required minimum max texture size is based on data from\n// https://web3dsurvey.com/webgl/parameters/MAX_TEXTURE_SIZE. Checking for a reasonable minimum MAX_TEXTURE_SIZE avoids\n// attempting to run lenses on platforms that will not support them -- most commonly, we've seen some platforms that\n// report 0 MAX_TEXTURE_SIZE, which will cause errors for all lenses.\nconst minRequiredMaxTextureSize = 1024;\n\n/**\n * @returns An object with fields describing support for various WebGL features.\n *\n * @internal\n */\nfunction getWebGlSupport(): WebGlCapability {\n const ctx = globalThis.document?.createElement(\"canvas\").getContext(\"webgl2\");\n if (!ctx) {\n const cause = globalThis.document?.createElement(\"canvas\").getContext(\"webgl\")\n ? \"platform_not_supported_only_webgl1\"\n : typeof globalThis.WebGLRenderingContext === \"function\"\n ? \"platform_not_supported_likely_no_hw_accel\"\n : \"platform_not_supported_no_webgl_browser_support\";\n return {\n supported: false,\n error: platformNotSupportedError(\n \"CameraKit requires WebGL2, but this browser does not support WebGL2.\",\n new Error(cause)\n ),\n };\n }\n const maxTextureSize = ctx.getParameter(ctx.MAX_TEXTURE_SIZE);\n const supported = maxTextureSize >= minRequiredMaxTextureSize;\n return supported\n ? { supported, maxTextureSize }\n : {\n supported,\n error: platformNotSupportedError(\n `CameraKit requires WebGL's MAX_TEXTURE_SIZE exceed a minimum value of ` +\n `${minRequiredMaxTextureSize}, but the browser's reported MAX_TEXTURE_SIZE is ${maxTextureSize}.`\n ),\n };\n}\n\n//-----------\n// WASM\n//-----------\n\nexport interface WasmFeatures {\n simd: boolean;\n relaxedSimd: boolean;\n}\n\ntype WasmCapability = Capability<{\n wasmFeatures: WasmFeatures;\n}>;\n\n/**\n * @returns A non-negative integer representing the combination of supported WebAssembly features, or -1 if WebAssembly\n * is not supported at all.\n *\n * @internal\n */\nasync function getWebAssemblyCapabilities(): Promise<WasmCapability> {\n if (globalThis.WebAssembly === undefined)\n return {\n supported: false,\n error: platformNotSupportedError(\n \"CameraKit requires WebAssembly, but this browser does not support WebAssembly.\"\n ),\n };\n const [simd, relaxedSimd] = await Promise.all([\n getSimd().then((simd) => {\n // Although Safari 16.4 reports SIMD support, LensCore encounters rendering bugs when using\n // SIMD in Safari 16.4. We will disable SIMD for now until Safari stabilizes the feature.\n if (getPlatformInfo().browser.brand === \"Safari\") return false;\n return simd;\n }),\n getRelaxedSimd(),\n ]);\n return {\n supported: true,\n wasmFeatures: {\n simd,\n relaxedSimd,\n },\n };\n}\n\n//-----------\n// WebXR\n//-----------\n\ntype WebXrCapability = Capability<XrCapabilities>;\n\nfunction getGenericWebXrNotSupported(cause?: unknown): WebXrCapability {\n return {\n supported: false,\n error: platformNotSupportedError(\n `Use of this feature requires WebXR support for immersive AR sessions, but ` +\n `this browser does not support immersive AR sessions.`,\n cause\n ),\n };\n}\n\n/**\n * @returns A Promise containing an object with fields describing the support of various WebXR features. This object's\n * type is defined by LensCore, as they consume these capabilities and adjust behavior accordingly.\n *\n * @internal\n */\nexport async function getWebXrCapabilities(): Promise<WebXrCapability> {\n try {\n if (!isSecureContext || !navigator.xr) return getGenericWebXrNotSupported();\n const isImmersiveArSupported = await navigator.xr.isSessionSupported(\"immersive-ar\");\n return isImmersiveArSupported\n ? {\n supported: true,\n sixDofSupported: true,\n sceneDepthSupported: true,\n }\n : getGenericWebXrNotSupported();\n } catch (error) {\n if (error instanceof Error && error.name === \"SecurityError\") {\n return {\n supported: false,\n error: platformNotSupportedError(\n \"Failed to check XR capabilities due to permissions or other issues.\",\n error\n ),\n };\n }\n return getGenericWebXrNotSupported(error);\n }\n}\n\n/** @internal */\nexport interface PlatformCapabilities {\n webgl: WebGlCapability;\n wasm: WasmCapability;\n webxr: WebXrCapability;\n}\n\n/**\n * Get information about the current platform capabilities, including:\n * - WebGL support and various WebGL parameters.\n * - WASM support and support for various WASM features.\n * - WebXR support and support for various WebXR features.\n *\n * @internal\n */\nexport const getPlatformCapabilities = memoize(async function getPlatformCapabilities(): Promise<PlatformCapabilities> {\n return {\n webgl: getWebGlSupport(),\n wasm: await getWebAssemblyCapabilities(),\n webxr: await getWebXrCapabilities(),\n };\n});\n"]}
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKit | CameraKit Web SDK - v1.6.1</title><meta name="description" content="Documentation for CameraKit Web SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v1.6.1</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">CameraKit Web SDK</a></li><li><a href="CameraKit.html">CameraKit</a></li></ul><h1>Class CameraKit</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>The entry point to the CameraKit SDK's API. Most of CameraKit's features are accessed via this class.</p>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKit | CameraKit Web SDK - v1.8.0</title><meta name="description" content="Documentation for CameraKit Web SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v1.8.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">CameraKit Web SDK</a></li><li><a href="CameraKit.html">CameraKit</a></li></ul><h1>Class CameraKit</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>The entry point to the CameraKit SDK's API. Most of CameraKit's features are accessed via this class.</p>
2
2
  <p>Applications obtain an instance of CameraKit by calling <a href="../functions/bootstrapCameraKit.html" class="tsd-kind-function">bootstrapCameraKit</a>.</p>
3
3
  </div><div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link"><a id="example" class="tsd-anchor"></a>Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">cameraKit</span><span class="hl-1"> = </span><span class="hl-2">await</span><span class="hl-1"> </span><span class="hl-5">bootstrapCameraKit</span><span class="hl-1">(</span><span class="hl-0">config</span><span class="hl-1">)</span>
4
4
  </code><button type="button">Copy</button></pre>
@@ -25,4 +25,4 @@ to Lens rendering.</p>
25
25
  </code><button type="button">Copy</button></pre>
26
26
 
27
27
  </div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroy</span><a href="#destroy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#destroy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Destroys all sessions and frees all resources.</p>
28
- </div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#lenses" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lenses</span></a><a href="#metrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>metrics</span></a><a href="#lensrepository" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lens<wbr/>Repository</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#createsession" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Session</span></a><a href="#destroy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">CameraKit Web SDK - v1.6.1</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
28
+ </div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#lenses" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lenses</span></a><a href="#metrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>metrics</span></a><a href="#lensrepository" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>lens<wbr/>Repository</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#createsession" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Session</span></a><a href="#destroy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">CameraKit Web SDK - v1.8.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKitSession | CameraKit Web SDK - v1.6.1</title><meta name="description" content="Documentation for CameraKit Web SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v1.6.1</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">CameraKit Web SDK</a></li><li><a href="CameraKitSession.html">CameraKitSession</a></li></ul><h1>Class CameraKitSession</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A CameraKitSession represents a single rendering pipeline connecting an input media source to output <code>&lt;canvas&gt;</code>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKitSession | CameraKit Web SDK - v1.8.0</title><meta name="description" content="Documentation for CameraKit Web SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v1.8.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">CameraKit Web SDK</a></li><li><a href="CameraKitSession.html">CameraKitSession</a></li></ul><h1>Class CameraKitSession</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A CameraKitSession represents a single rendering pipeline connecting an input media source to output <code>&lt;canvas&gt;</code>
2
2
  elements. When a Lens is applied to the session, CameraKit uses the Lens to transform the input media into rendered
3
3
  output.</p>
4
4
  <p>CameraKitSession is the primary object that applications interact with when integrating the CameraKit SDK.</p>
@@ -149,4 +149,4 @@ alternatives.</p>
149
149
  </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise is resolved when the limit is successfully set.</p>
150
150
  <div class="tsd-comment tsd-typography"></div></li></ul></section><section class="tsd-panel tsd-member"><a id="destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroy</span><a href="#destroy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#destroy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Destroy the session.</p>
151
151
  <p>The session will become inoperable. Frame processing stops, and any session-scoped graphical resources are freed.</p>
152
- </div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#output" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>output</span></a><a href="#playing" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>playing</span></a><a href="#events" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>events</span></a><a href="#metrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>metrics</span></a><a href="#keyboard" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>keyboard</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#applylens" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>apply<wbr/>Lens</span></a><a href="#removelens" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Lens</span></a><a href="#play" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>play</span></a><a href="#pause" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pause</span></a><a href="#mute" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>mute</span></a><a href="#unmute" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unmute</span></a><a href="#setsource" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Source</span></a><a href="#setfpslimit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>setFPSLimit</span></a><a href="#destroy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">CameraKit Web SDK - v1.6.1</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
152
+ </div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#output" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>output</span></a><a href="#playing" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>playing</span></a><a href="#events" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>events</span></a><a href="#metrics" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>metrics</span></a><a href="#keyboard" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>keyboard</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#applylens" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>apply<wbr/>Lens</span></a><a href="#removelens" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Lens</span></a><a href="#play" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>play</span></a><a href="#pause" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pause</span></a><a href="#mute" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>mute</span></a><a href="#unmute" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unmute</span></a><a href="#setsource" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Source</span></a><a href="#setfpslimit" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>setFPSLimit</span></a><a href="#destroy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">CameraKit Web SDK - v1.8.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKitSource | CameraKit Web SDK - v1.6.1</title><meta name="description" content="Documentation for CameraKit Web SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v1.6.1</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">CameraKit Web SDK</a></li><li><a href="CameraKitSource.html">CameraKitSource</a></li></ul><h1>Class CameraKitSource</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>This general-purpose class represents a source of media for a <a href="CameraKitSession.html" class="tsd-kind-class">CameraKitSession</a>.</p>
1
+ <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CameraKitSource | CameraKit Web SDK - v1.8.0</title><meta name="description" content="Documentation for CameraKit Web SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">CameraKit Web SDK - v1.8.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">CameraKit Web SDK</a></li><li><a href="CameraKitSource.html">CameraKitSource</a></li></ul><h1>Class CameraKitSource</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>This general-purpose class represents a source of media for a <a href="CameraKitSession.html" class="tsd-kind-class">CameraKitSession</a>.</p>
2
2
  <p>When an instance is passed to <a href="CameraKitSession.html#setsource" class="tsd-kind-method">CameraKitSession.setSource</a>, it will be &quot;attached&quot;
3
3
  to the session. Later it may be &quot;detached&quot; from the session.</p>
4
4
  <p>Passing a <a href="../interfaces/CameraKitSourceSubscriber.html" class="tsd-kind-interface">CameraKitSourceSubscriber</a> to the constructor allows callers to specify behavior
@@ -33,4 +33,4 @@ of as free.</p>
33
33
  constraint should be removed, so callers don't have to understand the underlying LensCore state machine.</p>
34
34
  </div></div></li></ul></section><section class="tsd-panel tsd-member"><a id="settransform" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Transform</span><a href="#settransform" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="settransform-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">setTransform</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">transform</span><span class="tsd-signature-symbol">:</span> <a href="Transform2D.html" class="tsd-signature-type tsd-kind-class">Transform2D</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#settransform-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Apply a 2D transformation to the source (e.g. translation, rotation, scale).</p>
35
35
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">transform</span>: <a href="Transform2D.html" class="tsd-signature-type tsd-kind-class">Transform2D</a></span><div class="tsd-comment tsd-typography"><p>Specifies the 3x3 matrix describing the transformation.</p>
36
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#copy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a><a href="#setrendersize" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Render<wbr/>Size</span></a><a href="#settransform" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Transform</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">CameraKit Web SDK - v1.6.1</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
36
+ </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="tsd-signature-type external" target="_blank">Promise</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#copy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>copy</span></a><a href="#setrendersize" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Render<wbr/>Size</span></a><a href="#settransform" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Transform</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">CameraKit Web SDK - v1.8.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>