Giter Site home page Giter Site logo

babylonjs_viewer's Introduction

Hi there ๐Ÿ‘‹

babylonjs_viewer's People

Contributors

marlonjd avatar migmlg 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

Watchers

 avatar  avatar  avatar

babylonjs_viewer's Issues

Other functions beside viewer

Thanks for your great effort :)

I'm just wondering if there are any more functions beside basic 3D viewer.
ex) Turning on AR when button pressed, changing model viewer's background

Thank you :)

the viewer doesnt refresh its content

I think its because the underlaying webview doesnt have a controller.

Could we mabye get reloadmodel function into this plugin? , and use a controller within the webview, I think that should do it.

I have testcode here, just add 2 .glb files to assets.:

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter DropDownButton',
theme: ThemeData(
primarySwatch: Colors.green,
),
home: const MyHomePage(),
debugShowCheckedModeBanner: false,
);
}
}

class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);

@OverRide
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State {
String dropdownvalue = 'assets/test1.glb';
late BabylonJSViewer bsv;

@OverRide
void initState() {

super.initState();
bsv = BabylonJSViewer(
  src: dropdownvalue,
);

}

var items2 = [
'assets/test1.glb',
'assets/alpha-blend-litmus.glb',
];

@OverRide
Widget build(BuildContext context) {
bsv = BabylonJSViewer(
src: dropdownvalue,
);

return Scaffold(
  appBar: AppBar(
    title: const Text("3d models"),
  ),
  body: Center(
    child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        DropdownButton(
          value: dropdownvalue,
          icon: const Icon(Icons.keyboard_arrow_down),
          items: items2.map((String items2) {
            return DropdownMenuItem(
              value: items2,
              child: Text(items2),
            );
          }).toList(),
          onChanged: (String? newValue) {
            setState(() {
              dropdownvalue = newValue!;

              bsv = BabylonJSViewer(
                src: newValue,
              );

              print(dropdownvalue);
            });
          },
        ),
        Expanded(child: bsv),
      ],
    ),
  ),
);

}
}

Null check operator used on a null value.

I received the folllowing error,while loading the example.

`โ•โ•โ•โ•โ•โ•โ•โ• Exception caught by widgets library โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
The following _CastError was thrown building BabylonJSViewer(dirty, state: _BabylonJSViewerState#21ec1):
Null check operator used on a null value

The relevant error-causing widget was
BabylonJSViewer
lib/ui/sample.dart:23
When the exception was thrown, this was the stack
#0      _BabylonJSViewerState.build
package:babylonjs_viewer/src/babylonjs_viewer.dart:61
#1      StatefulElement.build
package:flutter/โ€ฆ/widgets/framework.dart:4691
#2      ComponentElement.performRebuild
package:flutter/โ€ฆ/widgets/framework.dart:4574
#3      StatefulElement.performRebuild
package:flutter/โ€ฆ/widgets/framework.dart:4746
#4      Element.rebuild
package:flutter/โ€ฆ/widgets/framework.dart:4267
...
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•`

Unable to build - gradle version

Hi,
newbie here! I am trying to build a simple example, but it says:

[   +8 ms] FAILURE: Build failed with an exception.
[   +3 ms] * What went wrong:
[        ] The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
[        ] The following dependencies do not satisfy the required version:
[        ] project ':flutter_gl' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61

but the flutter_gl plugin should be alreay updated... did i miss some setting?
Thanks!!

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.