Compare commits

..

4 Commits

Author SHA1 Message Date
Nick Fisher
951064e657 chore(release): publish packages
- thermion_flutter@0.2.0-dev.3.0
2024-09-25 21:20:54 +08:00
Nick Fisher
68ebf945a5 chore: add path to dev deps 2024-09-25 21:20:34 +08:00
Nick Fisher
153817e859 chore!: (flutter) cleanup for pub.dev publishing 2024-09-25 21:20:04 +08:00
Nick Fisher
ba0bc54fa7 fix!: remove EntityControllerMouseWidget (replace with GestureHandler) 2024-09-25 21:19:41 +08:00
6 changed files with 32 additions and 55 deletions

View File

@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 2024-09-25
### Changes
---
Packages with breaking changes:
- [`thermion_flutter` - `v0.2.0-dev.3.0`](#thermion_flutter---v020-dev30)
Packages with other changes:
- There are no other changes in this release.
---
#### `thermion_flutter` - `v0.2.0-dev.3.0`
- **BREAKING** **FIX**: remove EntityControllerMouseWidget (replace with GestureHandler).
- **BREAKING** **CHORE**: (flutter) cleanup for pub.dev publishing.
## 2024-09-25
### Changes

View File

@@ -21,4 +21,5 @@ dependencies:
dev_dependencies:
ffigen: ^12.0.0
test:
image:
image:
path:

View File

@@ -1,3 +1,10 @@
## 0.2.0-dev.3.0
> Note: This release has breaking changes.
- **BREAKING** **FIX**: remove EntityControllerMouseWidget (replace with GestureHandler).
- **BREAKING** **CHORE**: (flutter) cleanup for pub.dev publishing.
## 0.2.0-dev.2.0
> Note: This release has breaking changes.

View File

@@ -115,7 +115,6 @@ class ThermionFlutterPlugin {
return ThermionFlutterPlatform.instance.destroyTexture(texture);
}
@override
static Future<ThermionFlutterTexture?> resizeTexture(
ThermionFlutterTexture texture,
int width,

View File

@@ -1,52 +0,0 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:thermion_dart/thermion_dart/entities/entity_transform_controller.dart';
///
/// A widget that translates mouse gestures to zoom/pan/rotate actions.
///
class EntityTransformMouseControllerWidget extends StatelessWidget {
final EntityTransformController? transformController;
final Widget? child;
EntityTransformMouseControllerWidget(
{Key? key, required this.transformController, this.child})
: super(key: key);
Timer? _timer;
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return Listener(
onPointerDown: (event) {
if (kPrimaryMouseButton & event.buttons != 0) {
transformController?.mouse1Down();
}
},
onPointerUp: (event) {
if (kPrimaryMouseButton & event.buttons != 0) {
transformController?.mouse1Up();
}
},
onPointerHover: (event) {
_timer?.cancel();
if (event.position.dx < 10) {
_timer = Timer.periodic(const Duration(milliseconds: 17), (_) {
transformController?.look(-30);
});
} else if (event.position.dx > constraints.maxWidth - 10) {
_timer = Timer.periodic(const Duration(milliseconds: 17), (_) {
transformController?.look(30);
});
} else {
transformController?.look(event.delta.dx);
}
},
child: child);
});
}
}

View File

@@ -1,6 +1,6 @@
name: thermion_flutter
description: Flutter plugin for 3D rendering with the Thermion toolkit.
version: 0.2.0-dev.2.0
version: 0.2.0-dev.3.0
homepage: https://thermion.dev
repository: https://github.com/nmfisher/thermion