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 has been archived by the owner on Feb 10, 2023. It is now read-only.
Describe the bug
ERROR TypeError: THREE.BufferAttribute: array should be a Typed Array.
at new BufferAttribute (three.module.js:8981:10)
at NgtBufferAttribute.init (angular-three-core.mjs:3230:67)
at angular-three-core.mjs:3211:18
at ZoneDelegate.invoke (zone.js:372:1)
at Zone.run (zone.js:134:1)
at NgZone.runOutsideAngular (core.mjs:25371:1)
at NgtBufferAttribute.set attributeArgs [as attributeArgs] (angular-three-core.mjs:3210:21)
at NgtBufferAttribute.set args [as args] (angular-three-core-attributes.mjs:13:9)
at Object.ngOnChangesSetInput [as setInput] (core.mjs:1502:1)
at setInputsForProperty (core.mjs:10959:1) To Reproduce
Template contains the following
<ngt-line #line="ngtLine" >
<ngt-buffer-geometry>
<ngt-buffer-attribute attach="position" [args]="[[0, 0, 0, 0, 0, - 1], 3]"></ngt-buffer-attribute>
</ngt-buffer-geometry>
<ngt-line-basic-material [parameters]="{ vertexColors: true, blending: blending }"></ngt-line-basic-material>
</ngt-line>
Get above in browser console for ngt-buffer-attribute attach="position"
Expected behavior
Should work without error. Replacing with a variable doesn't work either.
After a few more tries, I figured it out. Declare a variable
position = new Float32Array([0, 0, 0, 0, 0, - 1]);
then use the following in the template
<ngt-buffer-attribute attach="position" [args]="[position, 3]">
Scope
Describe the bug
ERROR TypeError: THREE.BufferAttribute: array should be a Typed Array.
at new BufferAttribute (three.module.js:8981:10)
at NgtBufferAttribute.init (angular-three-core.mjs:3230:67)
at angular-three-core.mjs:3211:18
at ZoneDelegate.invoke (zone.js:372:1)
at Zone.run (zone.js:134:1)
at NgZone.runOutsideAngular (core.mjs:25371:1)
at NgtBufferAttribute.set attributeArgs [as attributeArgs] (angular-three-core.mjs:3210:21)
at NgtBufferAttribute.set args [as args] (angular-three-core-attributes.mjs:13:9)
at Object.ngOnChangesSetInput [as setInput] (core.mjs:1502:1)
at setInputsForProperty (core.mjs:10959:1)
To Reproduce
Template contains the following
<ngt-line #line="ngtLine" >
<ngt-buffer-geometry>
<ngt-buffer-attribute attach="position" [args]="[[0, 0, 0, 0, 0, - 1], 3]"></ngt-buffer-attribute>
</ngt-buffer-geometry>
<ngt-line-basic-material [parameters]="{ vertexColors: true, blending: blending }"></ngt-line-basic-material>
</ngt-line>
Get above in browser console for ngt-buffer-attribute attach="position"
Expected behavior
Should work without error. Replacing with a variable doesn't work either.
Additional context
Converting https://github.com/mrdoob/three.js/blob/master/examples/webxr_vr_cubes.html to @angular/three.
I have the whole example converted to @angular/three, but trying to replace
Want to make the track-pointer line attached to XR controller be something that can be declared, instead of hard-coded.
The text was updated successfully, but these errors were encountered: