avatarChangedListeners.push((avatar) => {
const meta = player.avatar.vrm?.meta
console.log(`changed to ${meta?.metaVersion === "0" ? meta.title : meta?.name}`);
});
DOM element to attach some controls
domRoot.appendChild(myDiv);
EnvAdapter.addOtherPersonAvatarChangedListener
otherPersonAvatarChangedListeners.push((otherPerson) => {
const meta = otherPerson.avatar?.vrm?.meta
console.log(`changed to ${meta?.metaVersion === "0" ? meta.title : meta?.name}`);
});
addTextDataChangedListener
EnvAdapter.addTextDataChangedListener
addTextDataChangedListener((otherPerson, data) => {
console.log(data);
});
parsed player.getTextData()
initialize a module
Optional
options: voidverseModule.initialize(adjustNameplatePosition)
initialize a module
verseModule.initialize(micStatus, { textureUrl: "./asset/ui/mute.png" })
merging player.setTextData() like player.setTextData({...previousData, ...appendData})
putData({ foo: 1 }); // { foo: 1 }
putData({ bar: 2 }); // { foo: 1, bar: 2 }
getData(); // { foo: 1, bar: 2 }
initialize a module
Optional
cb: ((initializable) => unknown)verseModule.with(micStatus, ({ initialize }) =>
initialize({ textureUrl: "./asset/ui/mute.png" }),
)
Generated using TypeDoc
EnvAdapter.addTextDataChangedListener