aalavandhaann / blueprint-js

The Javascript es6 version of the original furnishup/blueprint3d. Need some royalty free low poly models for the inventory. Can someone help me with this?
MIT License
504 stars 158 forks source link

the item not appear when load the items from webservice #27

Closed Qadez closed 5 years ago

Qadez commented 5 years ago

I changed the items_gltf.js file to load the item from webservice .

    function getItems() {
        $.get("http://www.mocky.io/v2/5ce15e3e320000112d2f62dd", function (data) {
            for (var i = 0; i < data.length; i++) {
                var item = data[i];
                item.time = parseInt(Math.random() * 100);
                itemsDiv = $("#" + modelTypesIds[modelTypesNum.indexOf(item.type)] + "-wrapper");
                var modelformat = (item.format) ? ' model-format="' + item.format + '"' : "";
                //var html = '<button type="button"  onclick="onAddItem(' + item.time + ')" class="btn btn-primary" data-dismiss="modal" alt="Add Item">' + item.name + '[' + item.time + ']' + '</button>';

                //var html = '<div class="col-sm-4">' + '<a class="thumbnail add-item"' + ' model-name="' + item.name + '"' + ' model-url="' + item.model + '"' + ' model-type="' + item.type + '"' + modelformat + '>' + '<img src="' + item.image + '" alt="Add Item"  data-dismiss="modal" > ' + item.name + '</a></div>';

                var html = '<div class="col-sm-4">' + '<a class="thumbnail add-item"' +' model-name="'+ item.name +'"' +' model-time="'+ item.time +'"' +' model-url="' +item.model+'"' +' model-type="' +item.type+'"' + modelformat+'>'+'<img src="'+item.image +'" alt="Add Item"   data-dismiss="modal"     > '+item.name +'</a></div>';

                itemsDiv.append(html);
            }

        });
    }
    getItems(); 

if I add the item to the scene it's not appeared

items_gltf.txt

aalavandhaann commented 5 years ago

Hello Qadez,

Did you check the console output? Do you see any http errors? Are you loading the right format of mesh?

Regards,

0K

aalavandhaann commented 5 years ago

Closing this issue as there is no further input from the user. Feel free to reopen.