angular-three icon indicating copy to clipboard operation
angular-three copied to clipboard

[Docs] ngtObjectInputs and ngtObjectOutputs

Open IRobot1 opened this issue 3 years ago • 8 comments

I noticed in a new example ngtObjectInputs and ngtObjectOutputs. Can you add some documentation on why these are needed and best practices for using.

IRobot1 avatar May 07 '22 11:05 IRobot1

Also, is there a preferred method for converting an THREE.Vector3 to NgtTriple?

IRobot1 avatar May 07 '22 11:05 IRobot1

I'll add docs about those "PassThrough" soon. Three.Vector3.toArray() is I guess the best method

nartc avatar May 07 '22 12:05 nartc

Also, when to use ngt-value and best practices.

IRobot1 avatar May 07 '22 23:05 IRobot1

Can you add a page that covers keyboard, mouse/pointer events? At the canvas level and at the object level.

If possible, how it to transfer control from one object (pawn) to another.

IRobot1 avatar May 14 '22 15:05 IRobot1

You have an example? Events as in Raycaster events or DOM events?

nartc avatar May 14 '22 16:05 nartc

I've been able to answer my own question about events. All NGT objects have output events which can be handled as needed.

For keyboard events, use Angular HostListener

For Raycasting, it really depends if the origin is the current mouse location, camera or your hand in VR.

IRobot1 avatar May 17 '22 00:05 IRobot1

Is there a topic that discusses how to do content projection for NGT objects? That is, how to write a custom component that allows some of its content to be passed in. In the following, how does app-xr-inspect component get the inner content to render?

<app-xr-inspect>
  <ngt-mesh #socket>
    <ngt-sphere-geometry [args]="[0.02]"></ngt-sphere-geometry>
    <ngt-mesh-standard-material color="gold"></ngt-mesh-standard-material>
  </ngt-mesh>
  <ngt-group [rotation]="[ -60 | radian,0, 0]">
    <ngt-mesh [position]="[0,-0.1,0]">
      <ngt-cylinder-geometry [args]="[0.01, 0.01, 0.2]"></ngt-cylinder-geometry>
    </ngt-mesh>
  </ngt-group>
</app-xr-inspect>

IRobot1 avatar May 19 '22 21:05 IRobot1

Using SOBA billboard as an example, I was able to get content project working. Is there a simpler method?

IRobot1 avatar May 20 '22 00:05 IRobot1