This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| "data": { | |
| "type": "properties", | |
| "collection": [ | |
| { | |
| "objectid": 2, | |
| "name": "1FL", | |
| "externalId": "e3e052f9-0156-11d5-9301-0000863f27ad-00000137", | |
| "properties": { | |
| "拘束": { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // stateを保持するためのクロージャ | |
| let createClosure = function(){ | |
| let state; | |
| // クロージャを参照可能な関数を組み立てて返却する | |
| return function useState(initialValue){ | |
| // クロージャのstateが初期化されてなければinitialValueで初期化 | |
| if(!state){ | |
| state = initialValue; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | { | |
| platform: { | |
| cpu: 'Apple processor', | |
| coreNum: 8, | |
| totalMemory: 8589934592, | |
| nodeVersion: 'v15.5.0', | |
| os: 'darwin, 20.1.0' | |
| }, | |
| result: { | |
| typescript: [ 2394, 2405, 2396, 2391 ], | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // Forgeから取得したJSONをNodeでファミリごとに割り当て済みのマテリアルをリスト化するsnipet | |
| // ForgeのDerivative APIで取得できるpropertiesとtreeのJSON | |
| const t= require("tree"); | |
| const p = require("properties"); | |
| var list = t.objects.filter((f)=>{ | |
| // インスタンスもってるファミリだけにフィルタリング | |
| const types = f.objects; | |
| return types.every((type)=>{ return type.objects }) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // なにこれ? | |
| // -> ReactHooksで実装したPixelSteamingのハンドシェイクをコンソールにペタペタしたら動くようにしてみた | |
| // 0. ゴールと前提 | |
| // ゴール: | |
| // - WebSocket(SignalingServer)とWebRTC APIを介して経路情報を交換してPixelStreaming PluginとのP2Pを確立する | |
| // - WebRTCのvideoストリームを取得する | |
| // - WebRTCのデータチャネルを繋いでブラウザのアクションとPixelStreamingからのデータを受け取れるようにする | |
| // - videoストリームが取得できたらDOMのsrcObjectに渡してブラウザでストリームを表示する | |
| // 前提: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | npm install | |
| $peerConnectionOptions = "{ \""iceServers\"": [{\""urls\"": [\""stun:stun.l.google.com:19302\""]}] }" | |
| $ProcessExe = "node.exe" | |
| $Arguments = @("cirrus", "--peerConnectionOptions=""$peerConnectionOptions""") | |
| # Add arguments passed to script to Arguments for executable | |
| $Arguments += $args | |
| Write-Output "Running: $ProcessExe $Arguments" | |
| Start-Process -FilePath $ProcessExe -ArgumentList $Arguments -Wait -NoNewWindow | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React, { useState, useEffect, useRef } from "react"; | |
| import logo from "./logo.svg"; | |
| import "./App.css"; | |
| import usePixelStreaming from "./usePixelStreaming"; | |
| function App() { | |
| const videoElement = useRef(null); | |
| const { peer, dataChannel, videoStream } = usePixelStreaming("ws://YOUR_PIXEL_STREAMING_HOST"); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | {"lastUpload":"2020-11-05T02:03:37.362Z","extensionVersion":"v3.4.3"} |