Giter Club home page Giter Club logo

sketchrip's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sketchrip's Issues

New Sketchfab Object Structure

window.drawhook is fixed rather easily.
The function is called once with obj=undefined.

Changing line 236 if(obj._faked != true) {
to if(obj!==undefined &&obj._faked != true ) {

fixes that problem.

The real thing is, that the obj is not what it used to be 😆.
It now looks like this:

Object { _stateClearColor: {…}, _stateClearDepth: {…}, _stateDepthMask: {…}, _stateViewport: {…}, _stateColorMask: {…}, _stateScissor: {…}, _stateDepth: {…}, _stateCullFace: {…}, _stateBlendFunc: {…}, _faked: true }
​
_faked: true
​
_stateBlendFunc: Object { buffer: {…}, state: {…}, changed: true }
​
_stateClearColor: Object { buffer: {…}, state: {…}, changed: false }
​
_stateClearDepth: Object { buffer: {…}, state: {…}, changed: false }
​
_stateColorMask: Object { buffer: {…}, state: {…}, changed: false }
​
_stateCullFace: Object { buffer: {…}, state: {…}, changed: false }
​
_stateDepth: Object { buffer: {…}, state: {…}, changed: true }
​
_stateDepthMask: Object { state: {…}, buffer: {…}, changed: false }
​
_stateScissor: Object { buffer: {…}, state: {…}, changed: true }
​
_stateViewport: Object { buffer: {…}, state: {…}, changed: true }

And thus the download function does not work anymore.
Sry but I do not know how to handle this. GL.
image

Linux obj to glb merger

In order to use the merge of multiple obj files into a single gltf on linux, you can use the following script:

#!/bin/bash

merge_files() {
echo "Merging OBJ files into GLTF..."
obj_files=(*.obj)
if [ ${#obj_files[@]} -eq 0 ]; then
echo "No OBJ files found in the current directory."
exit 1
fi

merged_file="merged.gltf"
obj2gltf -i "${obj_files[@]}" -o "$merged_file"

if [ $? -eq 0 ]; then
    echo "Merging successful. Merged file: $merged_file"
else
    echo "Error occurred while merging OBJ files."
    exit 1
fi

}

optimize_file() {
echo "Optimizing the merged GLTF file..."
optimized_file="optimized.gltf"
gltf-pipeline -i merged.gltf -o "$optimized_file"

if [ $? -eq 0 ]; then
    echo "Optimization successful. Optimized file: $optimized_file"
else
    echo "Error occurred while optimizing the GLTF file."
    exit 1
fi

}

merge_files
optimize_file

But first install:
sudo npm install -g obj2gltf
sudo npm install -g gltf-pipeline

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.