You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 18, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 18, 2026. It is now read-only.
ground.addEventListener('click', (event) => {
// Create new entity for the new object
const newElement = document.createElement('a-entity')
// The raycaster gives a location of the touch in the scene
const touchPoint = event.detail.intersection.point
newElement.setAttribute('position', touchPoint)
newElement.setAttribute('rotation', `0 ${Math.random() * 360} 0`)
newElement.setAttribute('visible', 'false')
newElement.setAttribute('class', 'cantap')
newElement.setAttribute('xrextras-hold-drag', '')
newElement.setAttribute('xrextras-two-finger-rotate', '')
newElement.setAttribute('xrextras-pinch-scale', '')
newElement.setAttribute('scale', '0.0001 0.0001 0.0001')
newElement.setAttribute('shadow', {receive: false,})
newElement.setAttribute('gltf-model', model)
this.el.sceneEl.appendChild(newElement)
xrextras-hold-drag : working well
xrextras-two-finger-rotate: rotate all objects
xrextras-pinch-scale: when I scale object that getting invisible on the ground
As for your scale issue, you typically should add the xrextras-pinch-scale component after you have set the desired initial scale of the model, or pass it a scale parameter. In this component's init() it's saving the initial scale of the model, so if it's very small, it may look like it's disappearing, but really you are just scaling it relative to a very very small scale value.
Activity
atomarch commentedon Sep 29, 2021
To rotate objects individually, you'd need to implement some type of "select" mechanism to determine which object you want to rotate. The way it was currently written (see https://github.com/8thwall/web/blob/master/xrextras/src/aframe/xr-components.js#L403-L418) any entity with that has the
xrextras-two-finger-rotatecomponent will rotate when you touch the screen.As for your scale issue, you typically should add the
xrextras-pinch-scalecomponent after you have set the desired initial scale of the model, or pass it ascaleparameter. In this component's init() it's saving the initial scale of the model, so if it's very small, it may look like it's disappearing, but really you are just scaling it relative to a very very small scale value.Typically I add this after the
model-loadedevent has fired: https://www.8thwall.com/8thwall/placeground-cursor-aframe/code/tap-place-cursor.js#L33