Swap Unity.Mathematics usings for CultMath
Every Unity.Mathematics using, alias and qualified name under Assets\Scripts and tools now names CultMath. The nine `using static ...noise;` lines are gone: snoise lives on CultMath's math. UnityExtensions loses float4.ToColor and Color.ToFloat4, which duplicate the bridge's ToColor and ToCultMath; the float3 colour pair stays because the bridge has none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
1bad87fc35
commit
6140a06a0a
130 changed files with 281 additions and 293 deletions
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
using CultMath;
|
||||
using static CultMath.math;
|
||||
|
||||
public class MathJsonConverter : JsonConverter
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using MessagePack;
|
||||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
using CultMath;
|
||||
using static CultMath.math;
|
||||
|
||||
public class Float2Formatter : MessagePack.Formatters.IMessagePackFormatter<float2>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using MessagePack;
|
||||
using MessagePack.Formatters;
|
||||
using Unity.Mathematics;
|
||||
using static Unity.Mathematics.math;
|
||||
using CultMath;
|
||||
using static CultMath.math;
|
||||
|
||||
|
||||
public class MathResolver : IFormatterResolver
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public static class RegisterResolver
|
|||
var options = MessagePackSerializerOptions.Standard.WithResolver(resolver);
|
||||
MessagePackSerializer.DefaultOptions = options;
|
||||
|
||||
// Add Unity.Mathematics serialization support to Newtonsoft JSON
|
||||
// Add CultMath serialization support to Newtonsoft JSON
|
||||
JsonConvert.DefaultSettings = () => new JsonSerializerSettings
|
||||
{
|
||||
Converters = new List<JsonConverter>
|
||||
|
|
|
|||
Loading…
Reference in a new issue