From a91aaae1311d26ac7783639cbce915b95f374d5d Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Tue, 17 Jun 2025 11:51:37 +0800 Subject: [PATCH] formatting --- .../src/viewer/src/thermion_viewer_base.dart | 63 ++++++++++--------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart b/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart index 30fffb51..93898067 100644 --- a/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart +++ b/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart @@ -18,7 +18,6 @@ import 'dart:async'; /// using the methods directly via FilamentApp.instance; /// abstract class ThermionViewer { - /// /// /// @@ -138,33 +137,33 @@ abstract class ThermionViewer { /// /// Load the glTF asset at the given path (.glb or .gltf) - /// - /// If the file is a .gltf and [resourceUri] is not specified, - /// all resources will be loaded relative to the URI of the file (so if - /// [uri] is asset://assets/scene.gltf, the loader will attempt to load + /// + /// If the file is a .gltf and [resourceUri] is not specified, + /// all resources will be loaded relative to the URI of the file (so if + /// [uri] is asset://assets/scene.gltf, the loader will attempt to load /// asset://assets/scene.bin, asset://assets/texture.png, and so on). - /// - /// If [resourceUri] is specified, resources will be loaded relative to + /// + /// If [resourceUri] is specified, resources will be loaded relative to /// that path. - /// + /// /// If [addToScene] is [true], all renderable entities (including lights) /// in the asset will be added to the scene. - /// - /// If you want to dynamically create instances of this asset after it is + /// + /// If you want to dynamically create instances of this asset after it is /// instantiated, pass [kee] - /// Alternatively, specifying [numInstances] will pre-allocate the specified - /// number of instances. This is more efficient than dynamically instantating at a later time. + /// Alternatively, specifying [numInstances] will pre-allocate the specified + /// number of instances. This is more efficient than dynamically instantating at a later time. /// You can then retrieve the created instances with [getInstances]. - /// - /// If [keepData] is false and [numInstances] is 1, - /// the source glTF data will be released and [createInstance] + /// + /// If [keepData] is false and [numInstances] is 1, + /// the source glTF data will be released and [createInstance] /// will throw an exception. /// /// Future loadGltf(String uri, - { bool addToScene = true, - int numInstances = 1, + {bool addToScene = true, + int numInstances = 1, bool keepData = false, String? resourceUri, bool loadAsync = false}); @@ -178,15 +177,15 @@ abstract class ThermionViewer { /// be loaded asynchronously (so expect some material/texture pop-in); /// /// - Future loadGltfFromBuffer(Uint8List data, - { - String? resourceUri, - int numInstances = 1, - bool keepData = false, - int priority = 4, - int layer = 0, - bool loadResourcesAsync = false, - }); + Future loadGltfFromBuffer( + Uint8List data, { + String? resourceUri, + int numInstances = 1, + bool keepData = false, + int priority = 4, + int layer = 0, + bool loadResourcesAsync = false, + }); /// /// Destroys [asset] and all underlying resources @@ -216,14 +215,14 @@ abstract class ThermionViewer { Future setViewFrustumCulling(bool enabled); /// - /// Sets the viewport sizes and updates all cameras to use the new aspect ratio. + /// Sets the viewport sizes and updates all cameras to use the new aspect ratio. /// Future setViewport(int width, int height); /// /// /// - Future setLayerVisibility(VisibilityLayers layer, bool visible); + Future setLayerVisibility(VisibilityLayers layer, bool visible); /// /// Set the world space position for [lightEntity] to the given coordinates. @@ -270,7 +269,9 @@ abstract class ThermionViewer { /// /// Future createGeometry(Geometry geometry, - {List? materialInstances, bool keepData = false, bool addToScene=true}); + {List? materialInstances, + bool keepData = false, + bool addToScene = true}); /// /// Returns a gizmo for translating/rotating objects. @@ -325,9 +326,9 @@ abstract class ThermionViewer { /// /// Adds the asset to the scene, meaning the asset will be rendered/visible. - /// + /// Future addToScene(covariant ThermionAsset asset); - + /// /// Removes the asset from the scene, meaning the asset will not be rendered/visible. /// The asset itself will remain valid.