@@ -2,41 +2,27 @@ import { request } from '@nativescript-community/perms';
22import CameraViewViewElement from '@nativescript-community/ui-cameraview/svelte' ;
33import { View } from '@nativescript/core' ;
44import { registerNativeViewElement } from 'svelte-native/dom' ;
5- import Basic from './Basic .svelte' ;
5+ import Camera from './Camera .svelte' ;
66
7- class CropView extends View {
8- createNativeView ( ) {
9- if ( __ANDROID__ ) {
10- return new com . nativescript . cameraviewdemo . CropView ( this . _context ) ;
11- } else if ( __IOS__ ) {
12- return NSCropView . alloc ( ) . init ( ) ;
13- }
14- return null ;
15- }
16- }
7+ // class CropView extends View {
8+ // createNativeView() {
9+ // if (__ANDROID__) {
10+ // return new com.nativescript.cameraviewdemo.CropView(this._context);
11+ // } else if (__IOS__) {
12+ // return NSCropView.alloc().init();
13+ // }
14+ // return null;
15+ // }
16+ // }
1717
1818export function installPlugin ( ) {
19- registerNativeViewElement ( 'cropview' , ( ) => CropView ) ;
19+ // registerNativeViewElement('cropview', () => CropView);
2020 CameraViewViewElement . register ( ) ;
2121 setTimeout ( ( ) => {
2222 request ( 'camera' ) ;
2323 } , 1000 ) ;
2424}
2525
26- export const demos = [ { name : 'Basic' , path : 'basic' , component : Basic } ] ;
26+ // export const demos = [];
27+ export const demos = [ { name : 'Camera' , path : 'camera' , component : Camera } ] ;
2728
28- // let start = Date.now();
29- // for (let index = 0; index < 10000; index++) {
30- // new java.lang.Float(2.3);
31- // }
32- // console.log('java.lang.Float', Date.now() -start);
33- // start = Date.now();
34- // for (let index = 0; index < 10000; index++) {
35- // java.lang.Float.valueOf(2.3);
36- // }
37- // console.log('java.lang.Float.valueOf', Date.now() -start);
38- // start = Date.now();
39- // for (let index = 0; index < 10000; index++) {
40- // float(2.3);
41- // }
42- // console.log('float', Date.now() -start);
0 commit comments