summit/frontend/node_modules/three-stdlib/loaders/lwo/LWO3Parser.cjs.map

1 line
16 KiB
Plaintext
Raw Normal View History

2025-12-08 16:31:30 +00:00
{"version":3,"file":"LWO3Parser.cjs","sources":["../../../src/loaders/lwo/LWO3Parser.js"],"sourcesContent":["class LWO3Parser {\n constructor(IFFParser) {\n this.IFF = IFFParser\n }\n\n parseBlock() {\n this.IFF.debugger.offset = this.IFF.reader.offset\n this.IFF.debugger.closeForms()\n\n const blockID = this.IFF.reader.getIDTag()\n const length = this.IFF.reader.getUint32() // size of data in bytes\n\n this.IFF.debugger.dataOffset = this.IFF.reader.offset\n this.IFF.debugger.length = length\n\n // Data types may be found in either LWO2 OR LWO3 spec\n switch (blockID) {\n case 'FORM': // form blocks may consist of sub -chunks or sub-forms\n this.IFF.parseForm(length)\n break\n\n // SKIPPED CHUNKS\n // MISC skipped\n case 'ICON': // Thumbnail Icon Image\n case 'VMPA': // Vertex Map Parameter\n case 'BBOX': // bounding box\n // case 'VMMD':\n // case 'VTYP':\n\n // normal maps can be specified, normally on models imported from other applications. Currently ignored\n case 'NORM':\n\n // ENVL FORM skipped\n case 'PRE ': // Pre-loop behavior for the keyframe\n case 'POST': // Post-loop behavior for the keyframe\n case 'KEY ':\n case 'SPAN':\n\n // CLIP FORM skipped\n case 'TIME':\n case 'CLRS':\n case 'CLRA':\n case 'FILT':\n case 'DITH':\n case 'CONT':\n case 'BRIT':\n case 'SATR':\n case 'HUE ':\n case 'GAMM':\n case 'NEGA':\n case 'IFLT':\n case 'PFLT':\n\n // Image Map Layer skipped\n case 'PROJ':\n case 'AXIS':\n case 'AAST':\n case 'PIXB':\n case 'STCK':\n\n // Procedural Textures skipped\n case 'VALU':\n\n // Gradient Textures skipped\n case 'PNAM':\n case 'INAM':\n case 'GRST':\n case 'GREN':\n case 'GRPT':\n case 'FKEY':\n case 'IKEY':\n\n // Texture Mapping Form skipped\n case 'CSYS':\n\n // Surface CHUNKs skipped\n case 'OPAQ': // top level 'opacity' checkbox\n case 'CMAP': // clip map\n\n // Surface node CHUNKS skipped\n // These mainly specify the node editor setup in LW\n case 'NLOC':\n case 'NZOM':\n case 'NVER':\n case 'NSRV':\n case 'NCRD':\n case 'NMOD':\n case 'NSEL':\n case 'NPRW':\n case 'NPLA':\n case 'VERS':\n case 'ENUM':\n case 'TAG ':\n\n // Car Material CHUNKS\n case 'CGMD':\n case 'CGTY':\n case 'CGST':\n case 'CGEN':\n case 'CGTS':\n case 'CGTE':\n case 'OSMP':\n case 'OMDE':\n case 'OUTR':\n case 'FLAG':\n\n case 'TRNL':\n case 'SHRP':\n case 'RFOP':\n case 'RSAN':\n case 'TROP':\n case 'RBLR':\n case 'TBLR':\n case 'CLRH':\n case 'CLRF':\n case 'ADTR':\n case 'GLOW':\n case 'LINE':\n case 'ALPH':\n case 'VCOL':\n case 'ENAB':\n this.IFF.debugger.skipped = true\n this.IFF.reader.skip(length)\n break\n\n // Texture node chunks (not in spec)\n case 'IPIX': // usePixelBlending\n case 'IMIP': // useMipMaps\n case 'IMOD': // imageBlendingMode\n case 'AMOD': // unknown\n case 'IINV': // imageInvertAlpha\n case 'INCR': // imageInvertColor\n case 'IAXS': // imageAxis ( for non-UV maps)\n case 'IFOT': // imageFallofType\n case 'ITIM': // timing for animated textures\n case 'IWRL':\n case 'IUTI':\n case 'IINX':\n case 'IINY':\n case 'IINZ':\n case 'IREF': // possibly a VX for reused texture nodes\n if (length === 4) this.IFF.currentNode[blockID] = this.IFF.reader.getInt32()\n else this.IFF.reader.skip(length)\n break\n\n case 'OTAG':\n this.IFF.parseObjectTag()\n break\n\n case 'LAYR':\n this.IFF.parseLayer(length)\n break\n\n case 'PNTS':\n this.IFF.parsePoints(length)\n break\n\n case 'VMAP':\n this.IFF.parseVertexMapping(length)\n