This is our core package for OWN3D Extension. It acts as a bridge between the extension and the OWN3D platform and provides some helper functions to make the development of extensions easier.
Our package will be released on JSR. You can install it using the following command:
# deno
deno add jsr:@own3d/sdk
# npm (use any of npx, yarn dlx, pnpm dlx, or bunx)
npx jsr add @own3d/sdk
Here is a quick example on how to use the SDK:
import { initializeExtension } from '@own3d/sdk/extension'
import { useAuth } from '@own3d/sdk/auth'
const extension = initializeExtension()
const {onAuthorized} = useAuth(extension)
onAuthorized(async (user) => {
console.log(user)
})
Our full documentation can be found here.