
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@onirix/embed-sdk
Advanced tools
Take control of your Onirix augmented reality experiences. Responds to user interaction and acts on the 3D content of the scene.
This library acts as a wrapper of window.postMessage for simplifying communication with Onirix AR experiences. Not only can you use it in the online code editor of Onirix Studio projects, you can also connect to your scene loaded in an iFrame.
Take Onirix experiences to the next level.
Full documentation available at Onirix Docs.
npm install @onirix/embed-sdk
Or include the dependency within the HTML head tag:
<head>
<script src="https://cdn.jsdelivr.net/npm/@onirix/embed-sdk@1.17.1/+esm">
</head>
Or as ESM modules:
import OnirixEmbedSDK from "https://cdn.jsdelivr.net/npm/@onirix/embed-sdk@1.17.1/+esm";
Just create an instance of our EmbedSDK and execute the connect method. From that moment on you will be able to subscribe to the events that occur in the scene and you will be able to execute actions on the elements of the experience.
import OnirixEmbedSDK from "https://cdn.jsdelivr.net/npm/@onirix/embed-sdk@1.17.1/+esm";
const embedSDK = new OnirixEmbedSDK();
await embedSDK.connect();
embedSDK.subscribe(OnirixEmbedSDK.Events.ELEMENT_CLICK, (params) => {
console.log('somebody clicks me!', params);
});
embedSDK.enable(elementOid);
If you have embedded an Onirix Studio experience in your application through an iframe, you must pass the Html element of the iFrame to the EmbedSDK constructor.
import OnirixEmbedSDK from "https://cdn.jsdelivr.net/npm/@onirix/embed-sdk@1.17.1/+esm";
const iframeElement = document.getElementById("<iframe_element_id>");
const embedSDK = new OnirixEmbedSDK(iframeElement);
await embedSDK.connect();
Make sure that the iFrame is already loaded before instantiating the EmbedSDK.
See the complete list of events and actions in our documentation.
👤 Onirix
FAQs
Onirix helper library for iframe event communication.
The npm package @onirix/embed-sdk receives a total of 65 weekly downloads. As such, @onirix/embed-sdk popularity was classified as not popular.
We found that @onirix/embed-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.