Difference between revisions of "Write (LogiX node)/ja"

From Neos Wiki
Jump to navigation Jump to search
(Updating to match new version of source page)
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<languages></languages>
 
<languages></languages>
<div class="mw-translate-fuzzy">
+
{{Infobox Logix Node
Writeノードは、インパルスを受信すると、参照されたターゲット値を入力値で上書きします。
+
| Name = Write
</div>
+
| Image =[[File: WriteValueNode`1Node.png | noframe | 128px | 'Write' LogiX node ]]
 +
| Input0Type = Impulse | Input0Name = Write
 +
| Input1Type = dummy | Input1Name = Value
 +
| Output0Type = IValue`1 | Output0Name = Target
 +
| Output1Type = Impulse | Output1Name = OnDone
 +
| Output2Type = Impulse | Output2Name = OnFail
 +
}}
  
<div class="mw-translate-fuzzy">
+
'''Write'''ノードは、<code>Write</code>にインパルスを入力すると、参照されている <code>Target</code> 値を入力 <code>Value</code>値で上書きします。
<!--[[File:|border|256px|right]]-->
 
</div>
 
  
<div class="mw-translate-fuzzy">
+
== 使用方法 ==
== Inputs & Outputs ==
+
ノードブラウザから生成されたとき、<code>Value</code>入力はダミーのデータ型を持っています。これは、有効な入力が接続されたときに、入力データ型と一致するようにオーバーロードされます。入力のデータ型と、参照されている<code>Target</code>のデータ型は一致しなければなりません。
{| class="wikitable"
 
|+Inputs
 
|-
 
| Color
 
| Label
 
| Type
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| Write
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Dummy-color}}" |
 
| Value
 
| [[:Category:Types:Dummy| (dummy)]]
 
|}
 
</div>
 
  
  
The <code>OnDone</code> output fires an impulse when the <code>Target</code> value has been successfully overwritten after an impulse was received at <code>Write</code> '''or''' the <code>Target</code> value is driven by a system which allows an attempted written variable to be hooked (e.g. [[Drive (LogiX node)|Drive]] node, [[ValueCopy (Component)|ValueCopy]] component, etc.). This impulse continues the impulse chain which arrived at <code>Write</code>.
+
<code>OnDone</code> 出力は、<code>Write</code>にインパルスを入力した後に <code>Target</code> 値が正常に上書きされたとき、または <code>Target</code> 値が、書き込もうとした変数をフックできるシステム(例えば[[Drive (LogiX node)|Drive]]node,[[ValueCopy (Component)|ValueCopy]]コンポーネントなど)によってドライブされる場合にインパルスを出力します。このインパルスは、<code>Write</code>に到達したインパルスの連鎖を継続します。
  
  
The <code>OnFail</code> output fires an impulse when the <code>Target</code> value could not be set, e.g. if the <code>Target</code> value is driven from another source which does not allow hooking of the written value, or if there is no valid <code>Target</code>. This impulse continues the impulse chain which arrived at <code>Write</code>.
+
<code>OnFail</code> 出力は <code>Target</code> の値が設定できなかった場合、例えば <code>Target</code> の値が他のソースからドライブされ、書き込んだ値をフックできない場合、または有効な <code>Target</code> がない場合、インパルスを出力します。このインパルスは<code>Write</code>に到達したインパルスの連鎖を継続します。
  
  
Changing the value of a Variable node, Component field etc. via a Write node results in a datamodel change which will then be synchronised to other users in the session. Note that changes are only synchronised at the end of every update so, if multiple writes to the same target are performed by a single client within an update, only the final value will be sent. Additionally, no changes will be broadcast if the value is reset to the value it held at the beginning of an update. Due to this synchronisation process, it is inadvisable to write to a value very regularly (e.g. every update) unless absolutely necessary. It is generally better to use the [[drive|Drive]] system instead for continuously changing values to avoid unnecessary network traffic. [https://github.com/Neos-Metaverse/NeosPublic/issues/2590#issuecomment-874788205 Source].
+
WriteノードでVariableノード、Componentフィールドなどの値を変更すると、データモデルの変更が行われ、セッション内の他のユーザーと同期されます。変更は更新の最後にのみ同期されるため、1 つのクライアントが同じターゲットに複数の書き込みを行った場合、最終的な値のみが送信されることに注意してください。さらに、値が更新の開始時に持っていた値にリセットされた場合、変更はブロードキャストされません。この同期処理のため、絶対に必要な場合を除き、非常に定期的に (たとえばアップデートのたびに) 値を書き込むことは望ましくありません。不必要なネットワークトラフィックを避けるため、連続的に変化する値には代わりに[[drive/ja|ドライブ]]システムを使用する方が一般的によいでしょう。[https://github.com/Neos-Metaverse/NeosPublic/issues/2590#issuecomment-874788205 ソース].
  
Generally, with a Write/Write Latch node, one can only write to component or slot fields which are value-typed (e.g. bools, ints, strings, floats), whereas reference-typed fields (e.g. slot, user, IAssetProvider<AudioClip> etc.) require [[Write Ref (LogiX node)|Write Ref]]. However, it ''is'' possible to write to reference-typed LogiX variable nodes using a Write/Write Latch node where it ''isn't'' possible to do so with Write Ref. It is also possible to write to reference-typed fields using Write/Write Latch if the input <code>SetValue</code> and <code>ResetValue</code> are RefIDs, rather than reference datatypes - it is generally not recommended to work with raw RefIDs though.
+
一般的に、Write/Write Latch ノードでは、コンポーネントまたはスロットのフィールドは値型(bools、ints、string、float など)のみ書き込み可能ですが、参照型フィールド(スロット、ユーザー、IAssetProvider<AudioClip> など)は[[Write_Ref_(LogiX_node)/ja|Write Ref]]が必要です。しかし、参照型 LogiX 変数ノードに Write/Write Latch ノードを使用して書き込むことは可能ですが、Write Ref では不可能です。また、入力の <code>SetValue</code> <code>ResetValue</code> が参照データ型ではなく RefID の場合、Write/Write Latch を使用して参照型フィールドに書き込むことが可能です - しかし、生の RefID を扱うことは一般的にお勧めできません。
  
<div class="mw-translate-fuzzy">
+
== ==
{| class="wikitable"
+
[[File:LogiX.Actions.Write Example1.jpg|600px|Example of Write]]
|+Outputs
 
|-
 
| Color
 
| Label
 
| Type
 
|-
 
| style="background-color:{{IValue-color}}" |
 
| Target
 
| [[:Category:Types:IValue`1|IValue<nowiki><T></nowiki>]]
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| OnDone
 
| [[:LogiX:Impulses|Impulse]]
 
|-
 
| style="background-color:{{Impulse-color}}" |
 
| OnFail
 
| [[:LogiX:Impulses|Impulse]]
 
|}
 
</div>
 
  
<div class="mw-translate-fuzzy">
+
== ノードメニュー ==
== 使用方法 ==
 
ノード・ブラウザからスポーンされた場合、値の入力にはダミー(または未決定)の型が入っています。入力データ型と参照されるターゲットのデータ型は一致しなければなりません。
 
</div>
 
  
 
[[Category:LogiX{{#translation:}}|Write]]
 
[[Category:LogiX{{#translation:}}|Write]]
 
[[Category:LogiX:Actions{{#translation:}}|Write]]
 
[[Category:LogiX:Actions{{#translation:}}|Write]]
 
{{NodeMenu-Actions{{#translation:}}}}
 
{{NodeMenu-Actions{{#translation:}}}}

Latest revision as of 08:16, 20 February 2022

Other languages:
English • ‎日本語 • ‎한국어
Write
'Write' LogiX node
Inputs
  Impulse Write
  dummy Value
Outputs
  IValue`1 Target
  Impulse OnDone
  Impulse OnFail

Writeノードは、Writeにインパルスを入力すると、参照されている Target 値を入力 Value値で上書きします。

使用方法

ノードブラウザから生成されたとき、Value入力はダミーのデータ型を持っています。これは、有効な入力が接続されたときに、入力データ型と一致するようにオーバーロードされます。入力のデータ型と、参照されているTargetのデータ型は一致しなければなりません。


OnDone 出力は、Writeにインパルスを入力した後に Target 値が正常に上書きされたとき、または Target 値が、書き込もうとした変数をフックできるシステム(例えばDrivenode,ValueCopyコンポーネントなど)によってドライブされる場合にインパルスを出力します。このインパルスは、Writeに到達したインパルスの連鎖を継続します。


OnFail 出力は Target の値が設定できなかった場合、例えば Target の値が他のソースからドライブされ、書き込んだ値をフックできない場合、または有効な Target がない場合、インパルスを出力します。このインパルスはWriteに到達したインパルスの連鎖を継続します。


WriteノードでVariableノード、Componentフィールドなどの値を変更すると、データモデルの変更が行われ、セッション内の他のユーザーと同期されます。変更は更新の最後にのみ同期されるため、1 つのクライアントが同じターゲットに複数の書き込みを行った場合、最終的な値のみが送信されることに注意してください。さらに、値が更新の開始時に持っていた値にリセットされた場合、変更はブロードキャストされません。この同期処理のため、絶対に必要な場合を除き、非常に定期的に (たとえばアップデートのたびに) 値を書き込むことは望ましくありません。不必要なネットワークトラフィックを避けるため、連続的に変化する値には代わりにドライブシステムを使用する方が一般的によいでしょう。ソース.

一般的に、Write/Write Latch ノードでは、コンポーネントまたはスロットのフィールドは値型(bools、ints、string、float など)のみ書き込み可能ですが、参照型フィールド(スロット、ユーザー、IAssetProvider<AudioClip> など)はWrite Refが必要です。しかし、参照型 LogiX 変数ノードに Write/Write Latch ノードを使用して書き込むことは可能ですが、Write Ref では不可能です。また、入力の SetValueResetValue が参照データ型ではなく RefID の場合、Write/Write Latch を使用して参照型フィールドに書き込むことが可能です - しかし、生の RefID を扱うことは一般的にお勧めできません。

Example of Write

ノードメニュー

Actions
Back -- ++ Drive Drive Playback Tween Write
Write Latch Write Ref Write Ref Latch