Giter Club home page Giter Club logo

model_viewer.dart's People

Contributors

artob avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

model_viewer.dart's Issues

Generate Posters

Hello everyone,
I want to know if it is possible to generate posters, I know that it is possible with the original model-viewer, but the pub documentation does not say anything about it.

if not currently available, any suggestions on how to get a picture of the model would be greatly appreciated.

AR is not working

Hello, I have trouble with AR he is not working , could you please help me with this issue?

3D Model from assets loads in local host but not server hosting service

Describe the bug
3D model from assets folder loads in local host but when I deploy app into firebase hosting service the 3d model does not load. and instead I get a blank screen

To reproduce
Steps to reproduce the behavior:

  1. Go to example code from model viewer repository
  2. Type flutter build web in terminal or cmd prompt
  3. Type firebase deploy in cmd prompt
  4. go to site see error or blank screen

Expected behavior
I expect for the model to appear on the hosting site the same way it does on local host

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [MACOS]
  • Browser [Chrome]

Error: WebGL is not available!", source: http://127.0.0.1:56195/model-viewer.js (61107)

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\Shubham D\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\webview_flutter-0.3.24\android\src\main\java\io\flutter\plugins\webviewflutter\FlutterWebView.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
โˆš Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Waiting for Android SDK built for x86 to report its views...
Debug service listening on ws://127.0.0.1:63770/xEN4KQfIKg0=/ws
Syncing files to device Android SDK built for x86...
D/EGL_emulation( 4696): eglMakeCurrent: 0xab8733a0: ver 2 0 (tinfo 0x916185a0)
D/ ( 4696): HostConnection::get() New Host Connection established 0x90240d80, tid 4709
D/ ( 4696): HostConnection::get() New Host Connection established 0x91619b80, tid 4708
I/art ( 4696): Background partial concurrent mark sweep GC freed 18939(1073KB) AllocSpace objects, 3(60KB) LOS objects, 39% free, 4MB/7MB, paused 5.432ms total 60.686ms
I/WebViewFactory( 4696): Loading com.android.chrome version 87.0.4280.101 (code 428010121)
I/cr_LibraryLoader( 4696): Loaded native library version number "87.0.4280.101"
I/cr_CachingUmaRecorder( 4696): Flushed 5 samples from 5 histograms.
W/ResourceType( 4696): Failure getting entry for 0x7f13063a (t=18 e=1594) (error -2147483647)
W/chromium( 4696): [WARNING:dns_config_service_posix.cc(342)] Failed to read DnsConfig.
I/flutter ( 4696): >>>> ModelViewer initializing... http://127.0.0.1:56195/
W/cr_media( 4696): Requires BLUETOOTH permission
E/libEGL ( 4696): validate_display:99 error 3008 (EGL_BAD_DISPLAY)
D/ ( 4696): HostConnection::get() New Host Connection established 0x877ff200, tid 4754
E/chromium( 4696): [ERROR:gl_surface_egl.cc(577)] eglChooseConfig failed with error EGL_SUCCESS
D/EGL_emulation( 4696): eglCreateContext: 0x883f4140: maj 2 min 0 rcv 2
D/EGL_emulation( 4696): eglMakeCurrent: 0x883f4140: ver 2 0 (tinfo 0x877be720)
E/chromium( 4696): [ERROR:gl_surface_egl.cc(577)] eglChooseConfig failed with error EGL_SUCCESS
D/EGL_emulation( 4696): eglMakeCurrent: 0xab8734c0: ver 2 0 (tinfo 0x9032d340)
D/EGL_emulation( 4696): eglCreateContext: 0x883f4b60: maj 2 min 0 rcv 2
D/EGL_emulation( 4696): eglMakeCurrent: 0x883f4b60: ver 2 0 (tinfo 0x877be720)
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
D/EGL_emulation( 4696): eglCreateContext: 0x883f51c0: maj 2 min 0 rcv 2
D/EGL_emulation( 4696): eglMakeCurrent: 0x883f51c0: ver 2 0 (tinfo 0x877be720)
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
D/EGL_emulation( 4696): eglMakeCurrent: 0x883f4b60: ver 2 0 (tinfo 0x877be720)
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
D/EGL_emulation( 4696): eglCreateContext: 0x883f5760: maj 2 min 0 rcv 2
D/EGL_emulation( 4696): eglMakeCurrent: 0x883f5760: ver 2 0 (tinfo 0x877be720)
E/chromium( 4696): [ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blocklisted
D/EGL_emulation( 4696): eglCreateContext: 0x883f5760: maj 2 min 0 rcv 2
D/EGL_emulation( 4696): eglMakeCurrent: 0x883f5760: ver 2 0 (tinfo 0x877be720)
E/chromium( 4696): [ERROR:context_group.cc(146)] ContextResult::kFatalFailure: WebGL1 blocklisted
I/chromium( 4696): [INFO:CONSOLE(61107)] "Error: WebGL is not available!", source: http://127.0.0.1:56195/model-viewer.js (61107)
I/chromium( 4696): [INFO:CONSOLE(57904)] "Uncaught TypeError: Cannot read property 'compile' of undefined", source: http://127.0.0.1:56195/model-viewer.js (57904)
D/EGL_emulation( 4696): eglMakeCurrent: 0x883f4b60: ver 2 0 (tinfo 0x877be720)
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
D/ ( 4696): HostConnection::get() New Host Connection established 0x885eb700, tid 4729
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 4696): glUtilsParamSize: unknow param 0x000085b5

Skybox / HDRI Background

Would it be possible to implement the use of skyboxes or a HDRIs for the GLTF's like in the web version of the model-viewer?

import 'package:model_viewer/model_viewer.dart' not working in a null save library

Describe the bug
I'm not able to import the model-viewer library into my main dart file. Error: The library 'package:model_viewer/model_viewer.dart' is legacy, and should not be imported into a null safe library.
Try migrating the imported library.dart(import_of_legacy_library_into_null_safe)

To reproduce
Dart SDK version: 2.13.4 (stable) (Wed Jun 23 13:08:41 2021 +0200) on "macos_x64"

Flutter 2.2.3 โ€ข channel stable

Expected behavior
To import the library

Desktop (please complete the following information):

  • OS: Mac 11.4
  • Visual Studio Code 1.58

Load GLTF + BIN + Textures mode

Hey! There was a need to load the model with textures in separate files. Is it possible? Or just gltf / glb files in one file?

iosSrc doesn't open file

I tried to load from assets a usdz file in iosSrc param on a physical iphone but it always shows the object in src param.

The src parameter is required, am I doing something wrong or is it a bug?

Btw good job, it's a very interesting package.

Is there a way to use this package inside a flutterflow project

Hello,

I would like to use this package in a Flutterflow project: https://flutterflow.io/

However, due to the setup required to make this package work (modifying android manifest ect...)
And especially those

image

image

image

It seems not possible to use this package on Flutterflow. (Because flutter flow doesn't give you access to file systems like android manifest.)

Is there a solution for this?
Many thanks for the help

Blank screen after running

Blank screen after running
After "flutter run" the screen remains blank in android emulator running on a Mac

To reproduce
Navigate to example

  • cd example
  • flutter run

Logs

๐Ÿ›‘ flutter run

Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider enabling software rendering
with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        16.9s
โœ“ Built build/app/outputs/apk/debug/app-debug.apk.
D/EGL_emulation( 5446): eglMakeCurrent: 0xae4545a0: ver 3 0 (tinfo 0xaa0e0660)
Syncing files to device Android SDK built for x86...             1,103ms

Flutter run key commands.
r Hot reload. ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ
R Hot restart.
h Repeat this help message.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:54597/EDMDMBW_8Os=/
I/WebViewFactory( 5446): Loading com.android.webview version 44.0.2403.119 (code 246011910)
D/        ( 5446): HostConnection::get() New Host Connection established 0xae44f180, tid 5457
D/        ( 5446): HostConnection::get() New Host Connection established 0xb2afe100, tid 5473
W/System  ( 5446): ClassLoader referenced unknown path: /system/app/webview/lib/x86
I/LibraryLoader( 5446): Time to load native libraries: 22 ms (timestamps 8412-8434)
I/LibraryLoader( 5446): Expected native library version number "",actual native library version number ""
V/WebViewChromiumFactoryProvider( 5446): Binding Chromium to main looper Looper (main, tid 1) {d2cfb07}
I/LibraryLoader( 5446): Expected native library version number "",actual native library version number ""
I/chromium( 5446): [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0, default verbosity = 0
I/BrowserStartupController( 5446): Initializing chromium process, singleProcess=true
W/art     ( 5446): Attempt to remove non-JNI local reference, dumping thread
E/SysUtils( 5446): ApplicationContext is null in ApplicationStatus
W/chromium( 5446): [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
E/libEGL  ( 5446): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
E/libEGL  ( 5446): validate_display:255 error 3008 (EGL_BAD_DISPLAY)
D/EGL_emulation( 5446): eglCreateContext: 0xb409a860: maj 3 min 0 rcv 3
D/EGL_emulation( 5446): eglMakeCurrent: 0xb409a860: ver 3 0 (tinfo 0xa9fff110)
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x00008824
E/DataReductionProxySettingListener( 5446): No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
W/AudioManagerAndroid( 5446): Requires BLUETOOTH permission
W/art     ( 5446): Attempt to remove non-JNI local reference, dumping thread
I/art     ( 5446): Background sticky concurrent mark sweep GC freed 11396(770KB) AllocSpace objects, 3(60KB) LOS objects, 68% free, 1180KB/3MB, paused 9.054ms total 77.452ms
W/AwContents( 5446): onDetachedFromWindow called when already detached. Ignoring
W/chromium( 5446): [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup
I/flutter ( 5446): >>>>>>>>>>>>>>>>> ModelViewer initializing...
D/EGL_emulation( 5446): eglMakeCurrent: 0xa9ffc420: ver 3 0 (tinfo 0xaa0e03c0)
D/        ( 5446): HostConnection::get() New Host Connection established 0x9ee5ef00, tid 5500
D/EGL_emulation( 5446): eglCreateContext: 0x992ec020: maj 3 min 0 rcv 3
D/EGL_emulation( 5446): eglMakeCurrent: 0x992ec020: ver 3 0 (tinfo 0x9ccf6090)
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x00008824
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x00008073
D/EGL_emulation( 5446): eglCreateContext: 0x992ebc00: maj 3 min 0 rcv 3
D/EGL_emulation( 5446): eglMakeCurrent: 0x992ebc00: ver 3 0 (tinfo 0x9ccf6090)
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x00008cdf
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x00008824
W/BindingManager( 5446): Cannot call determinedVisibility() - never saw a connection for the pid: 5446
D/EGL_emulation( 5446): eglMakeCurrent: 0x992ec020: ver 3 0 (tinfo 0x9ccf6090)
D/EGL_emulation( 5446): eglMakeCurrent: 0x992ebc00: ver 3 0 (tinfo 0x9ccf6090)
I/chromium( 5446): [INFO:CONSOLE(126)] "Uncaught SyntaxError: Unexpected token )", source:  (126)
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x000085b5
E/eglCodecCommon( 5446): glUtilsParamSize: unknow param 0x00008073
D/EGL_emulation( 5446): eglMakeCurrent: 0xa9ffc420: ver 3 0 (tinfo 0xaa0e03c0)

Screenshots
Screenshot 2020-06-18 at 8 53 03 AM

AR is not working

Issue
When clicking on AR FABbutton nothing happening on the mobile screen

On clicking the button, the below error is appearing in the log file.

Error:
2020-09-29 23:29:56.127 9553-9553/com.example.flutter_app E/InputMethodManager: b/117267690: Failed to get fallback IMM with expected displayId=6 actual IMM#displayId=0 view=io.flutter.plugins.webviewflutter.InputAwareWebView{fdfe036 VFEDHVC.. .F...... 0,0-1080,1944}

Kindly look into this.

no AR support for webxr

Describe the bug
setting arModes to ['webxr'] does not show a button for AR.

To reproduce
Steps to reproduce the behavior:

  1. Set arModes to ['webxr']
  2. Run the app
  3. See error

Expected behavior
setting arModes to webxr should display the View in AR button.

Smartphone (please complete the following information):

  • Device: [e.g. Samsung galaxy m31]
  • OS: [e.g. android 11]

ERR_CLEARTEXT_NOT_PERMITTED

Testing the demo app on the emulator and on my Android device, I get the same error:
Webpage not available.
The webpage at http:/127.0.0.1:46085/ could not be loaded because:
net::ERR_CLEARTEXT_NOT_PERMITTED

Console output:

Launching lib\main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
โœ“ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
Waiting for sdk gphone x86 arm to report its views...
Debug service listening on ws://127.0.0.1:53029/vpU2zKITaHg=/ws
Syncing files to device sdk gphone x86 arm...
I/WebViewFactory(10684): Loading com.google.android.webview version 83.0.4103.101 (code 410410181)
I/hreed_view_tes(10684): The ClassLoaderContext is a special shared library.
W/Gralloc4(10684): allocator 3.x is not supported
I/hreed_view_tes(10684): The ClassLoaderContext is a special shared library.
I/cr_LibraryLoader(10684): Loaded native library version number "83.0.4103.101"
I/cr_CachingUmaRecorder(10684): Flushed 3 samples from 3 histograms.
I/TetheringManager(10684): registerTetheringEventCallback:com.example.threed_view_test
W/chromium(10684): [WARNING:dns_config_service_posix.cc(341)] Failed to read DnsConfig.
I/flutter (10684): >>>> ModelViewer initializing... <http://127.0.0.1:46085/>
D/EGL_emulation(10684): eglCreateContext: 0xe82662d0: maj 3 min 0 rcv 3
D/EGL_emulation(10684): eglMakeCurrent: 0xe82662d0: ver 3 0 (tinfo 0xe85badb0) (first time)
W/hreed_view_tes(10684): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
D/HostConnection(10684): HostConnection::get() New Host Connection established 0xe8467010, tid 10810
V/InputMethodManager(10684): b/117267690: Failed to get fallback IMM with expected displayId=6 actual IMM#displayId=0 view=io.flutter.plugins.webviewflutter.InputAwareWebView{b86f4dc VFEDHVC.. ........ 0,0-768,1024}
D/HostConnection(10684): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
W/cr_media(10684): Requires BLUETOOTH permission
I/VideoCapabilities(10684): Unsupported profile 4 for video/mp4v-es
W/cr_MediaCodecUtil(10684): HW encoder for video/avc is not available on this device.
I/flutter (10684): >>>> ModelViewer failed to load: net::ERR_CLEARTEXT_NOT_PERMITTED (WebResourceErrorType.unknown -1)
D/EGL_emulation(10684): eglCreateContext: 0xe8266f80: maj 3 min 0 rcv 3
D/EGL_emulation(10684): eglMakeCurrent: 0xe8266f80: ver 3 0 (tinfo 0xb552af90) (first time)

Main file:

import 'package:flutter/material.dart';
import 'package:model_viewer/model_viewer.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(),
        body: ModelViewer(
          src: 'https://modelviewer.dev/shared-assets/models/Astronaut.glb',
          alt: "A 3D model of an astronaut",
          ar: true,
          autoRotate: true,
          cameraControls: true,
        ),
      ),
    );
  }
}

ADD A CUSTOM PROGRESS BAR

I want to show a CustomProgressBar but the ModelViewer arguments don't have onPageStarted and onPageFinished. Please add the arguments ๐Ÿ‘

can not load a model from the file system , Cross origin requests are only supported for protocol schemes: http, data, chrome, https.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
For example: I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you would like to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features
you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Can't open 3d after click on button

Hello. I have worked app with 3d models. But few days ago i saw this after pressing button for load object:

Download failed
An error occured while loading the object

model_viewer_error

Add support for Flutter Web

Is your feature request related to a problem? Please describe.
Hi, I was trying to use the widget for my Flutter Web application and it didn't work because of webview errors.

Describe the solution you'd like
A clear and concise description of what you would like to happen.
Maybe it is possible to modify the application so it can be used cross platform easily.

Cannot pan the camera

It is only possible to zoom in/out and rotate the image on its axis.
It is not possible to move around in the image and pan the camera (swipe to move the image left/right/up/down without rotating)

ModelViewer failed to load model URL

Hey. Please tell me what the problem is. When I load a model from an example, it displays normally. And when I upload the model to my server, it does not load. Flutter writes an error:
I / flutter (25631): >>>>>>>>>>>>>>>>>> ModelViewer failed to load: Instance of 'WebResourceError'
Please, help me!

Crashes on Android

Describe the bug
On iOS it works fine. On Android, my app crashes after a minute. Until the crash happens the app is completely frozen. I've update the webview and chrome to the latest ones.

Expected behavior
Works in the same way as on iOS

Desktop (please complete the following information):

  • OS: Mac OS

Smartphone (please complete the following information):

  • Device: Android Emulator
  • OS: Android 10
  • Browser: Chrome
  • I/WebViewFactory(24098): Loading com.google.android.webview version 95.0.4638.74 (code 463807431)
  • I/cr_WVCFactoryProvider(24098): Loaded version=95.0.4638.74 minSdkVersion=29 isBundle=true multiprocess=true packageId=2

Additional context


I/WebViewFactory(24098): Loading com.google.android.webview version 95.0.4638.74 (code 463807431)
W/oolyard.stagin(24098): Accessing hidden method Landroid/os/Trace;->isTagEnabled(J)Z (greylist, reflection, allowed)
W/oolyard.stagin(24098): Accessing hidden method Landroid/os/Trace;->traceBegin(JLjava/lang/String;)V (greylist, reflection, allowed)
W/oolyard.stagin(24098): Accessing hidden method Landroid/os/Trace;->traceEnd(J)V (greylist, reflection, allowed)
W/oolyard.stagin(24098): Accessing hidden method Landroid/os/Trace;->asyncTraceBegin(JLjava/lang/String;I)V (greylist, reflection, allowed)
W/oolyard.stagin(24098): Accessing hidden method Landroid/os/Trace;->asyncTraceEnd(JLjava/lang/String;I)V (greylist, reflection, allowed)
I/cr_WVCFactoryProvider(24098): Loaded version=95.0.4638.74 minSdkVersion=29 isBundle=true multiprocess=true packageId=2
I/cr_LibraryLoader(24098): Successfully loaded native library
I/cr_CachingUmaRecorder(24098): Flushed 8 samples from 8 histograms.
I/oolyard.stagin(24098): NativeAlloc concurrent copying GC freed 29952(1672KB) AllocSpace objects, 17(676KB) LOS objects, 49% free, 2505KB/5011KB, paused 1.565ms total 154.539ms
E/chromium(24098): [ERROR:network_service_instance_impl.cc(179)] Failed to grant sandbox access to network context data for /data/user/0/com.staging/app_webview/Default with result 7: No such file or directory (2)
W/oolyard.stagin(24098): Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (greylist, reflection, allowed)
D/HostConnection(24098): HostConnection::get() New Host Connection established 0xbaa06a70, tid 24858
D/HostConnection(24098): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer ANDROID_EMU_sync_buffer_data GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_async_frame_commands ANDROID_EMU_gles_max_version_3_0 
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(24098): eglCreateContext: 0xc04b84e0: maj 3 min 0 rcv 3
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b84e0: ver 3 0 (tinfo 0xc6601ca0)
W/cr_media(24098): Requires BLUETOOTH permission
D/NetworkSecurityConfig(24098): Using Network Security Config from resource network_security_config debugBuild: true
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(24098): eglCreateContext: 0xc04b84e0: maj 3 min 0 rcv 3
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b84e0: ver 3 0 (tinfo 0xc6601ca0)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) Chrome_InProcGp identical 2 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) Chrome_InProcGp identical 4 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(24098): eglCreateContext: 0xc04b85a0: maj 3 min 0 rcv 3
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b85a0: ver 3 0 (tinfo 0xc6601ca0)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 1 (1) 0 0
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b84e0: ver 3 0 (tinfo 0xc6601ca0)
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(24098): eglCreateContext: 0xc04b8960: maj 3 min 0 rcv 3
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b8960: ver 3 0 (tinfo 0xc6601ca0)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 1 (1) 0 0
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(24098): eglCreateContext: 0xc04b8a20: maj 3 min 0 rcv 3
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b8a20: ver 3 0 (tinfo 0xc6601ca0)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 1 (1) 0 0
D/EGL_emulation(24098): eglMakeCurrent: 0xe644ca40: ver 3 0 (tinfo 0xdaee6f30)
W/Gralloc3(24098): allocator 3.x is not supported
D/EGL_emulation(24098): eglMakeCurrent: 0xe644ca40: ver 3 0 (tinfo 0xdaee6f30)
I/oolyard.stagin(24098): NativeAlloc concurrent copying GC freed 10346(647KB) AllocSpace objects, 1(20KB) LOS objects, 49% free, 2646KB/5292KB, paused 2.418ms total 154.888ms
D/EGL_emulation(24098): eglMakeCurrent: 0xe644ca40: ver 3 0 (tinfo 0xdaee6f30)
D/EGL_emulation(24098): eglMakeCurrent: 0xe644ca40: ver 3 0 (tinfo 0xdaee6f30)
D/EGL_emulation(24098): eglMakeCurrent: 0xe644ca40: ver 3 0 (tinfo 0xdaee6f30)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/EGL_emulation(24098): eglMakeCurrent: 0xe644ca40: ver 3 0 (tinfo 0xdaee6f30)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/EGL_emulation(24098): eglMakeCurrent: 0xe644ca40: ver 3 0 (tinfo 0xdaee6f30)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) RenderThread identical 4 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) RenderThread identical 4 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) RenderThread identical 2 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) RenderThread identical 4 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/oolyard.stagin(24098): NativeAlloc concurrent copying GC freed 1258(150KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 2639KB/5279KB, paused 5.528ms total 212.259ms
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 1 2
D/EGL_emulation(24098): eglMakeCurrent: 0xe644ca40: ver 3 0 (tinfo 0xdaee6f30)
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 1 2
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 1 2
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b84e0: ver 3 0 (tinfo 0xc6601ca0)
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 0 0
D/EGL_emulation(24098): eglCreateContext: 0xc04b8de0: maj 3 min 0 rcv 3
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b8de0: ver 3 0 (tinfo 0xc6601ca0)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 1 (1) 0 0
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) Chrome_InProcGp identical 2 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b84e0: ver 3 0 (tinfo 0xc6601ca0)
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b8de0: ver 3 0 (tinfo 0xc6601ca0)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) Chrome_InProcGp identical 2 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chromium(24098): [INFO:CONSOLE(17645)] "THREE.WebGLRenderer: OES_texture_half_float extension not supported.", source: http://127.0.0.1:37421/model-viewer.js (17645)
I/chromium(24098): [INFO:CONSOLE(17645)] "THREE.WebGLRenderer: OES_texture_half_float_linear extension not supported.", source: http://127.0.0.1:37421/model-viewer.js (17645)
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chatty  (24098): uid=10136(com.staging) Chrome_InProcGp identical 2 lines
E/eglCodecCommon(24098): glUtilsParamSize: unknow param 0x000088ef
I/chromium(24098): [INFO:CONSOLE(17645)] "THREE.WebGLRenderer: EXT_frag_depth extension not supported.", source: http://127.0.0.1:37421/model-viewer.js (17645)
I/chromium(24098): [INFO:CONSOLE(17645)] "THREE.WebGLRenderer: WEBGL_draw_buffers extension not supported.", source: http://127.0.0.1:37421/model-viewer.js (17645)
I/chromium(24098): [INFO:CONSOLE(17645)] "THREE.WebGLRenderer: EXT_shader_texture_lod extension not supported.", source: http://127.0.0.1:37421/model-viewer.js (17645)
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 1 2
I/chatty  (24098): uid=10136(com.staging) RenderThread identical 9 lines
D/eglCodecCommon(24098): setVertexArrayObject: set vao to 0 (0) 1 2
D/EGL_emulation(24098): eglMakeCurrent: 0xc04b84e0: ver 3 0 (tinfo 0xc6601ca0)

ModelViewer widget does not load after publishing on Google Play

Hello,

Recently I developed an app and under the assets folder I uploaded several models in the .glb format. While I am running the app on physical device (using Android Studio) everything works fine and the models load. As soon as I publish a release on google play when I navigate to the same page where the 3D model is expected to load, nothing happens and the screen stays white.

What could be the reason for that?

I am running latest version of the plug in as well as latest stable version of flutter.

Thank you.

AR button doesn't appear on IOS

Hi,
I tried to open the button for AR on IOS but it doesn't appear to me, it may be because model-viewer does not contain quick-look-browsers = "safari chrome", please could you solve this problem.
Thank you very much

Blank Screen Running on IOS

Hello Guys I got this kind of error when first time to run the Model-Viewer in IOS, tried to run in Android it's worked fine, but nothing show in IOS, is it implemented in IOS or is it the WebView from IOS is not supported??(try with chrome installed, read from previous issue, but nothing happens)

To reproduce
Steps to reproduce the behavior:

just putting this kind of code in my project:

Scaffold(
        body: ModelViewer(
           src: src,
          iosSrc: 'https://modelviewer.dev/shared-assets/models/Astronaut.usdz',
          ar: true,
          autoRotate: true,
          cameraControls: true,
          backgroundColor: Colors.white,
          autoPlay: true,
          autoRotateDelay: 1500,
          arScale: 'auto',
        ))

with src: http://xxx/3dobject/Astronaut.glb --> this is on local server
then flutter run

LogCat:

Launching lib/main.dart on xxxโ€™s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: xxxx
Running Xcode build...
Xcode build done.                                           18.2s
Installing and launching...
Waiting for xxxโ€™s iPhone to report its views...
Debug service listening on ws://localhost:52430/ws
Syncing files to device xxxs iPhone...
flutter: >>>> ModelViewer initializing... <http://127.0.0.1:50045/>

ScreenShot
This is the SS I got from my Real Device

IMG_0052

Device Info
I'm using real device iPhone XR to compile
Screen Shot 2021-02-02 at 09 31 12

Additional context
I have put the requirement according from this site request
Screen Shot 2021-02-02 at 09 48 18

SIMPLE CODE FOR CACHE SUPPORT (LOAD THE MODEL 40% FASTER)

CACHE SUPPORT WITH FLUTTER CACHE MANAGER

import 'package:flutter/material.dart';
import 'package:pedantic/pedantic.dart';
import 'package:model_viewer/model_viewer.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';

...

@override
  Widget build(BuildContext context) {
    return FutureBuilder<String>(
      future: chached3DSrc(src),
      builder: (__, AsyncSnapshot<String> snapshot) {
        if (snapshot.connectionState == ConnectionState.done) {
          return ModelViewer(
            src: snapshot.data,
            autoPlay: true,
            autoRotate: true,
            autoRotateDelay: 0,
            cameraControls: true,
          );
        } else {
          return SizedBox();
        }
      },
    );
  }

  Future<String> chached3DSrc(String source) async {
    final BaseCacheManager _cacheManager = DefaultCacheManager();
    final fileInfo = await _cacheManager.getFileFromCache(source);

    if (fileInfo == null || fileInfo.file == null) {
      unawaited(_cacheManager.downloadFile(source));
      return source;
    } else {
      return "file://" + fileInfo.file.path;
    }
  }

Is it possible to update camera using a controller?

Is your feature request related to a problem? Please describe.
I want the 3D model rotate programatically like auto rotate.

Describe the solution you'd like
Add a camera/view controller so I can update it

default camera position view

I've some 3D models which have a bad camera starting position. So it's necessary to swipe the model to a correct position. To avoid this problem, is it possible to set an start position of the camera view angle?

Thank you in advance,
cheers,
Kevin

AR by default

Is it possible to start model viewer in AR mode?

Possible use case is if i have a list of products and by clicking one of them to immediately open AR display and skip the plain model in between.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.