clean up quickstart project
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
|
||||
import 'package:vector_math/vector_math_64.dart' as v;
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:thermion_flutter/thermion/widgets/thermion_widget.dart';
|
||||
import 'package:thermion_flutter/thermion_flutter.dart';
|
||||
import 'package:vector_math/vector_math_64.dart' as v;
|
||||
|
||||
void main() {
|
||||
runApp(const MyApp());
|
||||
@@ -49,7 +49,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Stack(children: [
|
||||
Positioned.fill(child: ThermionWidget(plugin: _thermionFlutterPlugin)),
|
||||
if(_loaded)
|
||||
if (!_loaded)
|
||||
Center(
|
||||
child: ElevatedButton(
|
||||
child: const Text("Load"),
|
||||
@@ -61,7 +61,8 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
await viewer.setCameraPosition(0, 1, 10);
|
||||
await viewer.setCameraRotation(v.Quaternion.axisAngle(
|
||||
v.Vector3(1, 0, 0), -30 / 180 * pi) *
|
||||
v.Quaternion.axisAngle(v.Vector3(0, 1, 0), 15 / 180 * pi));
|
||||
v.Quaternion.axisAngle(
|
||||
v.Vector3(0, 1, 0), 15 / 180 * pi));
|
||||
await viewer.addLight(
|
||||
LightType.SUN, 7500, 50000, 0, 0, 0, 1, -1, -1);
|
||||
await viewer.setRendering(true);
|
||||
|
||||
Reference in New Issue
Block a user