1337ad / sketchrip

Ripper and Conversion for Sketchfab Models
70 stars 15 forks source link

New Sketchfab Object Structure #3

Open RomanDietenmeier opened 2 years ago

RomanDietenmeier commented 2 years ago

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

nukadelic commented 2 years ago

if u edit the hook to include the following :

jstext = head + "window.drawhook(this,arguments);" + tail;

seems like the arguments have some data , although not sure where to look for next

image

zAtomicNuke commented 1 year ago

do you mean edit the argument in line 246?