0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

neosでlogix その142

Last updated at Posted at 2023-08-05

概要

neosでlogixやってみる。
neosvrのlogixをコード化する試み。

俺コード仕様

  • ネームスペース
    devツールの新規は、ネームスペースObj
    コンポーネントの追加は、ネームスペースFrooxEngine
    ノードブラウザのLogiXは、ネームスペースLogiXで、省略可

  • 基本
    {_, _, _, _, a, b, _, _, _, _} = StandardController GetActiveUser

    {出力端子1, 出力端子2} = デバイス名 入力端子1, 入力端子2

  • 仮想wire
    d = FireWhileTrue

    仮想ワイヤー

  • パイプ |>
    e = c |> FindChildByName "Logix" 2

    cが入力端子1となる

サンプル1

音を鳴らす。

a = Pulse
b = "egg"
c = RootSlot
{d, e} = AttachAudioClip a, b, c
PlayOneShot d, e

2022-03-04 22.41.59.jpg

サンプル2

触ると、パーティクルが出る箱を作れ。

{v, _, _, _, _, _, _, _} = Obj.Box.TouchButton
{a, _, b, _, _, _, _, _, _, _} = ButtonEvents v
{c, _, _} = BooleanLatch a b
FrooxEngine.ParticleSystem.CircleEmitter.Enabled = c


2023-02-19 07.14.49.jpg

サンプル3

neos uiを使って、websocketで、オウム返しを取得するオブジェクトを作成せよ。

{p0, _} = ButtonEvents Obj.Button
{p1, _} = ButtonEvents Obj.Button
{_} = WebsocketConnect p0, FrooxEngine.WebSocketClient, "ws://localhost:50002", HostUser
{_, _, _} = WebsocketTextMessageSender p1, FrooxEngine.WebSocketClient, Obj.TextField.text
{p2, d} = WebsocketTextMessageReceiver FrooxEngine.WebSocketClient
{v} = Write p2, d
Obj.test.txt.text = v


2023-05-01 23.55.39.jpg

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?