Compare commits

..

7 Commits

Author SHA1 Message Date
Nick Fisher
bbba889080 chore(release): publish packages
- thermion_dart@0.2.1-dev.0.0.15
 - thermion_flutter@0.2.1-dev.15
 - thermion_flutter_web@0.2.0+6
 - thermion_flutter_platform_interface@0.2.1-dev.15
 - thermion_flutter_ffi@0.2.1-dev.15
2024-10-31 15:32:22 +08:00
Nick Fisher
2f1c2fdd9f chore: add logging to ThermionTextureWidget 2024-10-31 15:31:41 +08:00
Nick Fisher
cee5631064 fix: multiply coordinates by pixelRatio for scale events 2024-10-31 15:31:18 +08:00
Nick Fisher
e22a0aec4d fix: remove superfluous ceil() calls for picking coordinates 2024-10-31 15:30:49 +08:00
Nick Fisher
c40faeb888 feat: expose zoomSensitivity argument for flight input handler 2024-10-31 15:27:49 +08:00
Nick Fisher
f666b36e43 fix: replace assets symlink for quickstart project 2024-10-30 12:12:09 +08:00
Nick Fisher
965be02891 fix: replace symlinks for camera_manipulation project 2024-10-30 12:12:09 +08:00
23 changed files with 98 additions and 25 deletions

View File

@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 2024-10-31
### Changes
---
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
- [`thermion_dart` - `v0.2.1-dev.0.0.15`](#thermion_dart---v021-dev0015)
- [`thermion_flutter` - `v0.2.1-dev.15`](#thermion_flutter---v021-dev15)
- [`thermion_flutter_web` - `v0.2.0+6`](#thermion_flutter_web---v0206)
- [`thermion_flutter_platform_interface` - `v0.2.1-dev.15`](#thermion_flutter_platform_interface---v021-dev15)
- [`thermion_flutter_ffi` - `v0.2.1-dev.15`](#thermion_flutter_ffi---v021-dev15)
Packages with dependency updates only:
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
- `thermion_flutter_web` - `v0.2.0+6`
- `thermion_flutter_platform_interface` - `v0.2.1-dev.15`
- `thermion_flutter_ffi` - `v0.2.1-dev.15`
---
#### `thermion_dart` - `v0.2.1-dev.0.0.15`
- **FIX**: remove superfluous ceil() calls for picking coordinates.
- **FEAT**: expose zoomSensitivity argument for flight input handler.
#### `thermion_flutter` - `v0.2.1-dev.15`
- **FIX**: multiply coordinates by pixelRatio for scale events.
## 2024-10-30
### Changes

View File

@@ -0,0 +1 @@
../../assets

View File

@@ -1 +0,0 @@
../../../assets/cube.glb

View File

@@ -1 +0,0 @@
../../../assets/default_env_ibl.ktx

View File

@@ -1 +0,0 @@
../../../assets/default_env_skybox.ktx

View File

@@ -0,0 +1 @@
../../assets

View File

@@ -1 +0,0 @@
../../../assets/cube.glb

View File

@@ -1 +0,0 @@
../../../assets/default_env_ibl.ktx

View File

@@ -1 +0,0 @@
../../../assets/default_env_skybox.ktx

View File

@@ -1,3 +1,8 @@
## 0.2.1-dev.0.0.15
- **FIX**: remove superfluous ceil() calls for picking coordinates.
- **FEAT**: expose zoomSensitivity argument for flight input handler.
## 0.2.1-dev.0.0.14
- **FIX**: reduce size of pick functor for compatibility with armeabi-v7a.

View File

@@ -82,6 +82,7 @@ class DelegateInputHandler implements InputHandler {
{PickDelegate? pickDelegate,
bool freeLook = false,
double panSensitivity = 0.1,
double zoomSensitivity = 0.1,
double movementSensitivity = 0.1,
double rotateSensitivity = 0.01,
double? clampY,
@@ -93,6 +94,7 @@ class DelegateInputHandler implements InputHandler {
clampY: clampY,
entity: entity,
rotationSensitivity: rotateSensitivity,
zoomSensitivity:zoomSensitivity,
panSensitivity: panSensitivity,
movementSensitivity: movementSensitivity),
actions: {

View File

@@ -1514,7 +1514,7 @@ class ThermionViewerFFI extends ThermionViewer {
final viewport = await view.getViewport();
_pickResultController
.add((entity: entityId, x: x.ceil(), y: (viewport.height - y).ceil(), depth: depth, fragX: fragX, fragY: viewport.height - fragY, fragZ: fragZ ));
.add((entity: entityId, x: x, y: (viewport.height - y), depth: depth, fragX: fragX, fragY: viewport.height - fragY, fragZ: fragZ ));
}
late NativeCallable<
@@ -1528,7 +1528,7 @@ class ThermionViewerFFI extends ThermionViewer {
Future pick(int x, int y) async {
final view = (await getViewAt(0)) as FFIView;
var viewport = await view.getViewport();
y = (viewport.height - y).ceil();
y = viewport.height - y;
Viewer_pick(
_viewer!, view.view, x, y, _onPickResultCallable.nativeFunction);
}

View File

@@ -1,6 +1,6 @@
name: thermion_dart
description: 3D rendering toolkit for Dart.
version: 0.2.1-dev.0.0.14
version: 0.2.1-dev.0.0.15
homepage: https://thermion.dev
repository: https://github.com/nmfisher/thermion

View File

@@ -1,3 +1,7 @@
## 0.2.1-dev.15
- **FIX**: multiply coordinates by pixelRatio for scale events.
## 0.2.1-dev.14
- Update a dependency to the latest release.

View File

@@ -165,12 +165,12 @@ class _MobileListenerWidgetState extends State<_MobileListenerWidget> {
},
onScaleStart: (details) async {
await widget.inputHandler.onScaleStart(
details.localFocalPoint.toVector2(), details.pointerCount, details.sourceTimeStamp);
details.localFocalPoint.toVector2() * widget.pixelRatio, details.pointerCount, details.sourceTimeStamp);
},
onScaleUpdate: (ScaleUpdateDetails details) async {
await widget.inputHandler.onScaleUpdate(
details.localFocalPoint.toVector2(),
details.focalPointDelta.toVector2(),
details.localFocalPoint.toVector2() * widget.pixelRatio,
details.focalPointDelta.toVector2() * widget.pixelRatio,
details.horizontalScale,
details.verticalScale,
details.scale,

View File

@@ -68,12 +68,22 @@ class _ThermionTextureWidgetState extends State<ThermionTextureWidget> {
var dpr = MediaQuery.of(context).devicePixelRatio;
var size = ((context.findRenderObject()) as RenderBox).size;
_logger.info(
"Widget size in logical pixels ${size} (pixel ratio : $dpr)");
var width = (size.width * dpr).ceil();
var height = (size.height * dpr).ceil();
_logger.info(
"Target texture dimensions ${width}x${height} (pixel ratio : $dpr)");
_texture = await ThermionFlutterPlatform.instance
.createTexture(widget.view, width, height);
_logger.info(
"Actual texture dimensions ${_texture!.width}x${_texture!.height} (pixel ratio : $dpr)");
await widget.view.updateViewport(_texture!.width, _texture!.height);
try {
@@ -177,6 +187,9 @@ class _ThermionTextureWidgetState extends State<ThermionTextureWidget> {
var newWidth = newSize.width.ceil();
var newHeight = newSize.height.ceil();
_logger.info(
"Resizing texture to dimensions ${newWidth}x${newHeight} (pixel ratio : $dpr)");
await _texture?.resize(
newWidth,
newHeight,
@@ -184,6 +197,9 @@ class _ThermionTextureWidgetState extends State<ThermionTextureWidget> {
0,
);
_logger.info(
"Resized texture to dimensions ${_texture!.width}x${_texture!.height} (pixel ratio : $dpr)");
await widget.view.updateViewport(_texture!.width, _texture!.height);
await widget.onResize?.call(

View File

@@ -1,6 +1,6 @@
name: thermion_flutter
description: Flutter plugin for 3D rendering with the Thermion toolkit.
version: 0.2.1-dev.14
version: 0.2.1-dev.15
homepage: https://thermion.dev
repository: https://github.com/nmfisher/thermion
@@ -17,10 +17,10 @@ dependencies:
plugin_platform_interface: ^2.0.0
ffi: ^2.1.2
animation_tools_dart: ^0.1.0
thermion_dart: ^0.2.1-dev.0.0.14
thermion_flutter_platform_interface: ^0.2.1-dev.14
thermion_flutter_ffi: ^0.2.1-dev.14
thermion_flutter_web: ^0.2.0+5
thermion_dart: ^0.2.1-dev.0.0.15
thermion_flutter_platform_interface: ^0.2.1-dev.15
thermion_flutter_ffi: ^0.2.1-dev.15
thermion_flutter_web: ^0.2.0+6
logging: ^1.2.0
web: ^1.0.0

View File

@@ -1,3 +1,7 @@
## 0.2.1-dev.15
- Update a dependency to the latest release.
## 0.2.1-dev.14
- Update a dependency to the latest release.

View File

@@ -1,7 +1,7 @@
name: thermion_flutter_ffi
description: An FFI implementation for thermion_flutter (i.e. all platforms except web).
repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter
version: 0.2.1-dev.14
version: 0.2.1-dev.15
environment:
sdk: ">=3.3.0 <4.0.0"
@@ -23,8 +23,8 @@ dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.1.0
thermion_flutter_platform_interface: ^0.2.1-dev.14
thermion_dart: ^0.2.1-dev.0.0.14
thermion_flutter_platform_interface: ^0.2.1-dev.15
thermion_dart: ^0.2.1-dev.0.0.15
logging: ^1.2.0
dev_dependencies:

View File

@@ -1,3 +1,7 @@
## 0.2.1-dev.15
- Update a dependency to the latest release.
## 0.2.1-dev.14
- Update a dependency to the latest release.

View File

@@ -1,7 +1,7 @@
name: thermion_flutter_platform_interface
description: A common platform interface for the thermion_flutter plugin.
repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter
version: 0.2.1-dev.14
version: 0.2.1-dev.15
environment:
sdk: ">=3.3.0 <4.0.0"
@@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter
plugin_platform_interface: ^2.1.0
thermion_dart: ^0.2.1-dev.0.0.14
thermion_dart: ^0.2.1-dev.0.0.15
dev_dependencies:
flutter_test:

View File

@@ -1,3 +1,7 @@
## 0.2.0+6
- Update a dependency to the latest release.
## 0.2.0+5
- Update a dependency to the latest release.

View File

@@ -1,7 +1,7 @@
name: thermion_flutter_web
description: A web platform interface for the thermion_flutter plugin.
repository: https://github.com/nmfisher/thermion_flutter/thermion_flutter
version: 0.2.0+5
version: 0.2.0+6
environment:
sdk: ">=3.3.0 <4.0.0"
@@ -20,8 +20,8 @@ dependencies:
sdk: flutter
plugin_platform_interface: ^2.1.0
web: ^1.0.0
thermion_dart: ^0.2.1-dev.0.0.14
thermion_flutter_platform_interface: ^0.2.1-dev.14
thermion_dart: ^0.2.1-dev.0.0.15
thermion_flutter_platform_interface: ^0.2.1-dev.15
flutter_web_plugins:
sdk: flutter