5
3

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 5 years have passed since last update.

VRC_WebPanel中のJSから取得できる情報メモ

Posted at

自分用に記録したものですが、腐らせておくのももったいないのでメモ。
VRC_WebPanel内でJSを叩いたときに返ってくる値の一覧です。
実験時のバージョンはVRChat 2018.2.2前後です。

Coherent UIで呼び出し可能な関数

ListBindingsを呼んだときの関数名一覧。
(参考: http://vrcprog.hatenablog.jp/?page=1515297851)

FullScreen
ReportSelectedElement
ListBindings
VRCSDK2.VRCPlayerModFactory.Create
VRCSDK2.VRCSerializableSystemType.op_Equality
VRCSDK2.VRCSerializableSystemType.op_Inequality
VRCSDK2.VRC_Editor.RecordActivity
VRCSDK2.VRC_EventHandler.BooleanOp
VRCSDK2.VRC_EventHandler.get_GetInsitgatorId
VRCSDK2.VRC_EventHandler.set_GetInsitgatorId
VRCSDK2.VRC_EventHandler.HasEventTrigger
VRCSDK2.InputManager.IsUsingHandController
VRCSDK2.InputManager.GetLastUsedInputMethod
VRCSDK2.InputManager.GetBoolInputSetting
VRCSDK2.InputManager.SetBoolInputSetting
VRCSDK2.InputManager.EnableObjectHighlight
VRCSDK2.Networking.get_SceneEventHandler
VRCSDK2.Networking.get_IsNetworkSettled
VRCSDK2.Networking.get_IsMaster
VRCSDK2.Networking.get_LocalPlayer
VRCSDK2.Networking.IsOwner
VRCSDK2.Networking.GetOwner
VRCSDK2.Networking.SetOwner
VRCSDK2.Networking.IsObjectReady
VRCSDK2.Networking.Instantiate
VRCSDK2.Networking.RPC
VRCSDK2.Networking.SendMessage
VRCSDK2.Networking.EncodeParameters
VRCSDK2.Networking.DecodeParameters
VRCSDK2.Networking.Destroy
VRCSDK2.Networking.GetUniqueName
VRCSDK2.Networking.GoToRoom
VRCSDK2.Networking.GetNetworkDateTime
VRCSDK2.Networking.GetServerTimeInSeconds
VRCSDK2.Networking.GetServerTimeInMilliseconds
VRCSDK2.Networking.CalculateServerDeltaTime
VRCSDK2.VRC_Serialization.ParameterEncoder
VRCSDK2.VRC_Serialization.ParameterDecoder
VRCSDK2.VRC_Serialization.get_Dispatcher
VRCSDK2.VRC_NpcApi.GetApiByGameObject
VRCSDK2.VRC_PlayerApi.get_AllPlayers
VRCSDK2.VRC_PlayerApi.GetPlayerId
VRCSDK2.VRC_PlayerApi.GetPlayerByGameObject
VRCSDK2.VRC_PlayerApi.GetPlayerById
VRCSDK2.VRC_CombatSystem.GetInstance
VRCSDK2.VRCAnalytics.Send
VRCSDK2.VRCAnalytics.SetUserProperties
VRCSDK2.VRC_MetadataListener.get_currentMetadata
VRCSDK2.VRC_MetadataListener.TriggerUpdate
VRCSDK2.VRC_SceneDescriptor.GetPrefab
VRCSDK2.VRC_SceneDescriptor.GetMaterial
VRCSDK2.VRC_SceneDescriptor.get_Instance
VRCSDK2.VRC_Trigger.TriggerCustom
VRCSDK2.VRC_Trigger.Trigger
VRCSDK2.Tutorial.ActivateAreaMarkerLabel
VRCSDK2.Tutorial.DeactivateObjectLabel
VRCSDK2.Tutorial.DeactivateControllerLabel

GETヘッダ

普通のページをGETしたときのヘッダ。
(参考: https://ishiis.net/2016/10/10/python-http-server/)

Host: [ホスト名]
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.28 Safari/537.36
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en

システム情報

navigatorのプロパティを取得したもの。
in演算子が使えなかったため、https://developer.mozilla.org/ja/docs/Web/API/Navigator から適当にスクレイピングしたプロパティのみ試しました。また、undefinedなものは除外しました。

appCodeName: Mozilla
appName: Netscape
appVersion: 5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.28 Safari/537.36
cookieEnabled: true
geolocation: [object Geolocation]
hardwareConcurrency: 12
javaEnabled: function javaEnabled() { [native code] }
language: en-us
languages: 
mimeTypes: [object MimeTypeArray]
onLine: true
platform: Win32
plugins: [object PluginArray]
product: Gecko
serviceWorker: [object ServiceWorkerContainer]
userAgent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.28 Safari/537.36
cookieEnabled: true
doNotTrack: null
productSub: 20030107
vendor: Google Inc.
vendorSub: 

おまけ: VRC_WebPanel上のJSで取得した文字列を取得する

上記の情報はpython3 -m http.serverで立てたローカルサーバで実験していますが、VRC_WebPanelで表示される文字列はテクスチャとして表示されるため直接コピペできません。また直接コンソールを叩くこともできません。

そこで以下のように書くと自動でGETが走るため、(サーバを実行中の) コンソール上に出てきた文字列をdecodeURIComponentするとstrが得られます。

document.write("<img src=\"" + encodeURIComponent(str) + "\">");
5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?