johh / three-gltf-loader

three.js's GLTFLoader wrapped as a module for easy importing.
52 stars 20 forks source link

geometry.setAttribute is not a function #10

Closed beTyler closed 3 years ago

beTyler commented 3 years ago

GLTFLoaderTest.vue?2dc1:36 An error happened TypeError: geometry.setAttribute is not a function

beTyler commented 3 years ago

Hello, may I ask if I used it in the wrong way? Why did I report this mistake

beTyler commented 3 years ago

function addPrimitiveAttributes( geometry, primitiveDef, parser ) {

    var attributes = primitiveDef.attributes;

    var pending = [];

    function assignAttributeAccessor( accessorIndex, attributeName ) {

        return parser.getDependency( 'accessor', accessorIndex )
            .then( function ( accessor ) {

                geometry.setAttribute( attributeName, accessor );

            } );

    }
johh commented 3 years ago

Hey there, sorry for the late reply! This package is just a wrapper around GLTFLoader and no longer maintained, sorry for the confusion! The best place to ask Three.js related questions is the forum: https://discourse.threejs.org/