com.shinolab.autd3-sdk.pattern 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Pattern.cs ADDED
@@ -0,0 +1,465 @@
1
+ using System;
2
+ using System.Collections;
3
+ using System.Collections.Generic;
4
+ using System.Numerics;
5
+ using System.Runtime.InteropServices;
6
+
7
+ namespace AUTD3
8
+ {
9
+ [StructLayout(LayoutKind.Sequential)]
10
+ internal struct PatternOptionNative
11
+ {
12
+ public byte Intensity;
13
+ public byte PhaseOffset;
14
+ }
15
+
16
+ public readonly struct FocusOption
17
+ {
18
+ public Intensity Intensity { get; }
19
+ public Phase PhaseOffset { get; }
20
+
21
+ public FocusOption() : this(intensity: null)
22
+ {
23
+ }
24
+
25
+ public FocusOption(Intensity? intensity = null, Phase? phaseOffset = null)
26
+ {
27
+ Intensity = intensity ?? Intensity.Max;
28
+ PhaseOffset = phaseOffset ?? Phase.Zero;
29
+ }
30
+
31
+ internal PatternOptionNative ToNative() =>
32
+ new PatternOptionNative { Intensity = Intensity.Value, PhaseOffset = PhaseOffset.Value };
33
+ }
34
+
35
+ public readonly struct PlaneOption
36
+ {
37
+ public Intensity Intensity { get; }
38
+ public Phase PhaseOffset { get; }
39
+
40
+ public PlaneOption() : this(intensity: null)
41
+ {
42
+ }
43
+
44
+ public PlaneOption(Intensity? intensity = null, Phase? phaseOffset = null)
45
+ {
46
+ Intensity = intensity ?? Intensity.Max;
47
+ PhaseOffset = phaseOffset ?? Phase.Zero;
48
+ }
49
+
50
+ internal PatternOptionNative ToNative() =>
51
+ new PatternOptionNative { Intensity = Intensity.Value, PhaseOffset = PhaseOffset.Value };
52
+ }
53
+
54
+ public readonly struct BesselOption
55
+ {
56
+ public Intensity Intensity { get; }
57
+ public Phase PhaseOffset { get; }
58
+
59
+ public BesselOption() : this(intensity: null)
60
+ {
61
+ }
62
+
63
+ public BesselOption(Intensity? intensity = null, Phase? phaseOffset = null)
64
+ {
65
+ Intensity = intensity ?? Intensity.Max;
66
+ PhaseOffset = phaseOffset ?? Phase.Zero;
67
+ }
68
+
69
+ internal PatternOptionNative ToNative() =>
70
+ new PatternOptionNative { Intensity = Intensity.Value, PhaseOffset = PhaseOffset.Value };
71
+ }
72
+
73
+ [StructLayout(LayoutKind.Sequential)]
74
+ internal struct EmissionNative
75
+ {
76
+ public byte Phase;
77
+ public byte Intensity;
78
+ }
79
+
80
+ internal static class NativePattern
81
+ {
82
+ private const string Lib = "autd3_pattern";
83
+
84
+ [DllImport(Lib)]
85
+ internal static extern float autd3_pattern_wavelength(float soundSpeedMmPerS);
86
+
87
+ [DllImport(Lib)]
88
+ internal static extern IntPtr autd3_core_geometry_pattern_buffer(IntPtr geometry);
89
+
90
+ [DllImport(Lib)]
91
+ internal static extern IntPtr autd3_pattern_buffer_from_array(EmissionNative[] emissions, UIntPtr numDevices);
92
+
93
+ [DllImport(Lib)]
94
+ internal static extern UIntPtr autd3_pattern_buffer_num_devices(IntPtr buffer);
95
+
96
+ [DllImport(Lib)]
97
+ internal static extern UIntPtr autd3_pattern_buffer_num_transducers(IntPtr buffer, UIntPtr dev);
98
+
99
+ [DllImport(Lib)]
100
+ internal static extern int autd3_pattern_buffer_get(IntPtr buffer, UIntPtr dev, UIntPtr tr, out EmissionNative @out);
101
+
102
+ [DllImport(Lib)]
103
+ internal static extern int autd3_pattern_buffer_set(IntPtr buffer, UIntPtr dev, UIntPtr tr, EmissionNative emission);
104
+
105
+ [DllImport(Lib)]
106
+ internal static extern void autd3_pattern_buffer_free(IntPtr buffer);
107
+
108
+ [DllImport(Lib)]
109
+ internal static extern int autd3_pattern_focus(IntPtr geometry, float[] target, float wavelengthMm, in PatternOptionNative option, IntPtr buffer);
110
+
111
+ [DllImport(Lib)]
112
+ internal static extern int autd3_pattern_focus_device(IntPtr geometry, UIntPtr dev, float[] target, float wavelengthMm, in PatternOptionNative option, [Out] EmissionNative[] dst);
113
+
114
+ [DllImport(Lib)]
115
+ internal static extern int autd3_pattern_focus_transducer(float[] position, float[] target, float wavelengthMm, in PatternOptionNative option, out EmissionNative @out);
116
+
117
+ [DllImport(Lib)]
118
+ internal static extern int autd3_pattern_plane(IntPtr geometry, float[] dir, float wavelengthMm, in PatternOptionNative option, IntPtr buffer);
119
+
120
+ [DllImport(Lib)]
121
+ internal static extern int autd3_pattern_plane_device(IntPtr geometry, UIntPtr dev, float[] dir, float wavelengthMm, in PatternOptionNative option, [Out] EmissionNative[] dst);
122
+
123
+ [DllImport(Lib)]
124
+ internal static extern int autd3_pattern_plane_transducer(float[] position, float[] dir, float wavelengthMm, in PatternOptionNative option, out EmissionNative @out);
125
+
126
+ [DllImport(Lib)]
127
+ internal static extern int autd3_pattern_bessel(IntPtr geometry, float[] apex, float[] dir, float thetaRad, float wavelengthMm, in PatternOptionNative option, IntPtr buffer);
128
+
129
+ [DllImport(Lib)]
130
+ internal static extern int autd3_pattern_bessel_device(IntPtr geometry, UIntPtr dev, float[] apex, float[] dir, float thetaRad, float wavelengthMm, in PatternOptionNative option, [Out] EmissionNative[] dst);
131
+
132
+ [DllImport(Lib)]
133
+ internal static extern int autd3_pattern_bessel_transducer(float[] position, float[] apex, float[] dir, float thetaRad, float wavelengthMm, in PatternOptionNative option, out EmissionNative @out);
134
+
135
+ [DllImport(Lib)]
136
+ internal static extern int autd3_pattern_uniform(byte phase, byte intensity, IntPtr buffer);
137
+
138
+ [DllImport(Lib)]
139
+ internal static extern void autd3_pattern_null(IntPtr buffer);
140
+
141
+
142
+ [DllImport("autd3capi")]
143
+ internal static extern IntPtr autd3_op_pattern(byte bank, IntPtr patternBuffer);
144
+
145
+ [DllImport("autd3capi")]
146
+ internal static extern IntPtr autd3_op_write_pattern_buffer(byte bank, ushort index, IntPtr patternBuffer);
147
+
148
+ [DllImport("autd3capi")]
149
+ internal static extern IntPtr autd3_op_write_pattern_compressed(byte bank, uint index, byte format, IntPtr[] patterns, UIntPtr numPatterns);
150
+
151
+ [DllImport("autd3capi")]
152
+ internal static extern IntPtr autd3_op_config_pattern(byte bank, IntPtr samplingConfig, uint size, ushort rep);
153
+
154
+ [DllImport("autd3capi")]
155
+ internal static extern IntPtr autd3_op_config_foci_stm(byte bank, IntPtr samplingConfig, uint size, byte numFoci, float soundSpeedMPerS, ushort rep);
156
+
157
+ [DllImport("autd3capi")]
158
+ internal static extern IntPtr autd3_op_change_pattern_bank(byte bank, byte transitionMode, ulong transitionValue);
159
+ }
160
+
161
+ public readonly struct DevicePattern : IEnumerable<Emission>
162
+ {
163
+ private readonly IntPtr _buffer;
164
+ private readonly UIntPtr _dev;
165
+
166
+ internal DevicePattern(IntPtr buffer, UIntPtr dev)
167
+ {
168
+ _buffer = buffer;
169
+ _dev = dev;
170
+ }
171
+
172
+ public int NumTransducers => (int)NativePattern.autd3_pattern_buffer_num_transducers(_buffer, _dev);
173
+
174
+ public Emission this[int tr]
175
+ {
176
+ get
177
+ {
178
+ if (NativePattern.autd3_pattern_buffer_get(_buffer, _dev, (UIntPtr)tr, out var e) != 0)
179
+ throw new ArgumentOutOfRangeException(nameof(tr));
180
+ return new Emission(new Phase(e.Phase), new Intensity(e.Intensity));
181
+ }
182
+ set
183
+ {
184
+ var native = new EmissionNative { Phase = value.Phase.Value, Intensity = value.Intensity.Value };
185
+ if (NativePattern.autd3_pattern_buffer_set(_buffer, _dev, (UIntPtr)tr, native) != 0)
186
+ throw new ArgumentOutOfRangeException(nameof(tr));
187
+ }
188
+ }
189
+
190
+ public IEnumerator<Emission> GetEnumerator()
191
+ {
192
+ var count = NumTransducers;
193
+ for (var i = 0; i < count; i++)
194
+ {
195
+ yield return this[i];
196
+ }
197
+ }
198
+
199
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
200
+ }
201
+
202
+ public sealed class PatternBuffer : IDisposable, IEnumerable<DevicePattern>
203
+ {
204
+ internal const int NumTransducers = 249;
205
+
206
+ internal IntPtr Handle { get; private set; }
207
+
208
+ internal PatternBuffer(IntPtr handle)
209
+ {
210
+ if (handle == IntPtr.Zero)
211
+ {
212
+ throw new Autd3Exception("failed to create pattern buffer");
213
+ }
214
+ Handle = handle;
215
+ }
216
+
217
+ public static PatternBuffer FromArray(Emission[][] emissions)
218
+ {
219
+ var numDevices = emissions.Length;
220
+ var flat = new EmissionNative[numDevices * NumTransducers];
221
+ for (var d = 0; d < numDevices; d++)
222
+ {
223
+ if (emissions[d].Length != NumTransducers)
224
+ {
225
+ throw new Autd3Exception($"each device requires {NumTransducers} emissions");
226
+ }
227
+ for (var t = 0; t < NumTransducers; t++)
228
+ {
229
+ flat[d * NumTransducers + t] = new EmissionNative
230
+ {
231
+ Phase = emissions[d][t].Phase.Value,
232
+ Intensity = emissions[d][t].Intensity.Value,
233
+ };
234
+ }
235
+ }
236
+ return new PatternBuffer(NativePattern.autd3_pattern_buffer_from_array(flat, (UIntPtr)numDevices));
237
+ }
238
+
239
+ public int NumDevices => (int)NativePattern.autd3_pattern_buffer_num_devices(Handle);
240
+
241
+ public DevicePattern this[int dev]
242
+ {
243
+ get
244
+ {
245
+ if (dev < 0 || dev >= NumDevices)
246
+ throw new ArgumentOutOfRangeException(nameof(dev));
247
+ return new DevicePattern(Handle, (UIntPtr)dev);
248
+ }
249
+ }
250
+
251
+ public IEnumerator<DevicePattern> GetEnumerator()
252
+ {
253
+ var count = NumDevices;
254
+ for (var i = 0; i < count; i++)
255
+ {
256
+ yield return this[i];
257
+ }
258
+ }
259
+
260
+ IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
261
+
262
+ public void Dispose()
263
+ {
264
+ if (Handle != IntPtr.Zero)
265
+ {
266
+ NativePattern.autd3_pattern_buffer_free(Handle);
267
+ Handle = IntPtr.Zero;
268
+ }
269
+ GC.SuppressFinalize(this);
270
+ }
271
+
272
+ ~PatternBuffer()
273
+ {
274
+ if (Handle != IntPtr.Zero)
275
+ {
276
+ NativePattern.autd3_pattern_buffer_free(Handle);
277
+ }
278
+ }
279
+ }
280
+
281
+ public static class GeometryPatternBufferExtensions
282
+ {
283
+ public static PatternBuffer PatternBuffer(this Geometry geometry) =>
284
+ new PatternBuffer(NativePattern.autd3_core_geometry_pattern_buffer(geometry.Handle));
285
+ }
286
+
287
+
288
+
289
+
290
+ public sealed class Pattern : ICommand
291
+ {
292
+ private readonly PatternBank _bank;
293
+ private readonly PatternBuffer _buffer;
294
+
295
+ public Pattern(PatternBuffer emissions) : this(PatternBank.B0, emissions)
296
+ {
297
+ }
298
+
299
+ public Pattern(PatternBank bank, PatternBuffer emissions)
300
+ {
301
+ _bank = bank;
302
+ _buffer = emissions;
303
+ }
304
+
305
+ IntPtr ICommand.CreateOp() => NativePattern.autd3_op_pattern((byte)_bank, _buffer.Handle);
306
+
307
+
308
+ public static Length Wavelength(Velocity soundSpeed) =>
309
+ new Length(NativePattern.autd3_pattern_wavelength(soundSpeed.MmPerS));
310
+
311
+
312
+ public static void Focus(Geometry geometry, Vector3 target, Length wavelength, FocusOption option, PatternBuffer dst)
313
+ {
314
+ var t = Coords.PointArray(target);
315
+ var o = option.ToNative();
316
+ if (NativePattern.autd3_pattern_focus(geometry.Handle, t, wavelength.Mm, in o, dst.Handle) != 0)
317
+ {
318
+ throw new Autd3Exception("focus failed (buffer device count must match geometry)");
319
+ }
320
+ }
321
+
322
+ public static void Focus(Geometry geometry, Vector3 target, Length wavelength, Intensity intensity, PatternBuffer dst) =>
323
+ Focus(geometry, target, wavelength, new FocusOption(intensity), dst);
324
+
325
+ public static void FocusDevice(Device device, Vector3 target, Length wavelength, FocusOption option, Emission[] dst)
326
+ {
327
+ var native = ToNativeDst(dst);
328
+ var o = option.ToNative();
329
+ if (NativePattern.autd3_pattern_focus_device(device.GeometryHandle, device.DeviceIndex,
330
+ Coords.PointArray(target), wavelength.Mm, in o, native) != 0)
331
+ {
332
+ throw new Autd3Exception("focus_device failed");
333
+ }
334
+ FromNativeDst(native, dst);
335
+ }
336
+
337
+ public static Emission FocusTransducer(Vector3 position, Vector3 target, Length wavelength, FocusOption option)
338
+ {
339
+ var o = option.ToNative();
340
+ if (NativePattern.autd3_pattern_focus_transducer(
341
+ Coords.PointArray(position),
342
+ Coords.PointArray(target), wavelength.Mm, in o, out var e) != 0)
343
+ {
344
+ throw new Autd3Exception("focus_transducer failed");
345
+ }
346
+ return new Emission(new Phase(e.Phase), new Intensity(e.Intensity));
347
+ }
348
+
349
+ public static void Plane(Geometry geometry, Vector3 dir, Length wavelength, PlaneOption option, PatternBuffer dst)
350
+ {
351
+ var d = Coords.DirArray(dir);
352
+ var o = option.ToNative();
353
+ if (NativePattern.autd3_pattern_plane(geometry.Handle, d, wavelength.Mm, in o, dst.Handle) != 0)
354
+ {
355
+ throw new Autd3Exception("plane failed (buffer device count must match geometry)");
356
+ }
357
+ }
358
+
359
+ public static void PlaneDevice(Device device, Vector3 dir, Length wavelength, PlaneOption option, Emission[] dst)
360
+ {
361
+ var native = ToNativeDst(dst);
362
+ var o = option.ToNative();
363
+ if (NativePattern.autd3_pattern_plane_device(device.GeometryHandle, device.DeviceIndex,
364
+ Coords.DirArray(dir), wavelength.Mm, in o, native) != 0)
365
+ {
366
+ throw new Autd3Exception("plane_device failed");
367
+ }
368
+ FromNativeDst(native, dst);
369
+ }
370
+
371
+ public static Emission PlaneTransducer(Vector3 position, Vector3 dir, Length wavelength, PlaneOption option)
372
+ {
373
+ var o = option.ToNative();
374
+ if (NativePattern.autd3_pattern_plane_transducer(
375
+ Coords.PointArray(position),
376
+ Coords.DirArray(dir), wavelength.Mm, in o, out var e) != 0)
377
+ {
378
+ throw new Autd3Exception("plane_transducer failed");
379
+ }
380
+ return new Emission(new Phase(e.Phase), new Intensity(e.Intensity));
381
+ }
382
+
383
+ public static void Bessel(Geometry geometry, Vector3 apex, Vector3 dir, Angle theta, Length wavelength, BesselOption option, PatternBuffer dst)
384
+ {
385
+ var a = Coords.PointArray(apex);
386
+ var d = Coords.DirArray(dir);
387
+ var o = option.ToNative();
388
+ if (NativePattern.autd3_pattern_bessel(geometry.Handle, a, d, theta.Radian, wavelength.Mm, in o, dst.Handle) != 0)
389
+ {
390
+ throw new Autd3Exception("bessel failed (buffer device count must match geometry)");
391
+ }
392
+ }
393
+
394
+ public static void BesselDevice(Device device, Vector3 apex, Vector3 dir, Angle theta, Length wavelength, BesselOption option, Emission[] dst)
395
+ {
396
+ var native = ToNativeDst(dst);
397
+ var o = option.ToNative();
398
+ if (NativePattern.autd3_pattern_bessel_device(device.GeometryHandle, device.DeviceIndex,
399
+ Coords.PointArray(apex),
400
+ Coords.DirArray(dir), theta.Radian, wavelength.Mm, in o, native) != 0)
401
+ {
402
+ throw new Autd3Exception("bessel_device failed");
403
+ }
404
+ FromNativeDst(native, dst);
405
+ }
406
+
407
+ public static Emission BesselTransducer(Vector3 position, Vector3 apex, Vector3 dir, Angle theta, Length wavelength, BesselOption option)
408
+ {
409
+ var o = option.ToNative();
410
+ if (NativePattern.autd3_pattern_bessel_transducer(
411
+ Coords.PointArray(position),
412
+ Coords.PointArray(apex),
413
+ Coords.DirArray(dir), theta.Radian, wavelength.Mm, in o, out var e) != 0)
414
+ {
415
+ throw new Autd3Exception("bessel_transducer failed");
416
+ }
417
+ return new Emission(new Phase(e.Phase), new Intensity(e.Intensity));
418
+ }
419
+
420
+ public static void Uniform(Emission emission, PatternBuffer dst)
421
+ {
422
+ if (NativePattern.autd3_pattern_uniform(emission.Phase.Value, emission.Intensity.Value, dst.Handle) != 0)
423
+ {
424
+ throw new Autd3Exception("uniform failed");
425
+ }
426
+ }
427
+
428
+ public static void UniformDevice(Emission emission, Emission[] dst)
429
+ {
430
+ for (var i = 0; i < dst.Length; i++)
431
+ {
432
+ dst[i] = emission;
433
+ }
434
+ }
435
+
436
+ public static void Null(PatternBuffer dst) => NativePattern.autd3_pattern_null(dst.Handle);
437
+
438
+ public static void NullDevice(Emission[] dst)
439
+ {
440
+ for (var i = 0; i < dst.Length; i++)
441
+ {
442
+ dst[i] = Emission.Null;
443
+ }
444
+ }
445
+
446
+ public static void NullTransducer(ref Emission dst) => dst = Emission.Null;
447
+
448
+ private static EmissionNative[] ToNativeDst(Emission[] dst)
449
+ {
450
+ if (dst.Length != Autd3.NumTransducers)
451
+ {
452
+ throw new Autd3Exception($"dst requires {Autd3.NumTransducers} emissions");
453
+ }
454
+ return new EmissionNative[dst.Length];
455
+ }
456
+
457
+ private static void FromNativeDst(EmissionNative[] native, Emission[] dst)
458
+ {
459
+ for (var i = 0; i < dst.Length; i++)
460
+ {
461
+ dst[i] = new Emission(new Phase(native[i].Phase), new Intensity(native[i].Intensity));
462
+ }
463
+ }
464
+ }
465
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 0c101e770e61c2b3352b404d9459e250
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,35 @@
1
+ fileFormatVersion: 2
2
+ guid: 7f3a04e8d88bf6d7d83bd3b33687726e
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 0
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ Any:
16
+ second:
17
+ enabled: 0
18
+ settings: {}
19
+ - first:
20
+ Editor: Editor
21
+ second:
22
+ enabled: 1
23
+ settings:
24
+ CPU: x86_64
25
+ DefaultValueInitialized: true
26
+ OS: Linux
27
+ - first:
28
+ Standalone: Linux64
29
+ second:
30
+ enabled: 1
31
+ settings:
32
+ CPU: x86_64
33
+ userData:
34
+ assetBundleName:
35
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: a5da2ff0ca717fdd538eb5a0c1e99d10
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -0,0 +1,35 @@
1
+ fileFormatVersion: 2
2
+ guid: 589b0747061aed9342df23ec8ee3a8a4
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 0
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ Any:
16
+ second:
17
+ enabled: 0
18
+ settings: {}
19
+ - first:
20
+ Editor: Editor
21
+ second:
22
+ enabled: 1
23
+ settings:
24
+ CPU: ARM64
25
+ DefaultValueInitialized: true
26
+ OS: OSX
27
+ - first:
28
+ Standalone: OSXUniversal
29
+ second:
30
+ enabled: 1
31
+ settings:
32
+ CPU: ARM64
33
+ userData:
34
+ assetBundleName:
35
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: ff30923f089e4dff5fb3971a9d07ae4e
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -0,0 +1,35 @@
1
+ fileFormatVersion: 2
2
+ guid: 90f0e7723f71a42a51d5a5e941a27aa3
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 0
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ Any:
16
+ second:
17
+ enabled: 0
18
+ settings: {}
19
+ - first:
20
+ Editor: Editor
21
+ second:
22
+ enabled: 1
23
+ settings:
24
+ CPU: x86_64
25
+ DefaultValueInitialized: true
26
+ OS: Windows
27
+ - first:
28
+ Standalone: Win64
29
+ second:
30
+ enabled: 1
31
+ settings:
32
+ CPU: x86_64
33
+ userData:
34
+ assetBundleName:
35
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: 276f479b900c484dc4f353124a638b18
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
package/Plugins.meta ADDED
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: cae5a78d3378a1ab867ac279f21af9ea
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # AUTD3 Pattern (Unity)
2
+
3
+ Emission patterns such as a single focus, a plane wave or a Bessel beam.
4
+
5
+ ## Install
6
+
7
+ Add the scoped registry and the package to `Packages/manifest.json`; sibling
8
+ AUTD3 packages are resolved from the registry automatically.
9
+
10
+ ```json
11
+ {
12
+ "scopedRegistries": [
13
+ { "name": "npmjs", "url": "https://registry.npmjs.org", "scopes": ["com.shinolab"] }
14
+ ],
15
+ "dependencies": {
16
+ "com.shinolab.autd3-sdk.pattern": "0.1.0"
17
+ }
18
+ }
19
+ ```
20
+
21
+ Packages served from `registry.npmjs.org` do **not** appear in the Package Manager's
22
+ *My Registries* tab, because npmjs does not implement the legacy `/-/all` route that
23
+ Unity's package listing relies on. Resolution is unaffected: edit the manifest as above,
24
+ or use **+ → Add package by name**.
25
+
26
+ ## Platforms
27
+
28
+ Editor and Standalone builds on Windows (`win-x64`), Linux (`linux-x64`) and Apple
29
+ Silicon macOS (`osx-arm64`). Intel macOS is not shipped.
30
+
31
+ ## Notes
32
+
33
+ Minimum Unity version is 6 (6000.x). The API speaks Unity's left-handed, metre frame;
34
+ conversion to the AUTD3 canonical frame happens at the binding boundary.
35
+
36
+ See the [Unity binding README](https://github.com/shinolab/autd3-sdk/blob/main/bindings/unity/README.md) for the
37
+ coordinate system, the full package list and local development with `file:` references.
38
+
39
+ ## License
40
+
41
+ MIT. See `LICENSE.md`. Third-party notices are in `THIRD-PARTY-LICENSES.md`.
package/README.md.meta ADDED
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 338c6a0e925f4ce210e373ca6bbd7fd3
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant: