Improved html5 performance
This commit is contained in:
parent
1aff15069a
commit
af41271af2
9 changed files with 63 additions and 54 deletions
|
|
@ -1,4 +1,4 @@
|
|||
extends Area3D
|
||||
extends Node3D
|
||||
|
||||
@export var coordinates: Vector4i
|
||||
@export var is_black: bool = false
|
||||
|
|
@ -10,13 +10,13 @@ var map_reference: HexGrid
|
|||
|
||||
func _ready() -> void:
|
||||
if is_black:
|
||||
hexagon_small.set_surface_override_material(0, resource.material_black.duplicate())
|
||||
hexagon_small.get_surface_override_material(0).albedo_texture = resource.material_black.albedo_texture
|
||||
else:
|
||||
hexagon_small.set_surface_override_material(0, resource.material_white.duplicate())
|
||||
hexagon_small.get_surface_override_material(0).albedo_texture = resource.material_white.albedo_texture
|
||||
|
||||
if is_black:
|
||||
hexagon_small.rotation.y = PI
|
||||
|
||||
var mat: StandardMaterial3D = hexagon_small.get_surface_override_material(0)
|
||||
mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
|
||||
mat.albedo_color.a = 0.5
|
||||
#var mat: StandardMaterial3D = hexagon_small.get_surface_override_material(0)
|
||||
#mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
|
||||
#mat.albedo_color.a = 0.5
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue