diff --git a/example/.metadata b/example/.metadata index e8ac3216..13169084 100644 --- a/example/.metadata +++ b/example/.metadata @@ -4,7 +4,27 @@ # This file should be version controlled and should not be manually edited. version: - revision: 19c61fed0da681ba2068c97e22add3bde38e51e4 - channel: beta + revision: "a3a651d82270ff0c40ab2d1615ef6d36af11d580" + channel: "master" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: a3a651d82270ff0c40ab2d1615ef6d36af11d580 + base_revision: a3a651d82270ff0c40ab2d1615ef6d36af11d580 + - platform: android + create_revision: a3a651d82270ff0c40ab2d1615ef6d36af11d580 + base_revision: a3a651d82270ff0c40ab2d1615ef6d36af11d580 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/example/assets/cube.blend1 b/example/assets/cube.blend1 new file mode 100644 index 00000000..cd83b64d Binary files /dev/null and b/example/assets/cube.blend1 differ diff --git a/example/integration_test/plugin_integration_test.dart b/example/integration_test/plugin_integration_test.dart new file mode 100644 index 00000000..acde9fdf --- /dev/null +++ b/example/integration_test/plugin_integration_test.dart @@ -0,0 +1,25 @@ +// This is a basic Flutter integration test. +// +// Since integration tests run in a full Flutter application, they can interact +// with the host side of a plugin implementation, unlike Dart unit tests. +// +// For more information about Flutter integration tests, please see +// https://docs.flutter.dev/cookbook/testing/integration/introduction + + +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; + +import 'package:polyvox_filament/polyvox_filament.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + testWidgets('getPlatformVersion test', (WidgetTester tester) async { + final PolyvoxFilament plugin = PolyvoxFilament(); + final String? version = await plugin.getPlatformVersion(); + // The version string depends on the host platform running the test, so + // just assert that some non-empty string is returned. + expect(version?.isNotEmpty, true); + }); +} diff --git a/example/lib/main.dart b/example/lib/main.dart index b5c83a55..48e4b745 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,8 +1,5 @@ -import 'dart:math'; import 'dart:typed_data'; import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; -import 'package:vector_math/vector_math.dart' as v; import 'package:polyvox_filament/filament_controller.dart'; import 'package:polyvox_filament/animations/bone_animation_data.dart'; @@ -57,6 +54,11 @@ class _ExampleWidgetState extends State { bool _coneHidden = false; + @override + void initState() { + super.initState(); + } + Widget _item(void Function() onTap, String text) { return GestureDetector( onTap: onTap, @@ -242,59 +244,55 @@ class _ExampleWidgetState extends State { _filamentController.setToneMapping(ToneMapper.LINEAR); }, "Set tone mapping to linear")); - return Padding( - padding: EdgeInsets.only(top: 20, left: 20), - child: Row(children: [ - Expanded( - child: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: children - // _item(24 () async { 'rotate by pi around Y axis'), - // _item(5 () async { 'load flight helmet'), - - // _item(7 () async { 'set all weights to 1'), - // _item(8 () async { 'set all weights to 0'), - // _item(9 () async { 'play all animations'), - // _item(34 () async { 'play animation 0'), - // _item(34 () async { 'play animation 0 (noreplace)'), - // _item(35 () async { 'play animation 1'), - // _item(34 () async { 'play animation 0 (noreplace)'), - // _item(36 () async { 'play animation 2'), - // _item(34 () async { 'play animation 0 (noreplace)'), - // _item(36 () async { 'play animation 3'), - // _item(34 () async { 'play animation 3 (noreplace)'), - // _item(37 () async { 'stop animation 0'), - - // _item(14 () async { 'set camera'), - // _item(15 () async { 'animate weights'), - // _item(16 () async { 'get target names'), - // _item(17 () async { 'get animation names'), - // _item(18 () async { 'pan left'), - // _item(19 () async { 'pan right'), - // _item(25 () async { - // Text(_vertical ? 'set horizontal' : 'set vertical')), - // _item(26 () async { 'set camera pos to 0,0,3'), - // _item(27 () async { 'toggle framerate'), - // _item(28 () async { 'set bg image pos'), - // _item(29 () async { 'add light'), - // _item(30 () async { 'remove light'), - // _item(31 () async { 'clear all lights'), - // _item(32 () async { 'set camera model matrix'), - ))), - Container( - width: _vertical ? 200 : 400, - height: _vertical ? 400 : 200, - alignment: Alignment.center, - child: FilamentGestureDetector( - showControlOverlay: true, + return Stack(children: [ + Positioned.fill( + bottom: 100, + child: FilamentGestureDetector( + showControlOverlay: true, + controller: _filamentController, + child: FilamentWidget( controller: _filamentController, - child: FilamentWidget( - controller: _filamentController, - )), - ), - ])); + ))), + Positioned( + bottom: 0, + left: 0, + right: 0, + height: 200, + child: SingleChildScrollView( + child: Wrap(children: children + // _item(24 () async { 'rotate by pi around Y axis'), + // _item(5 () async { 'load flight helmet'), + + // _item(7 () async { 'set all weights to 1'), + // _item(8 () async { 'set all weights to 0'), + // _item(9 () async { 'play all animations'), + // _item(34 () async { 'play animation 0'), + // _item(34 () async { 'play animation 0 (noreplace)'), + // _item(35 () async { 'play animation 1'), + // _item(34 () async { 'play animation 0 (noreplace)'), + // _item(36 () async { 'play animation 2'), + // _item(34 () async { 'play animation 0 (noreplace)'), + // _item(36 () async { 'play animation 3'), + // _item(34 () async { 'play animation 3 (noreplace)'), + // _item(37 () async { 'stop animation 0'), + + // _item(14 () async { 'set camera'), + // _item(15 () async { 'animate weights'), + // _item(16 () async { 'get target names'), + // _item(17 () async { 'get animation names'), + // _item(18 () async { 'pan left'), + // _item(19 () async { 'pan right'), + // _item(25 () async { + // Text(_vertical ? 'set horizontal' : 'set vertical')), + // _item(26 () async { 'set camera pos to 0,0,3'), + // _item(27 () async { 'toggle framerate'), + // _item(28 () async { 'set bg image pos'), + // _item(29 () async { 'add light'), + // _item(30 () async { 'remove light'), + // _item(31 () async { 'clear all lights'), + // _item(32 () async { 'set camera model matrix'), + ))), + ]); } } diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock index 5a6b8220..b452d7ae 100644 --- a/example/macos/Podfile.lock +++ b/example/macos/Podfile.lock @@ -15,7 +15,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - polyvox_filament: e07c84b99ef9e68c66ad32f1e47c9491306cfa30 + polyvox_filament: 59a161de3df49c867bc2003d4ff73b8a304d2feb PODFILE CHECKSUM: 9cc8fc8fc62b1d9a89fd6f974ad4157b35254030 diff --git a/example/pubspec.lock b/example/pubspec.lock index bdda1eda..3757ba4c 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: @@ -37,18 +37,18 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - sha256: "486b7bc707424572cdf7bd7e812a0c146de3fd47ecadf070254cc60383f21dd8" + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.6" fake_async: dependency: transitive description: @@ -75,14 +75,19 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" js: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" lints: dependency: transitive description: @@ -95,42 +100,42 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" path: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "5aadc2af7cd403ad0b95ef654c3e628517f4cae9682b4229a66caf9df71844d2" + sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.6" polyvox_filament: dependency: "direct main" description: @@ -147,26 +152,26 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -187,10 +192,18 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.6.1" + tuple: + dependency: transitive + description: + name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 + url: "https://pub.dev" + source: hosted + version: "2.0.2" vector_math: dependency: transitive description: @@ -199,6 +212,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + wasm_ffi: + dependency: transitive + description: + name: wasm_ffi + sha256: "5da66560305dd659d62caef535c5314abd9302c122e6eef8681e6879fbbfe358" + url: "https://pub.dev" + source: hosted + version: "0.9.4" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=3.1.0-185.0.dev <3.11.0" flutter: ">=1.20.0"