Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@c-frame/aframe-gltf-model-plus
Advanced tools
gltf-model-plus component to load glb file with hubs extensions.
This aframe component allows to load a glb with extensions from the hubs blender addon.
This is an alternate implementation of how Hubs imported the scene glb with aframe components. Some key differences:
<head>
<title>My A-Frame Scene</title>
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-gltf-model-plus@a41e57d/dist/aframe-master-custom-r172.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-gltf-model-plus@1.1.0/dist/gltf-model-plus.min.js"></script>
...
</head>
<body>
<a-scene>
<a-assets timeout="30000">
<a-asset-item
id="sceneGLB"
src="https://cdn.jsdelivr.net/gh/c-frame/outdoor-festival@e9311cf/Outdoor_Festival.glb"
></a-asset-item>
</a-assets>
<a-entity class="environment-settings" gltf-model-plus="#sceneGLB"></a-entity>
...
</a-scene>
</body>
See the index.html file for the full example, some additional scripts and templates are required. This example is really just demonstrating how to load a hubs scene and has no UI. If you need a multi-users experience with avatars, chat, audio and screen share, look at the naf-valid-avatars example.
The gltf-model-plus
component make some assumptions:
simple-navmesh-constraint
component loaded.The waypoint
component make some assumptions:
move-to-spawn-point
component on the camera rig. Be sure to remove any spawn-in-circle
component that conflicts with it..clickable
, example raycaster="far: 100; objects: .clickable;"
Some components can also be used on <a-entity>
.
See the components documentation.
Clone the repo, install the dev dependencies and start the dev server:
git clone https://github.com/c-frame/aframe-gltf-model-plus.git
cd aframe-gltf-model-plus
npm install
npm start
Then go to http://localhost:8080
To test your scene, you can copy your_scene.glb
in the examples/playground
folder,
edit examples/playground/index.html
and modify the line that references the scene to
<a-asset-item id="sceneGLB" src="./your_scene.glb"></a-asset-item>
and refresh the page.
You can deploy the content of the examples/playground
folder to any server with static hosting but be sure to replace those two script tags:
<script src="../../dist/aframe-master-custom-r172.min.js"></script>
<script src="../../dist/gltf-model-plus.min.js"></script>
by
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-gltf-model-plus@a41e57d/dist/aframe-master-custom-r172.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/c-frame/aframe-gltf-model-plus@1.1.0/dist/gltf-model-plus.min.js"></script>
Depending on your needs, if your experience doesn't require multi-users, you can run it on GitHub Pages for free. For this you need to push the folder content on a public GitHub repository and enable GitHub Pages in the repository settings.
If your experience only needs users without audio you can use the networked-aframe wseasyrtc or socketio adapters (see list of naf adapters).
For 3-4 users with audio and video with the easyrtc adapter (peer to peer), you can host it for free (the server will need to wake up on first access) or using a paid subscription on Glitch.
If you need more users with audio and video, you can subscribe to a VPS and have up to 30 users in a room with the janus adapter (SFU).
Legend:
Some features require a custom aframe build.
For comparison of this repository with Hubs code, see mapping to aframe components in Hubs's gltf-component-mappings.js.
FAQs
gltf-model-plus component to load glb file with hubs extensions.
We found that @c-frame/aframe-gltf-model-plus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.