add scale parameter to outline material

This commit is contained in:
Nick Fisher
2025-07-01 14:28:19 +08:00
parent f9a7ac49a1
commit e731556e6f
7 changed files with 5187 additions and 5060 deletions

View File

@@ -276,6 +276,7 @@ class FFIView extends View<Pointer<TView>> {
double g = 0.0,
double b = 0.0,
int? entity,
double scale = 1.05,
int primitiveIndex = 0}) async {
entity ??= asset.entity;
@@ -297,6 +298,7 @@ class FFIView extends View<Pointer<TView>> {
}
var highlightMaterialInstance = await highlightMaterial!.createInstance();
await highlightMaterialInstance.setParameterFloat("scale", scale);
await highlightMaterialInstance.setDepthCullingEnabled(true);
await highlightMaterialInstance.setDepthWriteEnabled(true);

View File

@@ -101,6 +101,7 @@ abstract class View<T> extends NativeHandle<T> {
double g = 0.0,
double b = 0.0,
int? entity,
double scale = 1.05,
int primitiveIndex = 0});
/// Removes the outline around [entity]. Noop if there was no highlight.