From dcf6717033099a944c8743ced7652f1dedaae644 Mon Sep 17 00:00:00 2001 From: "Patrick J. Cherry" Date: Fri, 9 Dec 2022 12:10:48 +0000 Subject: [PATCH 1/3] Remove unusued files task/directory --- lib/tasks/files.rake | 25 - lib/tasks/server_files/_internal_sense_hat.js | 530 - .../server_files/models/raspi-compressed.glb | Bin 1303516 -> 0 bytes lib/tasks/server_files/p5-shim.js | 1755 - lib/tasks/server_files/pygal.js | 392 - lib/tasks/server_files/three/build/three.js | 36280 ----------- .../server_files/three/build/three.min.js | 6 - .../server_files/three/build/three.module.js | 49482 ---------------- .../three/examples/js/libs/draco/README.md | 32 - .../examples/js/libs/draco/draco_decoder.js | 52 - .../examples/js/libs/draco/draco_decoder.wasm | Bin 281481 -> 0 bytes .../examples/js/libs/draco/draco_encoder.js | 33 - .../js/libs/draco/draco_wasm_wrapper.js | 104 - .../js/libs/draco/gltf/draco_decoder.js | 48 - .../js/libs/draco/gltf/draco_decoder.wasm | Bin 194983 -> 0 bytes .../js/libs/draco/gltf/draco_encoder.js | 33 - .../js/libs/draco/gltf/draco_wasm_wrapper.js | 104 - .../server_files/three/examples/jsm/WebGL.js | 91 - .../examples/jsm/controls/OrbitControls.js | 1229 - .../jsm/environments/RoomEnvironment.js | 111 - .../three/examples/jsm/loaders/DRACOLoader.js | 640 - .../three/examples/jsm/loaders/GLTFLoader.js | 3923 -- 22 files changed, 94870 deletions(-) delete mode 100644 lib/tasks/files.rake delete mode 100644 lib/tasks/server_files/_internal_sense_hat.js delete mode 100644 lib/tasks/server_files/models/raspi-compressed.glb delete mode 100644 lib/tasks/server_files/p5-shim.js delete mode 100644 lib/tasks/server_files/pygal.js delete mode 100644 lib/tasks/server_files/three/build/three.js delete mode 100644 lib/tasks/server_files/three/build/three.min.js delete mode 100644 lib/tasks/server_files/three/build/three.module.js delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/README.md delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/draco_decoder.js delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/draco_decoder.wasm delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/draco_encoder.js delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/draco_wasm_wrapper.js delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/gltf/draco_decoder.js delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/gltf/draco_decoder.wasm delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/gltf/draco_encoder.js delete mode 100644 lib/tasks/server_files/three/examples/js/libs/draco/gltf/draco_wasm_wrapper.js delete mode 100644 lib/tasks/server_files/three/examples/jsm/WebGL.js delete mode 100644 lib/tasks/server_files/three/examples/jsm/controls/OrbitControls.js delete mode 100644 lib/tasks/server_files/three/examples/jsm/environments/RoomEnvironment.js delete mode 100644 lib/tasks/server_files/three/examples/jsm/loaders/DRACOLoader.js delete mode 100644 lib/tasks/server_files/three/examples/jsm/loaders/GLTFLoader.js diff --git a/lib/tasks/files.rake b/lib/tasks/files.rake deleted file mode 100644 index 599158eb4..000000000 --- a/lib/tasks/files.rake +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -require 'aws-sdk-s3' - -namespace :files do - desc 'Update CDN files' - task update: :environment do - bucket_name = 'editor-images-test' - s3_client = Aws::S3::Client.new - - s3_client.list_objects(bucket: bucket_name).contents.each do |file| - s3_client.delete_object(bucket: bucket_name, key: file.key) - end - - Dir.chdir("#{File.dirname(__FILE__)}/server_files") - files = Dir.glob('**/*').select { |f| File.file? f } - files.each do |file_name| - s3_client.put_object( - body: File.open("#{File.dirname(__FILE__)}/server_files/#{file_name}"), - bucket: bucket_name, - key: file_name - ) - end - end -end diff --git a/lib/tasks/server_files/_internal_sense_hat.js b/lib/tasks/server_files/_internal_sense_hat.js deleted file mode 100644 index 4fa2bd9de..000000000 --- a/lib/tasks/server_files/_internal_sense_hat.js +++ /dev/null @@ -1,530 +0,0 @@ -/** - * Internal SenseHat Module for reading and writing values from - * JavaScript World to the Python World. This modules set ups - * the commmunication and allows to read and write pixels. If the - * "Sk.sense_hat_emit" config is present, we emit events when - * values are changed: Python -> JavaScript - */ - var $builtinmodule = function (name) { - var mod = {}; - - function checkNumberAndReturn(val) { - var parsed = parseFloat(val); - // only numbers/floats are okay - var isValid = !isNaN(parsed) && isFinite(val); - if (isValid) { - return { - value: parsed, - valid: true - } - } - - // invalid number, return -1 - return { - value: -1, - valid: false - } - } - - mod.init = new Sk.builtin.func(function () { - if (Sk.sense_hat_emit) { - Sk.sense_hat_emit('init'); - } - }); - - // _fb_device specific methods - mod.setpixel = new Sk.builtin.func(function (index, value) { - var _index; - var _value; - - if (!Sk.builtin.checkIterable(value)) { - throw new Sk.builtin.ValueError("'value' should be iterable") - } - - for (var i in value.v) { - if (!Sk.builtin.checkInt(value.v[i])) { - throw new Sk.builtin.ValueError("'value' should be iterable of 'int'") - } - } - - _index = Sk.ffi.remapToJs(index); - _value = Sk.ffi.remapToJs(value); - - try { - Sk.sense_hat.pixels[_index] = _value; - } catch (e) { - throw new Sk.builtin.ValueError(e.message); - } - - if (Sk.sense_hat_emit) { - Sk.sense_hat_emit('setpixel', _index); - } - }); - - mod.getpixel = new Sk.builtin.func(function (index) { - var value; - var _index; - var _value; - - _index = Sk.ffi.remapToJs(index); - - try { - _value = Sk.sense_hat.pixels[_index]; - value = Sk.ffi.remapToPy(_value); // should return a list - //value = new Sk.builtin.list(value); - } catch (e) { - throw new Sk.builtin.ValueError(e.message); - } - - return value; - }); - - mod.setpixels = new Sk.builtin.func(function (indexes, values) { - _indexes = Sk.ffi.remapToJs(indexes); - _values = Sk.ffi.remapToJs(values); - try { - Sk.sense_hat.pixels = _values; - } catch (e) { - throw new Sk.builtin.ValueError(e.message); - } - - if (Sk.sense_hat_emit) { - Sk.sense_hat_emit('setpixels', _indexes); - } - }); - - mod.getpixels = new Sk.builtin.func(function () { - var values; - - try { - values = Sk.ffi.remapToPy(Sk.sense_hat.pixels); // should return a list - values = new Sk.builtin.list(values); - } catch (e) { - throw new Sk.builtin.ValueError(e.message); - } - - return values; - }); - - mod.getGamma = new Sk.builtin.func(function () { - var gamma = Sk.ffi.remapToPy(Sk.sense_hat.gamma); - return gamma; - }); - - mod.setGamma = new Sk.builtin.func(function (gamma) { - // checks are made in fb_device.py - var _gamma = Sk.ffi.remapToJs(gamma); - Sk.sense_hat.gamma = _gamma; - - if (Sk.sense_hat_emit) { - Sk.sense_hat_emit('setGamma'); - } - }); - - mod.setLowlight = new Sk.builtin.func(function (value) { - var _value = Sk.ffi.remapToJs(value); - - Sk.sense_hat.low_light = _value; - - if (Sk.sense_hat_emit) { - Sk.sense_hat_emit('changeLowlight', _value); - } - }); - - // RTIMU stuff - - /** - * 260 - 1260 hPa - */ - mod.pressureRead = new Sk.builtin.func(function () { - var pyTemperature = Sk.misceval.callsim(mod.temperatureRead); // does the validation for us - var jsTemperature = Sk.ffi.remapToJs(pyTemperature); - - var jsPressure; // object holding the parsed value - - if (!Sk.sense_hat.rtimu.pressure || Sk.sense_hat.rtimu.pressure.length !== 2) { - // something was set wrong - return Sk.ffi.remapToPy([].concat([0, -1], jsTemperature)); - } - - // check type of the temperature - jsPressure = checkNumberAndReturn(Sk.sense_hat.rtimu.pressure[1]); - - // invalid value provided - if (jsPressure.valid === false) { - return Sk.ffi.remapToPy([].concat([0, -1], jsTemperature)); - } - - // now do some range checks - if (jsPressure.value < 260 || jsPressure.value > 1260) { - return Sk.ffi.remapToPy([].concat([0, jsPressure.value], jsTemperature)); - } - - return Sk.ffi.remapToPy([].concat([1, jsPressure.value], jsTemperature)); - }); - - /** - * >= 0% - */ - mod.humidityRead = new Sk.builtin.func(function () { - var pyTemperature = Sk.misceval.callsim(mod.temperatureRead); // does the validation for us - var jsTemperature = Sk.ffi.remapToJs(pyTemperature); - - var jsHumidity; - - if (!Sk.sense_hat.rtimu.humidity || Sk.sense_hat.rtimu.humidity.length !== 2) { - // something was set wrong - return Sk.ffi.remapToPy([].concat([0, -1], jsTemperature)); - } - - // check type of the temperature - jsHumidity = checkNumberAndReturn(Sk.sense_hat.rtimu.humidity[1]); - - // invalid value provided - if (jsHumidity.valid === false) { - return Sk.ffi.remapToPy([].concat([0, -1], jsTemperature)); - } - - // now do some range checks - if (jsHumidity.value < 0) { - return Sk.ffi.remapToPy([].concat([0, jsHumidity.value], jsTemperature)); - } - - return Sk.ffi.remapToPy([].concat([1, jsHumidity.value], jsTemperature)); - }); - - /** - * Temperature Range: -40 to +120 degrees celsius - */ - mod.temperatureRead = new Sk.builtin.func(function () { - var jsTemperature; - - if (!Sk.sense_hat.rtimu.temperature || Sk.sense_hat.rtimu.temperature.length !== 2) { - // something was set wrong - return Sk.ffi.remapToPy([0, -1]); - } - - // check type of the temperature - var jsTemperature = checkNumberAndReturn(Sk.sense_hat.rtimu.temperature[1]); - - // invalid value provided - if (jsTemperature.valid === false) { - return Sk.ffi.remapToPy([0, -1]); - } - - // now do some range checks - if (jsTemperature.value < -40 || jsTemperature.value > 120) { - return Sk.ffi.remapToPy([0, jsTemperature.value]); // invalid - } - - return Sk.ffi.remapToPy([1, jsTemperature.value]); - }); - - /** - * Colour - */ - - function hex2rgb(hex) { - return ['0x' + hex[1] + hex[2] | 0, '0x' + hex[3] + hex[4] | 0, '0x' + hex[5] + hex[6] | 0]; - } - - mod.colourRead = new Sk.builtin.func(function () { - return Sk.ffi.remapToPy(hex2rgb(Sk.sense_hat.colour)); - }); - - /** - * Motion - */ - mod.motionRead = new Sk.builtin.func(function () { - return Sk.ffi.remapToPy(Sk.sense_hat.motion); - }); - - /** - * Sets start motion callback - */ - mod._start_motion = new Sk.builtin.func(function(callback) { - if (!(callback instanceof Sk.builtin.none)) { - Sk.sense_hat.start_motion_callback = () => {Sk.misceval.callsimAsync(null, callback)}; - } - }); - - /** - * Sets stop motion callback - */ - mod._stop_motion = new Sk.builtin.func(function(callback) { - if (!(callback instanceof Sk.builtin.none)) { - Sk.sense_hat.stop_motion_callback = () => {Sk.misceval.callsimAsync(null, callback)}; - } - }); - - mod.fusionPoseRead = new Sk.builtin.func(function () { - var fusionPose = Sk.ffi.remapToPy(Sk.sense_hat.rtimu.raw_orientation.map(x=>x*Math.PI/180)); - - return fusionPose; - }); - - mod.accelRead = new Sk.builtin.func(function () { - var accel = Sk.ffi.remapToPy(Sk.sense_hat.rtimu.accel); - - return accel; - }); - - mod.compassRead = new Sk.builtin.func(function () { - var compass = Sk.ffi.remapToPy(Sk.sense_hat.rtimu.compass); - - return compass; - }); - - mod.headingRead = new Sk.builtin.func(function () { - /* Returns tilt-compensated magnetometer heading in radians */ - /* Note: RTIMULib calculates a moving average. This gives an instant reading */ - - // Accelerometer's roll and pitch, used for compensation - var x, y; - x = Sk.sense_hat.rtimu.raw_orientation[0]; // roll - y = Sk.sense_hat.rtimu.raw_orientation[1]; // pitch - - // Compass raw values in microteslas - var mx, my, mz; - mx = Sk.sense_hat.rtimu.compass[0]; - my = Sk.sense_hat.rtimu.compass[1]; - mz = Sk.sense_hat.rtimu.compass[2]; - - // Tilt compensation for Tait-Bryan XYZ convention - // Formulas here: https://dev.widemeadows.de/2014/01/24/to-tilt-compensate-or-not-to-tilt-compensate/ - var phi, theta, mag_y, mag_x, jsheading, heading; - phi = x; - theta = y; - - // Remap magnetometer values to the horizontal plane and determine yaw (aka heading) - mag_x = mx * Math.cos(theta) + my * Math.sin(phi) * Math.sin(phi) + mz * Math.cos(phi) * Math.sin(theta); - mag_y = my * Math.cos(phi) - mz * Math.sin(phi); - jsheading = Math.atan2(-mag_y, mag_x); - - // Remap radian value to Skulpt and return - heading = Sk.ffi.remapToPy(jsheading); - return heading; - }); - - mod.gyroRead = new Sk.builtin.func(function () { - var gyro = Sk.ffi.remapToPy(Sk.sense_hat.rtimu.gyro); - - return gyro; - }); - - /********************************************************/ - /* SenseStick specific functions. - /* - /* - **/ - - /** - * Named InputEvent tuple - */ - var input_event_fields = { - "timestamp": "", - "direction": "", - "action": "", - }; - var input_event_f = Sk.builtin.make_structseq('SenseStick', 'InputEvent', input_event_fields); - mod.InputEvent = Sk.builtin.make_structseq('SenseStick', 'InputEvent', input_event_fields); - - mod._wait = new Sk.builtin.func(function (timeout) { - var _timeout; - if (!timeout || timeout instanceof Sk.builtin.none) { - _timeout = null; - } else if (Sk.builtin.checkNumber(timeout)) { - _timeout = Sk.ffi.remapToJs(timeout); - } - - var timeoutHandle; - var hasEvent = false; - var susp = new Sk.misceval.Suspension(); - susp.resume = function () { - // Should the post image get stuff go here?? - if (susp.data["error"]) { - if (susp.data.error === 'KeyboardInterrupt') { - throw new Error('KeyboardInterrupt'); - } else { - throw new Sk.builtin.IOError('SenseStickDevice Error'); - } - } - return Sk.builtin.bool(hasEvent); - }; - susp.data = { - type: "Sk.promise", - promise: new Promise(function (resolve, reject) { - // Listen to new one, once - function handleKeyInput (event, inputData) { - // Clear timeout - if (timeoutHandle) { - window.clearTimeout(timeoutHandle); - } - - if (inputData.type === 'keyboardinterrupt') { - reject('KeyboardInterrupt'); - } - - hasEvent = true; // Set return value - resolve(); - } - - if (Sk.sense_hat.sensestick._eventQueue.length > 0) { - hasEvent = true; - resolve(); - } else { - Sk.sense_hat.sensestick.once('sensestick.input', handleKeyInput); - - if (_timeout != null) { - timeoutHandle = setTimeout(function() { - Sk.sense_hat.sensestick.off('sensestick.input', handleKeyInput); - hasEvent = false; // Timeout passed before callback occured - resolve() - }, _timeout * 1000); - } - } - }) - }; - return susp; - }); - - mod._waitmotion = new Sk.builtin.func(function (timeout, motion) { - var _timeout; - if (!timeout || timeout instanceof Sk.builtin.none) { - _timeout = null; - } else if (Sk.builtin.checkNumber(timeout)) { - _timeout = Sk.ffi.remapToJs(timeout); - } - var _motion = Sk.ffi.remapToJs(motion); - var timeoutHandle; - var hasEvent = false; - var susp = new Sk.misceval.Suspension(); - susp.resume = function () { - if (susp.data["error"]) { - console.log(susp.data) - throw new Error('KeyboardInterrupt'); - } - return Sk.builtin.bool(hasEvent); - }; - susp.data = { - type: "Sk.promise", - promise: new Promise(function (resolve, reject) { - // Listen to new one, once - function handleInput (event, inputData) { - // Clear timeout - if (timeoutHandle) { - window.clearTimeout(timeoutHandle); - } - if (typeof(inputData) != "undefined" && inputData.type === 'interrupt') { - reject('interrupt'); - } - hasEvent = true; // Set return value - document.getElementById( "sense_hat_motion" ).removeEventListener( "change", handleInput); - resolve(); - } - - if(document.getElementById( "sense_hat_motion" ).checked == _motion){ - hasEvent = true; - resolve(); - } else { - document.getElementById( "sense_hat_motion" ).addEventListener( "change", handleInput); - if (_timeout != null) { - timeoutHandle = setTimeout(function() { - document.getElementById( "sense_hat_motion" ).removeEventListener( "change", handleInput); - hasEvent = false; // Timeout passed before callback occured - resolve() - }, _timeout * 1000); - } - } - }) - }; - return susp; - }); - - mod._inspectFunction = new Sk.builtin.func(function (func) { - //var kwargs = false; - var argsLength = 0; - - if (func.im_self && func.im_func) { - //kwargs = func.im_func.func_code["co_kwargs"] != null; - argsLength = func.im_func.func_code.length - 1; // -1 for the self - } else { - //kwargs = func.func_code["co_kwargs"] != null; - argsLength = func.func_code.length; - } - - return Sk.builtin.int_(argsLength); - }); - - /** - * Removes the event handler for simulating threading - */ - mod._stop_stick_thread = new Sk.builtin.func(function() { - if (Sk.sense_hat.sensestick._threadHandler != null) { - Sk.sense_hat.sensestick.off('sensestick.input', _threadHandler); - } - }); - - /** - * Adds the event handler for simulating threading for the SenseStick callbacks - */ - mod._start_stick_thread = new Sk.builtin.func(function(callback) { - function handleKeyInput (event, inputData) { - // Store event in the internal queue - // This may cause, that we are not able to call our interrupt suspension handler - Sk.misceval.callsimAsync(null, callback); - } - - Sk.sense_hat.sensestick.on('sensestick.input', handleKeyInput); - Sk.sense_hat.sensestick._threadHandler = handleKeyInput; // Callback and save closure - }); - - mod._read = new Sk.builtin.func(function () { - var inputEvent; - var susp = new Sk.misceval.Suspension(); - susp.resume = function () { - // We need the 2nd check for the keyboardinterrupt when we push this from the - // watching thread - if (susp.data["error"] || inputEvent.type === 'keyboardinterrupt') { - if (susp.data.error === 'KeyboardInterrupt' || inputEvent.type === 'keyboardinterrupt') { - // throwing now - throw new Error('KeyboardInterrupt'); - } else { - throw new Sk.builtin.IOError('SenseStickDevice Error'); - } - } - - var tup = new Sk.builtin.tuple([ - Sk.builtin.int_(inputEvent.timestamp), - Sk.builtin.int_(inputEvent.key), - Sk.builtin.int_(inputEvent.state), - Sk.builtin.int_(inputEvent.type) - ]); - return tup; - }; - susp.data = { - type: "Sk.promise", - promise: new Promise(function (resolve, reject) { - // Read from internal eventQueue - if (Sk.sense_hat.sensestick._eventQueue.length > 0) { - inputEvent = Sk.sense_hat.sensestick._eventQueue.shift(); - resolve(); - } else { - // add eventlistener - Sk.sense_hat.sensestick.once('sensestick.input', function (event, inputData) { - // Interrupt handling, so that we do not need to wait until the users inputs something - if (inputData.type === 'keyboardinterrupt') { - reject('KeyboardInterrupt'); - } - - inputEvent = inputEvent = Sk.sense_hat.sensestick._eventQueue.shift(); - resolve(); - }); - } - }) - }; - return susp; - }); - - return mod; -}; diff --git a/lib/tasks/server_files/models/raspi-compressed.glb b/lib/tasks/server_files/models/raspi-compressed.glb deleted file mode 100644 index d40bc1907451238761c7b25287da74f8bf39bd53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1303516 zcmeEP2YeL8_rDY%gn)o3pde=ygb?EPy+uU2bV8G&7(zH8l4cS*Xb7k=Dk8;#pdpAN zMJb9XB25ud6tVM@rbtmyiUk$q|DCT=sT%=Dm6Ioj2ck^Ja9$ zfG&|Xo9*jwFSo5ui?ns`->3JK_|&{SXMTL^Deu%y!7lWe8nX(@zWCHofGq&S>#gQz&z*3_|~___vqR$B_nP!jP#KcvUA7grKF9^%g@eC$;r*mapvZyJM-{0d1z#AYFc(mrZaC$ zN?LYiPOdXgEoxX|d|n#r6yKV0f67BKQ{uByGjT1xlXFz+xQu*zD|@H(yqt{GN%sEv zsrk-UEZ&-xJrZwkeLIuL4x5Jecz&M}pP8DUn?8|zmE>@+jI1OwNsNP)WM050K@uGj zKHwv-@Vq3FYaG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+s(bO46s_xi^q z++~=1Uht%J@vPx`Iog#}+ZYWsR#yyYQOC^qbvKsbJ`o7~(*{!ynd9LYM2a%;PT@Q9 z18hg!kYSqc`Z?M5Qm--@qZ{Dx%J}X~cSdDAzy!wwCNVt z5@VS`TpjeYRv;c09{z2LrA^+hmP)6dTnAvz_}m3r!Z>D|L{TsP%h>k|PA(f(Z@NEP z%K`HO-^wUm-i{cxOJihFwSlSj~Y>06`J`Oe!&Hp%I}5~4u8D3VHNP*#u)B{%U@_}G6Bmmax<`FyC&1Bfc{c|n^G z07IuYlThG2S#@ktIlg0`7V9+l40Bfo2>+YvZ!ycZVo={XE@+0oU5-&QN4=1W_1R-lP`HE2ZYyC4JxNIZT+R5SSU_JZ0)gs1=$dng8r zgDAhPaA8!5S)fuQdSl>z>QDJCc>%zKPxAdUUIT`9IOzD{0bb1TsZ{w1?xecc+WP`s^PZKDo+!0b>y=-KzKXQhP#gF~-IFlx^)q+_5py_z-dUgLA%XOm{k&OC z4gLUU-^l>pm_ENF4nDwI_*y`tqXd7u-%_LPEFGYrbXn6H6}GK(+zGlK354H@h55rW zN?nK5%$i#BAgeCz^5BL^%y0FI2za9yhJCYx`D4}jxtB_?R`n&vVI_g>qODx)WnaC2 zj`ci*N|_jH@i!)8Fs%jNq)JTG$6cAW2>(^0w3pc7BXQz$cnbZS&+y|z1h5Xb!Q$*x z?Gn9ePq4clCrYXIAp% zR>aYwHJHWsrD4nASY%iVj7K{)lS`XS4dO;<*r!8#$*FWJk%jf*v;UG4?58FdHri9S z6lXb^vsyk|W{s*Nn@IEA_OI;3GxqYoo-#bD*4B>RgF#XwqrPemD<(>@ETvtocDb@* zt4rJL${iTwIv=W(sKM*oU*njB_5dH8!2bY)C-8hp$&8)=0000y06e diff --git a/lib/tasks/server_files/p5-shim.js b/lib/tasks/server_files/p5-shim.js deleted file mode 100644 index 8d2c33822..000000000 --- a/lib/tasks/server_files/p5-shim.js +++ /dev/null @@ -1,1755 +0,0 @@ -/** - * Skulpt p5.js. - */ - -const $builtinmodule = function (name) { - let colorClass; - let screenClass; - let environmentClass; - let keyboardClass; - let mouseClass; - let imageClass; - let vectorClass; - let fontClass; - - const mod = {__name__: new Sk.builtin.str("p5")}; - - // Helper function for extracting values from arguments - const processArgs = function processArgumentValues(arguments_) { - const argVals = []; - for (a of arguments_) { - if (typeof(a) !== 'undefined') { - argVals.push(a.v); - } - } - - return argVals; - }; - - // We need this to store a reference to the actual p5 object which is not created - // until the run function is called. Even then the p5 object is passed by the - // p5.js sytem as a parameter to the sketchProc function. - - mod.pInst = null; - mod.p = null; - - // ========= - // Constants - // ========= - - // Graphics Renderer - mod.P2D = new Sk.builtin.str("p2d"); - mod.WEBGL = new Sk.builtin.str("webgl"); - - // Environment - mod.ARROW = new Sk.builtin.str("default"); - mod.CROSS = new Sk.builtin.str("crosshair"); - mod.HAND = new Sk.builtin.str("pointer"); - mod.MOVE = new Sk.builtin.str("move"); - mod.TEXT = new Sk.builtin.str("text"); - mod.WAIT = new Sk.builtin.str("wait"); - - // Trigonometry - mod.HALF_PI = new Sk.builtin.float_(Math.PI / 2.0); - mod.PI = new Sk.builtin.float_(Math.PI); - mod.QUARTER_PI = new Sk.builtin.float_(Math.PI / 4.0); - mod.TAU = new Sk.builtin.float_(Math.PI * 2.0); - mod.TWO_PI = new Sk.builtin.float_(Math.PI * 2.0); - - mod.DEGREES = new Sk.builtin.str("degrees"); - mod.RADIANS = new Sk.builtin.str("radians"); - - mod.DEG_TO_RAD = new Sk.builtin.float_( Math.PI / 180.0); - mod.RAD_TO_DEG = new Sk.builtin.float_( 180.0 / Math.PI); - - // Shape - mod.CORNER = new Sk.builtin.str("corner"); - mod.CORNERS = new Sk.builtin.str("corners"); - mod.RADIUS = new Sk.builtin.str("radius"); - mod.RIGHT = new Sk.builtin.str("right"); - mod.LEFT = new Sk.builtin.str("left"); - mod.CENTER = new Sk.builtin.str("center"); - mod.TOP = new Sk.builtin.str("top"); - mod.BOTTOM = new Sk.builtin.str("bottom"); - mod.BASELINE = new Sk.builtin.str("alphabetic"); - - mod.POINTS = new Sk.builtin.int_(0x0000); - mod.LINES = new Sk.builtin.int_(0x0001); - mod.LINE_STRIP = new Sk.builtin.int_(0x0003); - mod.LINE_LOOP = new Sk.builtin.int_(0x0002); - mod.TRIANGLES = new Sk.builtin.int_(0x0004); - mod.TRIANGLE_FAN = new Sk.builtin.int_(0x0006); - mod.TRIANGLE_STRIP = new Sk.builtin.int_(0x0005); - mod.QUADS = new Sk.builtin.str("quads"); - mod.QUAD_STRIP = new Sk.builtin.str("quad_strip"); - mod.TESS = new Sk.builtin.str("tess"); - mod.CLOSE = new Sk.builtin.str("close"); - mod.OPEN = new Sk.builtin.str("open"); - mod.CHORD = new Sk.builtin.str("chord"); - mod.PIE = new Sk.builtin.str("pie"); - mod.PROJECT = new Sk.builtin.str("square"); - mod.SQUARE = new Sk.builtin.str("butt"); - mod.ROUND = new Sk.builtin.str("round"); - mod.BEVEL = new Sk.builtin.str("bevel"); - mod.MITER = new Sk.builtin.str("miter"); - - // Color - mod.RGB = new Sk.builtin.str("rgb"); - mod.HSB = new Sk.builtin.str("hsb"); - mod.HSL = new Sk.builtin.str("hsl"); - - // DOM Extension - mod.AUTO = new Sk.builtin.str("auto"); - mod.ALT = new Sk.builtin.int_(18); - mod.BACKSPACE = new Sk.builtin.int_(8); - mod.CONTROL = new Sk.builtin.int_(17); - mod.DELETE = new Sk.builtin.int_(46); - mod.DOWN_ARROW = new Sk.builtin.int_(40); - mod.ENTER = new Sk.builtin.int_(13); - mod.ESCAPE = new Sk.builtin.int_(27); - mod.LEFT_ARROW = new Sk.builtin.int_(37); - mod.OPTION = new Sk.builtin.int_(18); - mod.RETURN = new Sk.builtin.int_(13); - mod.RIGHT_ARROW = new Sk.builtin.int_(39); - mod.SHIFT = new Sk.builtin.int_(16); - mod.TAB = new Sk.builtin.int_(9); - mod.UP_ARROW = new Sk.builtin.int_(38); - - // Rendering - mod.BLEND = new Sk.builtin.str("source-over"); - mod.REMOVE = new Sk.builtin.str("destination-out"); - mod.ADD = new Sk.builtin.str("lighter"); - mod.DARKEST = new Sk.builtin.str("darken"); - mod.LIGHTEST = new Sk.builtin.str("lighten"); - mod.DIFFERENCE = new Sk.builtin.str("difference"); - mod.SUBTRACT = new Sk.builtin.str("subtract"); - mod.EXCLUSION = new Sk.builtin.str("exclusion"); - mod.MULTIPLY = new Sk.builtin.str("multiply"); - mod.SCREEN = new Sk.builtin.str("screen"); - mod.REPLACE = new Sk.builtin.str("copy"); - mod.OVERLAY = new Sk.builtin.str("overlay"); - mod.HARD_LIGHT = new Sk.builtin.str("hard-light"); - mod.SOFT_LIGHT = new Sk.builtin.str("soft-light"); - mod.DODGE = new Sk.builtin.str("dodge"); - mod.BURN = new Sk.builtin.str("color-burn"); - - // Filters - mod.THRESHOLD = new Sk.builtin.str("threshold"); - mod.GRAY = new Sk.builtin.str("gray"); - mod.OPAQUE = new Sk.builtin.str("opaque"); - mod.INVERT = new Sk.builtin.str("invert"); - mod.POSTERIZE = new Sk.builtin.str("posterize"); - mod.DILATE = new Sk.builtin.str("dilate"); - mod.ERODE = new Sk.builtin.str("erode"); - mod.BLUR = new Sk.builtin.str("blur"); - - // Typography - mod.NORMAL = new Sk.builtin.str("normal"); - mod.ITALIC = new Sk.builtin.str("italic"); - mod.BOLD = new Sk.builtin.str("bold"); - mod.BOLDITALIC = new Sk.builtin.str("bold italic"); - - // Vertices - mod.LINEAR = new Sk.builtin.str("linear"); - mod.QUADRATIC = new Sk.builtin.str("quadratic"); - mod.BEZIER = new Sk.builtin.str("bezier"); - mod.CURVE = new Sk.builtin.str("curve"); - - // WebGL Draw Modes - mod.STROKE = new Sk.builtin.str("stroke"); - mod.FILL = new Sk.builtin.str("fill"); - mod.TEXTURE = new Sk.builtin.str("texture"); - mod.IMMEDIATE = new Sk.builtin.str("immediate"); - mod.IMAGE = new Sk.builtin.str("image"); - mod.NEAREST = new Sk.builtin.str("nearest"); - mod.REPEAT = new Sk.builtin.str("repeat"); - mod.CLAMP = new Sk.builtin.str("clamp"); - mod.MIRROR = new Sk.builtin.str("mirror"); - - // Device Orientation - mod.LANDSCAPE = new Sk.builtin.str("landscape"); - mod.PORTRAIT = new Sk.builtin.str("portrait"); - - // Defaults - mod.GRID = new Sk.builtin.str("grid"); - mod.AXES = new Sk.builtin.str("axes"); - mod.LABEL = new Sk.builtin.str("label"); - mod.FALLBACK = new Sk.builtin.str("fallback"); - - // ===== - // Color - // ===== - - // Creating & Reading - mod.alpha = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - return new Sk.builtin.float_(mod.pInst.alpha(...argVals)); - }); - - mod.blue = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - return new Sk.builtin.float_(mod.pInst.blue(...argVals)); - }); - - mod.brightness = new Sk.builtin.func(function (r, g, b) { - const argVals = processArgs(arguments); - return new Sk.builtin.float_(mod.pInst.brightness(...argVals)); - }); - - colorClass = function ($gbl, $loc) { - $loc.__init__ = new Sk.builtin.func(function (self) { - const argVals = processArgs(arguments); - let data = argVals.filter(function( element ) { - return element !== undefined; - }); - self.v = mod.pInst.color(...data); - }); - $loc.__eq__ = new Sk.builtin.func(function (self, other) { - - return new Sk.builtin.bool( - Sk.misceval.callsimArray(mod.red, [self]).v === Sk.misceval.callsimArray(mod.red, [other]).v && - Sk.misceval.callsimArray(mod.green, [self]).v === Sk.misceval.callsimArray(mod.green, [other]).v && - Sk.misceval.callsimArray(mod.blue, [self]).v === Sk.misceval.callsimArray(mod.blue, [other]).v - ) - }) - }; - - mod.Color = Sk.misceval.buildClass(mod, colorClass, "Color", []); - - mod.get = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - const colorArgs = mod.pInst.get(...argVals) - const colorArgsArray = [ - new Sk.builtin.float_(colorArgs[0]), - new Sk.builtin.float_(colorArgs[1]), - new Sk.builtin.float_(colorArgs[2]) - ] - return new Sk.misceval.callsimArray(mod.Color, colorArgsArray) - }); - - mod.green = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - return new Sk.builtin.float_(mod.pInst.green(...argVals)); - }); - - mod.hue = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - return new Sk.builtin.float_(mod.pInst.hue(...argVals)); - }); - - mod.lerpColor = new Sk.builtin.func(function (c1, c2, amt) { - const c = Sk.misceval.callsimArray(mod.color, [ - new Sk.builtin.int_(0), - new Sk.builtin.int_(0), - new Sk.builtin.int_(0)]); - c.v = mod.pInst.lerpColor(c1.v, c2.v, amt.v); - return c; - }); - - mod.lightness = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - return new Sk.builtin.float_(mod.pInst.lightness(...argVals)); - }); - - mod.red = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - return new Sk.builtin.float_(mod.pInst.red(...argVals)); - }); - - mod.saturation = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - return new Sk.builtin.float_(mod.pInst.saturation(...argVals)); - }); - - // Setting - mod.background = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.background(...argVals); - }); - - mod.clear = new Sk.builtin.func(function () { - mod.pInst.clear(); - }); - - mod.colorMode = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.colorMode(...argVals); - }); - - mod.fill = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.fill(...argVals); - }); - - mod.no_fill = new Sk.builtin.func(function () { - mod.pInst.noFill(); - }); - - mod.no_stroke = new Sk.builtin.func(function () { - mod.pInst.noStroke(); - }); - - mod.stroke = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.stroke(...argVals); - }); - - mod.erase = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.erase(...argVals); - }); - - mod.noErase = new Sk.builtin.func(function () { - mod.pInst.noErase(); - }); - - // ===== - // Shape - // ===== - - // 2D Primitives - mod.arc = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.arc(...argVals); - }); - - mod.ellipse = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.ellipse(...argVals); - }); - - mod.circle = new Sk.builtin.func(function (x, y, d) { - mod.pInst.circle(x.v, y.v, d.v); - }); - - mod.line = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.line(...argVals); - }); - - mod.point = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.point(...argVals); - }); - - mod.quad = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.quad(...argVals); - }); - - mod.rect = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.rect(...argVals); - }); - - mod.square = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.square(...argVals); - }); - - mod.triangle = new Sk.builtin.func(function (x1, y1, x2, y2, x3, y3) { - mod.pInst.triangle(x1.v, y1.v, x2.v, y2.v, x3.v, y3.v); - }); - - // Attributes - mod.ellipseMode = new Sk.builtin.func(function (mode) { - mod.pInst.ellipseMode(mode.v); - }); - - mod.noSmooth = new Sk.builtin.func(function () { - mod.pInst.noSmooth(); - }); - - mod.rect_mode = new Sk.builtin.func(function (mode) { - mod.pInst.rectMode(mode.v); - }); - - mod.smooth = new Sk.builtin.func(function () { - mod.pInst.smooth(); - }); - - mod.strokeCap = new Sk.builtin.func(function (cap) { - mod.pInst.strokeCap(cap.v); - }); - - mod.strokeJoin = new Sk.builtin.func(function (join) { - mod.pInst.strokeJoin(join.v); - }); - - mod.stroke_weight = new Sk.builtin.func(function (weight) { - mod.pInst.strokeWeight(weight.v); - }); - - // Curves - mod.bezier = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.bezier(...argVals); - }); - - mod.bezierDetail = new Sk.builtin.func(function (detail) { - mod.pInst.bezierDetail(detail.v); - }); - - mod.bezierPoint = new Sk.builtin.func(function (a, b, c, d, t) { - mod.pInst.bezierPoint(a.v, b.v, c.v, d.v, t.v); - }); - - mod.bezierTangent = new Sk.builtin.func(function (a, b, c, d, t) { - mod.pInst.bezierTangent(a.v, b.v, c.v, d.v, t.v); - }); - - mod.curve = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.curve(...argVals); - }); - - mod.curveDetail = new Sk.builtin.func(function (resolution) { - mod.pInst.curveDetail(resolution.v); - }); - - mod.curveTightness = new Sk.builtin.func(function (amount) { - mod.pInst.curveTightness(amount.v); - }); - - mod.curvePoint = new Sk.builtin.func(function (a, b, c, d, t) { - mod.pInst.curvePoint(a.v, b.v, c.v, d.v, t.v); - }); - - mod.curveTangent = new Sk.builtin.func(function (a, b, c, d, t) { - mod.pInst.curveTangent(a.v, b.v, c.v, d.v, t.v); - }); - - // Vertex - mod.beginContour = new Sk.builtin.func(function () { - mod.pInst.beginContour(); - }); - - mod.beginShape = new Sk.builtin.func(function (kind) { - if (typeof(kind) === "undefined") { - mod.pInst.beginShape(); - } else { - mod.pInst.beginShape(kind.v); - } - }); - - mod.bezierVertex = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.bezierVertex(...argVals); - }); - - mod.curveVertex = new Sk.builtin.func(function (x, y, z) { - // curveVertex(x, y) - // curveVertex(x, y, z) - if (typeof(z) === "undefined") { - mod.pInst.curveVertex(x.v, y.v); - } else { - mod.pInst.curveVertex(x.v, y.v, z.v); - } - }); - - mod.endContour = new Sk.builtin.func(function () { - mod.pInst.endContour(); - }); - - mod.endShape = new Sk.builtin.func(function (mode) { - if (typeof(mode) === "undefined") { - mod.pInst.endShape(); - } else { - mod.pInst.endShape(mode.v); - } - }); - - mod.quadraticVertex = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.quadraticVertex(...argVals); - }); - - mod.vertex = new Sk.builtin.func(function (x, y, z, u, v) { - // vertex(x, y); - // vertex(x, y, z); - // vertex(x, y, u, v); - // vertex(x, y, z, u, v); - if (typeof(z) === "undefined") { - mod.pInst.vertex(x.v, y.v); - } else if (typeof(u) === "undefined") { - mod.pInst.vertex(x.v, y.v, z.v); - } else if (typeof(v) === "undefined") { - mod.pInst.vertex(x.v, y.v, z.v, u.v); - } else { - mod.pInst.vertex(x.v, y.v, z.v, u.v, v.v); - } - }); - - // 3D Primitives - mod.plane = new Sk.builtin.func(function () { - const argVals = processArgs(arguments); - mod.pInst.plane(...argVals); - }); - - mod.box = new Sk.builtin.func(function() { - const argVals = processArgs(arguments); - mod.pInst.box(...argVals); - }); - - mod.sphere = new Sk.builtin.func(function() { - const argVals = processArgs(arguments); - mod.pInst.sphere(...argVals); - }); - - mod.cylinder = new Sk.builtin.func(function() { - const argVals = processArgs(arguments); - mod.pInst.cylinder(...argVals); - }); - - mod.cone = new Sk.builtin.func(function() { - const argVals = processArgs(arguments); - mod.pInst.cone(...argVals); - }); - - mod.ellipsoid = new Sk.builtin.func(function() { - const argVals = processArgs(arguments); - mod.pInst.ellipsoid(...argVals); - }); - - mod.torus = new Sk.builtin.func(function() { - const argVals = processArgs(arguments); - mod.pInst.torus(...argVals); - }); - - // TODO: 3D Models - - // ========== - // Typography - // ========== - - // Attributes - mod.text_align = new Sk.builtin.func(function (horizAlign, vertAlign) { - // textAlign(horizAlign) - // textAlign(horizAlign, vertAlign) - if (typeof(vertAlign) === "undefined") { - mod.pInst.textAlign(horizAlign.v); - } else { - mod.pInst.textAlign(horizAlign.v, vertAlign.v); - } - }); - - mod.textLeading = new Sk.builtin.func(function (leading) { - mod.pInst.textLeading(leading.v); - }); - - mod.text_size = new Sk.builtin.func(function (theSize) { - mod.pInst.textSize(theSize.v); - }); - - mod.textStyle = new Sk.builtin.func(function (theStyle) { - mod.pInst.textStyle(theStyle.v); - }); - - mod.textWidth = new Sk.builtin.func(function (theText) { - return new Sk.builtin.float_(mod.pInst.textWidth(theText.v)); - }); - - mod.textAscent = new Sk.builtin.func(function () { - return new Sk.builtin.float_(mod.pInst.textAscent()); - }); - - mod.textDescent = new Sk.builtin.func(function () { - return new Sk.builtin.float_(mod.pInst.textDescent()); - }); - - // Loading & Displaying - mod.loadFont = new Sk.builtin.func(function (path) { - const font = Sk.misceval.callsimArray(mod.PFont); - font.v = mod.pInst.loadFont(path.v); - return font; - }); - - mod.text = new Sk.builtin.func(function (theText, x, y) { - mod.pInst.text(theText.v, x.v, y.v); - }); - - mod.textFont = new Sk.builtin.func(function (font, size) { - // textFont(font) - // textFont(font, size) - if (typeof(size) === "undefined") { - mod.pInst.textFont(font.v); - } else { - mod.pInst.textFont(font.v, size.v); - } - }); - - fontClass = function ($gbl, $loc) { - $loc.__init__ = new Sk.builtin.func(function (self) { - // PFont() - self.v = new p5.Font(mod.pInst); - }); - - // TODO - // textBounds() - // textToPoints() - }; - - mod.PFont = Sk.misceval.buildClass(mod, fontClass, "PFont", []); - - - - - - - - - - - - - - - mod.ambient = new Sk.builtin.func(function (r, g, b) { - // ambient(gray) - // ambient(red, green blue) - // r will be either: - // a number in which case the fill will be grayscale - // a color object - // g, and b may be undefined. If they hold values it will - // be assumed that we have an r,g,b color tuple - if (typeof(g) === "undefined") { - mod.pInst.ambient(r.v); - } else if (typeof(b) === "undefined") { - mod.pInst.ambient(r.v, g.v); - } else { - mod.pInst.ambient(r.v, g.v, b.v); - } - }); - - mod.ambientLight = new Sk.builtin.func(function (v1, v2, v3, x, y, z) { - // ambientLight(v1,v2,v3) - // ambientLight(v1,v2,v3,x,y,z) - if (typeof(x) === "undefined") { - mod.pInst.ambientLight(v1.v, v2.v, v3.v); - } else if (typeof(y) === "undefined") { - mod.pInst.ambientLight(v1.v, v2.v, v3.v, x.v); - } else if (typeof(z) === "undefined") { - mod.pInst.ambientLight(v1.v, v2.v, v3.v, x.v, y.v); - } else { - mod.pInst.ambientLight(v1.v, v2.v, v3.v, x.v, y.v, z.v); - } - }); - - mod.beginCamera = new Sk.builtin.func(function () { - mod.pInst.beginCamera(); - }); - - - - - - - - mod.blend = new Sk.builtin.func(function (v1, v2, v3, v4, v5, - v6, v7, v8, v9, v10) { - if (other instanceof Sk.builtin.int_ || other instanceof Sk.builtin.float_) { - // blend(x, y,width,height,dx, dy,dwidth,dheight,MODE) - mod.pInst.blend(v1.v, v2.v, v3.v, v4.v, v5.v, - v6.v, v7.v, v8.v, v9.v); - } else { - // blend(srcImg,x,y, width, height,dx,dy, dwidth, dheight,MODE) - mod.pInst.blend(v1.v, v2.v, v3.v, v4.v, v5.v, - v6.v, v7.v, v8.v, v9.v, v10.v); - } - }); - - mod.blendColor = new Sk.builtin.func(function (c1, c2, mode) { - // blendColor(c1,c2,MODE) - const c = Sk.misceval.callsimArray(mod.color, [ - new Sk.builtin.int_(0), - new Sk.builtin.int_(0), - new Sk.builtin.int_(0)]); - c.v = mod.pInst.blendColor(c1.v, c2.v, mode.v); - return c; - }); - - - - mod.camera = new Sk.builtin.func(function (eyeX, eyeY, eyeZ, - centerX, centerY, centerZ, - upX, upY, upZ) { - // camera() - // camera(eyeX, eyeY, eyeZ,centerX, centerY, centerZ,upX, upY, upZ) - if (typeof(eyeX) === "undefined") { - mod.pInst.camera(); - } else { - mod.pInst.camera(eyeX.v, eyeY.v, eyeZ.v, - centerX.v, centerY.v, centerZ.v, - upX.v, upY.v, upZ.v); - } - }); - - mod.constrain = new Sk.builtin.func(function (value, min, max) { - return new Sk.builtin.float_(mod.pInst.constrain(value.v, min.v, max.v)); - }); - - mod.copy = new Sk.builtin.func(function (v1, v2, v3, v4, v5, - v6, v7, v8, v9) { - if (other instanceof Sk.builtin.int_ || other instanceof Sk.builtin.float_) { - // copy(x, y,width,height,dx, dy,dwidth,dheight) - mod.pInst.copy(v1.v, v2.v, v3.v, v4.v, v5.v, - v6.v, v7.v, v8.v); - } else { - // copy(srcImg,x,y, width, height,dx,dy, dwidth, dheight) - mod.pInst.copy(v1.v, v2.v, v3.v, v4.v, v5.v, - v6.v, v7.v, v8.v, v9.v); - } - }); - - mod.createFont = new Sk.builtin.func(function (name, size, smooth, charset) { - // createFont(name, size) - // createFont(name, size, smooth) - // createFont(name, size, smooth, charset) - const font = Sk.misceval.callsimArray(mod.PFont); - if (typeof(smooth) === "undefined") { - font.v = mod.pInst.createFont(name.v, size.v); - } else if (typeof(charset) === "undefined") { - font.v = mod.pInst.createFont(name.v, size.v, smooth.v); - } else { - font.v = mod.pInst.createFont(name.v, size.v, smooth.v, charset.v); - } - return font; - }); - - mod.createGraphics = new Sk.builtin.func(function (width, height, renderer) { - // createGraphics(width, height) - // createGraphics(width, height, renderer) - const graphics = Sk.misceval.callsimArray(mod.PGraphics); - if (typeof(renderer) === "undefined") { - graphics.v = mod.pInst.createGraphics(width.v, height.v); - } else { - graphics.v = mod.pInst.createGraphics(width.v, height.v, renderer.v); - } - return graphics; - }); - - mod.createImage = new Sk.builtin.func(function (width, height) { - const image = Sk.misceval.callsimArray(mod.PImage, [width, height]); - image.v = mod.pInst.createImage(width.v, height.v); - return image; - }); - - mod.cursor = new Sk.builtin.func(function (v, x, y) { - // cursor() - // cursor(MODE) - // cursor(image,x,y) - if (typeof(v) === "undefined") { - mod.pInst.cursor(); - } else if (typeof(x) === "undefined") { - mod.pInst.cursor(v.v); - } else if (typeof(y) === "undefined") { - mod.pInst.cursor(v.v, x.v); - } else { - mod.pInst.cursor(v.v, x.v, y.v); - } - }); - - - - - - mod.day = new Sk.builtin.func(function () { - return new Sk.builtin.int_(mod.pInst.day()); - }); - - mod.degrees = new Sk.builtin.func(function (angle) { - // degrees(angle) - return new Sk.builtin.float_(mod.pInst.degrees(angle.v)); - }); - - mod.directionalLight = new Sk.builtin.func(function (v1,v2,v3,nx,ny,nz) { - // directionalLight(v1,v2,v3,nx,ny,nz) - mod.pInst.directionalLight(v1.v,v2.v,v3.v,nx.v,ny.v,nz.v); - }); - - mod.dist = new Sk.builtin.func(function (x1, y1, z1, x2, y2, z2) { - // dist(x1, y1, x2, y2) - // dist(x1, y1, z1, x2, y2, z2) - if (typeof(y2) === "undefined") { - return new Sk.builtin.float_(mod.pInst.dist(x1.v, y1.v, z1.v, x2.v)); - } else if (typeof(z2) === "undefined") { - return new Sk.builtin.float_(mod.pInst.dist(x1.v, y1.v, z1.v, x2.v, y2.v)); - } else { - return new Sk.builtin.float_(mod.pInst.dist(x1.v, y1.v, z1.v, x2.v, y2.v, z2.v)); - } - }); - - mod.emissive = new Sk.builtin.func(function (v1, v2, v3) { - // emissive(gray) - // emissive(color) - // emissive(v1,v2,v3) - if (typeof(v2) === "undefined") { - mod.pInst.emissive(v1.v); - } else if (typeof(v3) === "undefined") { - mod.pInst.emissive(v1.v, v2.v); - } else { - mod.pInst.emissive(v1.v, v2.v, v3.v); - } - }); - - mod.endCamera = new Sk.builtin.func(function () { - // endCamera() - mod.pInst.endCamera(); - }); - - mod.filter = new Sk.builtin.func(function (mode, srcImg) { - // filter(MODE) - // filter(MODE, srcImg) - if (typeof(srcImg) === "undefined") { - mod.pInst.filter(mode.v); - } else { - mod.pInst.filter(mode.v, srcImg.v); - } - }); - - mod.frustum = new Sk.builtin.func(function (left, right, bottom, top, near, far) { - // frustum(left, right, bottom,top, near, far) - mod.pInst.frustum(left, right, bottom, top, near, far); - }); - - mod.hint = new Sk.builtin.func(function (item) { - // hint(item) - mod.pInst.hint(item); - }); - - mod.hour = new Sk.builtin.func(function () { - return new Sk.builtin.int_(mod.pInst.hour()); - }); - - - - mod.image_mode = new Sk.builtin.func(function (mode) { - mod.pInst.imageMode(mode.v); - }); - - mod.lerp = new Sk.builtin.func(function (value1, value2, amt) { - // lerp(value1, value2, amt) - // returns float - return new Sk.builtin.float_(mod.pInst.lerp(value1.v, value2.v, amt.v)); - }); - - - - mod.lightFalloff = new Sk.builtin.func(function (constant, linear, quadratic) { - // lightFalloff(constant,linear,quadratic) - mod.pInst.lightFalloff(constant.v, linear.v, quadratic.v); - }); - - mod.lights = new Sk.builtin.func(function () { - mod.pInst.lights(); - }); - - mod.lightSpecular = new Sk.builtin.func(function (v1, v2, v3) { - // lightSpecular(v1,v2,v3) - mod.pInst.lightSpecular(v1.v, v2.v, v3.v); - }); - - mod.loadBytes = new Sk.builtin.func(function (filename) { - // loadBytes(filename) - // returns byte[] - return new Sk.builtin.list(mod.pInst.loadBytes(filename.v)); - }); - - - - mod.loadShape = new Sk.builtin.func(function (filename) { - // loadShape(filename) - // returns shape - const shape = Sk.misceval.callsimArray(mod.PShapeSVG, [ - new Sk.builtin.str("string"), - filename]); - return shape; - }); - - mod.loadStrings = new Sk.builtin.func(function (filename) { - // loadStrings(filename) - // returns string [] - return new Sk.builtin.list(mod.pInst.loadStrings(filename.v)); - }); - - mod.mag = new Sk.builtin.func(function (a, b, c) { - // mag(a,b) - // mag(a,b,c) - // returns magnitude as float - if (typeof(c) === "undefined") { - return new Sk.builtin.float_(mod.pInst.mag(a.v, b.v)); - } else { - return new Sk.builtin.float_(mod.pInst.mag(a.v, b.v, c.v)); - } - }); - - mod.map = new Sk.builtin.func(function (value,low1,high1,low2,high2) { - // map(value,low1,high1,low2,high2) - // returns float - return new Sk.builtin.float_(mod.pInst.map(value.v,low1.v,high1.v, - low2.v,high2.v)); - }); - - mod.millis = new Sk.builtin.func(function () { - return new Sk.builtin.int_(mod.pInst.millis()); - }); - - mod.minute = new Sk.builtin.func(function () { - return new Sk.builtin.int_(mod.pInst.minute()); - }); - - mod.modelX = new Sk.builtin.func(function (x, y, z) { - // modelX(x,y,z) - // returns float - return new Sk.builtin.float_(mod.pInst.modelX(x.v, y.v, z.v)); - }); - - mod.modelY = new Sk.builtin.func(function (x, y, z) { - // modelY(x,y,z) - // returns float - return new Sk.builtin.float_(mod.pInst.modelY(x.v, y.v, z.v)); - }); - - mod.modelZ = new Sk.builtin.func(function (x, y, z) { - // modelZ(x,y,z) - // returns float - return new Sk.builtin.float_(mod.pInst.modelZ(x.v, y.v, z.v)); - }); - - mod.month = new Sk.builtin.func(function () { - return new Sk.builtin.int_(mod.pInst.month()); - }); - - mod.noCursor = new Sk.builtin.func(function () { - mod.pInst.noCursor(); - }); - - mod.noise = new Sk.builtin.func(function (x, y, z) { - // noise(x) - // noise(x, y) - // noise(x, y, z) - // returns float - if (typeof(y) === "undefined") { - return new Sk.builtin.float_(mod.pInst.noise(x.v)); - } else if (typeof(z) === "undefined") { - return new Sk.builtin.float_(mod.pInst.noise(x.v, y.v)); - } else { - return new Sk.builtin.float_(mod.pInst.noise(x.v, y.v, z.v)); - } - }); - - mod.noiseDetail = new Sk.builtin.func(function (octaves, falloff) { - // noiseDetail(octaves); - // noiseDetail(octaves,falloff); - mod.pInst.noiseDetail(octaves.v, falloff.v); - }); - - mod.noiseSeed = new Sk.builtin.func(function (value) { - // noiseSeed(value); int - // returns float - return new Sk.builtin.float_(mod.pInst.noiseSeed(value.v)); - }); - - mod.noLights = new Sk.builtin.func(function () { - mod.pInst.noLights(); - }); - - mod.norm = new Sk.builtin.func(function (value, low, high) { - // norm(value, low, high) - // returns float - return new Sk.builtin.float_(mod.pInst.norm(value.v, low.v, high.v)); - }); - - mod.normal = new Sk.builtin.func(function (nx, ny, nz) { - // normal(nx,ny,nz) - // returns None - mod.pInst.normal(nx.v, ny.v, nz.v); - }); - - mod.no_tint = new Sk.builtin.func(function () { - mod.pInst.noTint(); - }); - - mod.ortho = new Sk.builtin.func(function (left, right, bottom, top, near, far) { - // ortho(left, right, bottom,top, near,far) - // returns None - mod.pInst.ortho(left.v, right.v, bottom.v, top.v, near.v, far.v); - }); - - mod.perspective = new Sk.builtin.func(function (fov, aspect, zNear, zFar) { - // perspective() - // perspective(fov, aspect, zNear, zFar) - // returns None - if (typeof(fov) === "undefined") { - mod.pInst.perspective(); - } else if (typeof(aspect) === "undefined") { - mod.pInst.perspective(fov.v); - } else if (typeof(zNear) === "undefined") { - mod.pInst.perspective(fov.v, aspect.v); - } else if (typeof(zFar) === "undefined") { - mod.pInst.perspective(fov.v, aspect.v, zNear.v); - } else { - mod.pInst.perspective(fov.v, aspect.v, zNear.v, zFar.v); - } - }); - - mod.pointLight = new Sk.builtin.func(function (v1,v2,v3,nx,ny,nz) { - // pointLight(v1,v2,v3,nx,ny,nz) - // returns None - mod.pInst.pointLight(v1.v,v2.v,v3.v,nx.v,ny.v,nz.v); - }); - - mod.printCamera = new Sk.builtin.func(function () { - // printCamera() - // returns None - mod.pInst.printCamera(); - }); - - mod.println = new Sk.builtin.func(function (data) { - // println(data) - mod.pInst.println(data.v); - }); - - mod.printProjection = new Sk.builtin.func(function () { - // printProjection() - // returns None - mod.pInst.printProjection(); - }); - - mod.radians = new Sk.builtin.func(function (angle) { - // radians(angle) - // returns int or float - return new Sk.builtin.float_(mod.pInst.radians(angle.v)); - }); - - mod.randomSeed = new Sk.builtin.func(function (value) { - // noiseSeed(value); - // returns float - return new Sk.builtin.float_(mod.pInst.randomSeed(value.v)); - }); - - mod.random = new Sk.builtin.func(function (v1, v2) { - // random(); - // random(high); - // random(low, high); - // returns float - if (typeof(v1) === "undefined") { - return new Sk.builtin.float_(mod.pInst.random()); - } else if (typeof(v2) === "undefined") { - return new Sk.builtin.float_(mod.pInst.random(v1.v)); - } else { - return new Sk.builtin.float_(mod.pInst.random(v1.v, v2.v)); - } - }); - - mod.requestImage = new Sk.builtin.func(function (filename, extension) { - // requestImage(filename) - // requestImage(filename, extension) - const image = Sk.misceval.callsimArray(mod.PImage); - if (typeof(extension) === "undefined") { - image.v = mod.pInst.requestImage(filename.v); - } else { - image.v = mod.pInst.requestImage(filename.v, extension.v); - } - return image; - }); - - - - mod.save = new Sk.builtin.func(function (filename) { - // save(filename) - // returns None - mod.pInst.save(filename.v); - }); - - mod.saveFrame = new Sk.builtin.func(function (filename) { - // saveFrame() - // saveFrame(filename-####.ext) - // returns None - if (typeof(filename) === "undefined") { - mod.pInst.saveFrame(); - } else { - mod.pInst.saveFrame(filename.v); - } - }); - - mod.saveStrings = new Sk.builtin.func(function (filename, strings) { - // saveStrings(filename,strings) - mod.pInst.saveStrings(filename.v, strings.v); - }); - - mod.screenX = new Sk.builtin.func(function (x, y, z) { - // screenX(x,y,z) - // returns float - return new Sk.builtin.float_(mod.pInst.screenX(x.v, y.v, z.v)); - }); - - mod.screenY = new Sk.builtin.func(function (x, y, z) { - // screenY(x,y,z) - // returns float - return new Sk.builtin.float_(mod.pInst.screenY(x.v, y.v, z.v)); - }); - - mod.screenZ = new Sk.builtin.func(function (x, y, z) { - // screenZ(x,y,z) - // returns float - return new Sk.builtin.float_(mod.pInst.screenZ(x.v, y.v, z.v)); - }); - - mod.second = new Sk.builtin.func(function () { - return new Sk.builtin.int_(mod.pInst.second()); - }); - - mod.shape = new Sk.builtin.func(function (sh, x, y, width, height) { - // shape(sh) - // shape(sh,x,y) - // shape(sh,x,y,width,height) - // returns? - if (typeof(x) === "undefined") { - mod.pInst.shape(sh.v); - } else if (typeof(y) === "undefined") { - mod.pInst.shape(sh.v,x.v); - } else if (typeof(width) === "undefined") { - mod.pInst.shape(sh.v,x.v,y.v); - } else if (typeof(height) === "undefined") { - mod.pInst.shape(sh.v,x.v,y.v,width.v); - } else { - mod.pInst.shape(sh.v,x.v,y.v,width.v,height.v); - } - }); - - mod.shapeMode = new Sk.builtin.func(function (mode) { - // shapeMode(MODE) - mod.pInst.shapeMode(mode.v); - }); - - mod.shininess = new Sk.builtin.func(function (shine) { - // shininess(shine) - // returns None - mod.pInst.shininess(shine.v); - }); - - mod.specular = new Sk.builtin.func(function (v1,v2,v3) { - // specular(gray) - // specular(color) - // specular(v1,v2,v3) - if (typeof(v2) === "undefined") { - mod.pInst.specular(v1.v); - } else if (typeof(v3) === "undefined") { - mod.pInst.specular(v1.v,v2.v); - } else { - mod.pInst.specular(v1.v,v2.v,v3.v); - } - }); - - mod.spotLight = new Sk.builtin.func(function (v1,v2,v3,nx,ny,nz,angle,concentration) { - // spotLight(v1,v2,v3,nx,ny,nz,angle,concentration) - // returns None - mod.pInst.spotLight(v1.v,v2.v,v3.v,nx.v,ny.v,nz.v,angle.v,concentration.v); - }); - - mod.sq = new Sk.builtin.func(function (value) { - // sq(value) - // returns squared number - return new Sk.builtin.float_(mod.pInst.sq(value)); - }); - - mod.status = new Sk.builtin.func(function (text) { - // status(text) - mod.pInst.status(text.v); - }); - - - - - - - - - - mod.textMode = new Sk.builtin.func(function (mode) { - // textMode(MODE) - // returns None - mod.pInst.textMode(mode.v); - }); - - - - mod.texture = new Sk.builtin.func(function (img) { - // texture(img) - // returns None - mod.pInst.texture(img.v); - }); - - mod.textureMode = new Sk.builtin.func(function (mode) { - // textureMode(MODE) - // returns None - mod.pInst.textureMode(mode.v); - }); - - - - mod.tint = new Sk.builtin.func(function (v1, v2, v3, v4) { - // tint(gray) - // tint(gray, alpha) - // tint(value1, value2, value3) - // tint(value1, value2, value3, alpha) - // tint(color) - // tint(color, alpha) - // tint(hex) - // tint(hex, alpha) - if (typeof(v2) === "undefined") { - mod.pInst.tint(v1.v); - } else if (typeof(v3) === "undefined") { - mod.pInst.tint(v1.v, v2.v); - } else if (typeof(v4) === "undefined") { - mod.pInst.tint(v1.v, v2.v, v3.v); - } else { - mod.pInst.tint(v1.v, v2.v, v3.v, v4.v); - } - }); - - mod.updatePixels = new Sk.builtin.func(function () { - // updatePixels() - mod.pInst.updatePixels(); - }); - - - - mod.year = new Sk.builtin.func(function () { - return new Sk.builtin.int_(mod.pInst.year()); - }); - - - // Environment - - mod.loop = new Sk.builtin.func(function () { - if (mod.pInst === null) { - throw new Sk.builtin.Exception("loop() should be called after run()"); - } - looping = true; - mod.pInst.loop(); - }); - - mod.noLoop = new Sk.builtin.func(function () { - if (mod.pInst === null) { - throw new Sk.builtin.Exception("noLoop() should be called after run()"); - } - looping = false; - mod.pInst.noLoop(); - }); - - // NOTE: difference with ProcessingJS - // frameRate is only a function, not a variable: - // use environment.frameRate for value - // mod.frame_rate = new Sk.builtin.func(function (fr) { - // mod.pInst.frameRate(fr.v); - // }); - - // NOTE: difference with ProcessingJS - // Use mouse.pressed rather than mousePressed - - // NOTE: difference with ProcessingJS - // Use environment.keyPressed rather than keyPressed - - // NOTE: difference with ProcessingJS - // Use environment.frameCount - - // NOTE: difference with ProcessingJS - // Use environment.frameCount - - // NOTE: difference with ProcessingJS - // Use environment.online - - // NOTE: difference with ProcessingJS - // Use environment.focused - - Sk.builtins.width = new Sk.builtin.int_(0); - Sk.builtins.height = new Sk.builtin.int_(0); - mod.renderMode = mod.P2D; - - mod.size = new Sk.builtin.func(function (w, h, mode) { - if (typeof(mode) === "undefined") { - mode = mod.P2D; - } - mod.pInst.createCanvas(w.v, h.v, mode.v); - Sk.builtins.width = new Sk.builtin.int_(mod.pInst.width); - Sk.builtins.height = new Sk.builtin.int_(mod.pInst.height); - mod.renderMode = mode; - }); - - mod.exitp = new Sk.builtin.func(function () { - mod.pInst.exit(); - }); - - Sk.builtins.mouse_x = new Sk.builtin.float_(0) - Sk.builtins.mouse_y = new Sk.builtin.float_(0) - - const updateMouseCoords = (e) => { - if (mod.pInst && mod.pInst.mouseX>=0 && mod.pInst.mouseY>=0 && mod.pInst.mouseX <= Sk.builtins.width && mod.pInst.mouseY <= Sk.builtins.height) { - Sk.builtins.mouse_x = new Sk.builtin.float_(mod.pInst.mouseX); - Sk.builtins.mouse_y = new Sk.builtin.float_(mod.pInst.mouseY); - } - } - - document.getElementById(Sk.p5.sketch).addEventListener('mousemove', updateMouseCoords) - - // NOTE: difference with ProcessingJS - // Use pmouseX() or mouse.px rather than pmouseX - mod.pmouseX = new Sk.builtin.func(function () { - return new Sk.builtin.float_(mod.pInst.pmouseX); - }); - - // NOTE: difference with ProcessingJS - // Use pmouseY() or mouse.py rather than pmouseY - mod.pmouseY = new Sk.builtin.func(function () { - return new Sk.builtin.float_(mod.pInst.pmouseY); - }); - - // Attributes - - - - - - - - - - - - - - - - // Transforms - mod.rotate = new Sk.builtin.func(function (rads) { - // rotation in radians - mod.pInst.rotate(rads.v); - }); - - mod.rotateX = new Sk.builtin.func(function(rads) { - mod.pInst.rotateX(rads.v); - }); - - mod.rotateY = new Sk.builtin.func(function(rads) { - mod.pInst.rotateY(rads.v); - }); - - mod.rotateZ = new Sk.builtin.func(function(rads) { - mod.pInst.rotateZ(rads.v); - }); - - mod.scale = new Sk.builtin.func(function (sx, sy, sz) { - if (typeof(sy) === "undefined") { - sy = 1.0; - } else { - sy = sy.v; - } - if (typeof(sz) === "undefined") { - sz = 1.0; - } else { - sz = sz.v; - } - mod.pInst.scale(sx.v, sy, sz); - }); - - mod.translate = new Sk.builtin.func(function (sx, sy, sz) { - if (typeof(sy) === "undefined") { - sy = 1.0; - } else { - sy = sy.v; - } - if (typeof(sz) === "undefined") { - sz = 1.0; - } else { - sz = sz.v; - } - mod.pInst.translate(sx.v, sy, sz); - }); - - mod.pop_matrix = new Sk.builtin.func(function() { - mod.pInst.pop(); - }); - - mod.push_matrix = new Sk.builtin.func(function() { - mod.pInst.push(); - }); - - mod.applyMatrix = new Sk.builtin.func(function() { - const args = Array.prototype.slice.call(arguments, 0, 16); - - for (let i = 0; i < args.length; i++) { - args[i] = typeof(args[i]) === "undefined" ? 0.0 : args[i].v; - } - - mod.pInst.applyMatrix.apply(mod.pInst, args); - }); - - mod.resetMatrix = new Sk.builtin.func(function() { - mod.pInst.resetMatrix(); - }); - - mod.printMatrix = new Sk.builtin.func(function() { - return Sk.ffi.remapToPy(mod.pInst.printMatrix()); - }); - - mod.pop_style = new Sk.builtin.func(function() { - mod.pInst.pop(); - }); - - mod.push_style = new Sk.builtin.func(function() { - mod.pInst.push(); - }); - - // ////////////////////////////////////////////////////////////////////// - // Run - // - // Create the p5 context and setup of calls to setup, draw etc. - // - // - // ////////////////////////////////////////////////////////////////////// - _run = function (frame_rate) { - const sketchProc = (sketch) => { - const callBacks = {"device_moved": "deviceMoved", "device_turned": "deviceTurned", "device_shaken": "deviceShaken", "window_resized": "windowResized", "key_pressed": "keyPressed", "key_released": "keyReleased", "key_typed": "keyTyped", "mouse_pressed": "mousePressed", "mouse_released": "mouseReleased", "mouse_clicked": "mouseClicked", "double_clicked": "doubleClicked", "mouse_moved": "mouseMoved", "mouse_dragged": "mouseDragged", "mouse_wheel": "mouseWheel", "touch_started": "touchStarted", "touch_moved": "touchMoved", "touch_ended": "touchEnded"} - - mod.pInst = sketch; - - sketch.preload = function () { - if (Sk.globals["preload"]) { - Sk.misceval.callsimArray(Sk.globals["preload"]); - } - }; - - sketch.setup = function () { - if (Sk.globals["setup"]) { - Sk.misceval.callsimArray(Sk.globals["setup"]); - - for (const cb of Object.keys(callBacks)) { - if (Sk.globals[cb]) { - sketch[callBacks[cb]] = new Function("try {Sk.misceval.callsimArray(Sk.globals['" + cb + "']);} catch(e) {Sk.uncaughtException(e);}"); - } - } - } - }; - - mod.pInst.frameRate(frame_rate.v) - - sketch.draw = function () { - Sk.builtins.frame_count = new Sk.builtin.int_(sketch.frameCount); - if (Sk.globals["draw"]) { - try { - Sk.misceval.callsimArray(Sk.globals["draw"]); - } catch(e) { - Sk.uncaughtException(e); - } - } - }; - - Sk.p5.stop = function () { - mod.pInst.noLoop(); - - for (const cb of Object.keys(callBacks)) { - if (Sk.globals[cb]) { - sketch[callBacks[cb]] = null; - } - } - } - } - - const p5Sketch = document.getElementById(Sk.p5.sketch); - mod.p = new window.p5(sketchProc, p5Sketch); - }; - - _run.co_varnames = ['frame_rate']; - _run.$defaults = [new Sk.builtin.int_(60)]; - - mod.run = new Sk.builtin.func(_run) - - mouseClass = function ($gbl, $loc) { - $loc.__getattr__ = new Sk.builtin.func(function (self, key) { - key = Sk.ffi.remapToJs(key); - if (key === "x") { - return Sk.builtin.assk$(mod.pInst.mouseX); - } - else if (key === "y") { - return Sk.builtin.assk$(mod.pInst.mouseY); - } - else if (key === "px") { - return Sk.builtin.assk$(mod.pInst.pmouseX); - } - else if (key === "py") { - return Sk.builtin.assk$(mod.pInst.pmouseY); - } - else if (key === "pressed") { - return new Sk.builtin.bool(mod.pInst.mouseIsPressed); - } - else if (key === "button") { - return Sk.builtin.assk$(mod.pInst.mouseButton); - } - }); - }; - - - mod.Mouse = Sk.misceval.buildClass(mod, mouseClass, "Mouse", []); - - mod.mouse = Sk.misceval.callsimArray(mod.Mouse); - - keyboardClass = function ($gbl, $loc) { - $loc.__getattr__ = new Sk.builtin.func(function (self, key) { - key = Sk.ffi.remapToJs(key); - if (key === "key") { - return new Sk.builtin.str(mod.pInst.key.toString()); - } - else if (key === "keyCode") { - return Sk.builtin.assk$(mod.pInst.keyCode); - } - else if (key === "keyPressed") { - return new Sk.builtin.str(mod.pInst.keyPressed); - } // todo bool - }); - }; - - mod.Keyboard = Sk.misceval.buildClass(mod, keyboardClass, "Keyboard", []); - - mod.keyboard = Sk.misceval.callsimArray(mod.Keyboard); - - - environmentClass = function ($gbl, $loc) { - $loc.__getattr__ = new Sk.builtin.func(function (self, key) { - key = Sk.ffi.remapToJs(key); - if (key === "frame_count") { - return Sk.builtin.assk$(mod.pInst.frameCount); - } - else if (key === "frame_rate") { - return Sk.builtin.assk$(mod.pInst.frameRate); - } - else if (key === "height") { - return Sk.builtin.assk$(mod.pInst.height); - } - else if (key === "width") { - return Sk.builtin.assk$(mod.pInst.width); - } - else if (key === "online") { - return new Sk.builtin.bool(mod.pInst.online); - } - else if (key === "focused") { - return new Sk.builtin.bool(mod.pInst.focused); - } - }); - }; - - mod.Environment = Sk.misceval.buildClass(mod, environmentClass, "Environment", []); - - mod.environment = Sk.misceval.callsimArray(mod.Environment); - - screenClass = function ($gbl, $loc) { - $loc.__init__ = new Sk.builtin.func(function (self) { - self.pixels = null; - }); - - $loc.__getattr__ = new Sk.builtin.func(function (self, key) { - key = Sk.ffi.remapToJs(key); - if (key === "height") { - return Sk.builtin.assk$(mod.pInst.height); - } else if (key === "width") { - return Sk.builtin.assk$(mod.pInst.width); - } else if (key === "pixels") { - if (self.pixels == null) { - self.pixels = new Sk.builtin.list(mod.pInst.pixels.toArray()); - } - } - return self.pixels; - }); - }; - - mod.Screen = Sk.misceval.buildClass(mod, screenClass, "Screen", []); - - mod.screen = Sk.misceval.callsimArray(mod.Screen); - - mod.loadPixels = new Sk.builtin.func(function () { - mod.pInst.loadPixels(); - }); - - - - - - - // Image class and functions - imageClass = function ($gbl, $loc) { - $loc.__init__ = new Sk.builtin.func(function (self, width, height) { - self.v = mod.pInst.createImage(width.v, height.v); - }); - - $loc.__getattr__ = new Sk.builtin.func(function (self, key) { - key = Sk.ffi.remapToJs(key); - if (key === "width") { - return Sk.builtin.assk$(self.v.width); - } - if (key === "height") { - return Sk.builtin.assk$(self.v.height); - } - }); - }; - - mod.load_image = new Sk.builtin.func(function (path) { - const asset = Sk.p5.assets.find((el) => el.filename === path.v); - if (asset) { - path.v = asset.url - } - - const i = mod.pInst.loadImage(path.v); - const image = Sk.misceval.callsimArray(mod.PImage, [new Sk.builtin.int_(1), new Sk.builtin.int_(1)]); - image.v = i; - return image; - }); - - mod.image = new Sk.builtin.func(function () { - // image(img, x, y) - // image(img, x, y, width, height) - // image(img, dx, dy, dWidth, dHeight, sx, sy, [sWidth], [sHeight]) - const argVals = processArgs(arguments); - mod.pInst.image(...argVals); - }); - - // Vector class and functions - vectorClass = function ($gbl, $loc) { - $loc.__init__ = new Sk.builtin.func(function (self, x, y, z) { - // PVector() - // PVector(x,y) - // PVector(x,y,z) - if (typeof(x) === "undefined") { - self.v = new mod.pInst.createVector(); - } else if (typeof(z) === "undefined") { - self.v = new mod.pInst.createVector(x.v, y.v); - } else { - self.v = new mod.pInst.createVector(x.v, y.v, z.v); - } - }); - - $loc.__getattr__ = new Sk.builtin.func(function (self, key) { - key = Sk.ffi.remapToJs(key); - if (key === "x") { - return Sk.builtin.assk$(self.v.x); - } else if (key === "y") { - return Sk.builtin.assk$(self.v.y); - } else if (key === "z") { - return Sk.builtin.assk$(self.v.z); - } - }); - - $loc.get = new Sk.builtin.func(function (self) { - // get() Gets a copy of the vector - const new_vec = Sk.misceval.callsimArray(mod.PVector); - new_vec.v = self.v.get(); - return new_vec; - }); - - $loc.__setattr__ = new Sk.builtin.func(function (self, key, value) { - key = Sk.ffi.remapToJs(key); - if (key === "x") { - self.v.x = value.v; - } else if (key === "y") { - self.v.y = value.v; - } else if (key === "z") { - self.v.z = value.v; - } - }); - - $loc.set = new Sk.builtin.func(function (self, x, y, z) { - // set() Sets the x, y, z component of the vector - if (typeof(z) === "undefined") { - self.v.set(x.v, y.v); - } else { - self.v.set(x.v, y.v, z.v); - } - }); - - $loc.mag = new Sk.builtin.func(function (self) { - // mag() Calculates the magnitude (length) of the vector - // and returns the result as a float - return Sk.builtin.assk$(self.v.mag()); - }); - - $loc.add = new Sk.builtin.func(function (self, vec) { - // add() Adds one vector to another - const new_vec = Sk.misceval.callsimArray(mod.PVector); - new_vec.v = self.v.add(vec.v); - return new_vec; - }); - - $loc.sub = new Sk.builtin.func(function (self, vec) { - // sub() Subtracts one vector from another - const new_vec = Sk.misceval.callsimArray(mod.PVector); - new_vec.v = self.v.sub(vec.v); - return new_vec; - }); - - $loc.mult = new Sk.builtin.func(function (self, vec) { - // mult() Multiplies the vector by a scalar - const new_vec = Sk.misceval.callsimArray(mod.PVector); - new_vec.v = self.v.mult(vec.v); - return new_vec; - }); - - $loc.div = new Sk.builtin.func(function (self, vec) { - // div() Divides the vector by a scalar - const new_vec = Sk.misceval.callsimArray(mod.PVector); - new_vec.v = self.v.div(vec.v); - return new_vec; - }); - - $loc.dist = new Sk.builtin.func(function (self, vec) { - // dist() Calculate the Euclidean distance between two points - return Sk.builtin.assk$(self.v.dist(vec.v)); - }); - - $loc.dot = new Sk.builtin.func(function (self, v1, v2, v3) { - // dot() Calculates the dot product - // returns float - // vec.dot(x,y,z) - // vec.dot(v) - if (typeof(v2) === 'undefined') { - return Sk.builtin.assk$(self.v.dot(v1.v)); - } else { - return Sk.builtin.assk$(self.v.dot(v1.v, v2.v, v3.v)); - } - }); - - $loc.cross = new Sk.builtin.func(function (self, vec) { - // cross() Calculates the cross product - const new_vec = Sk.misceval.callsimArray(mod.PVector); - new_vec.v = self.v.cross(vec.v); - return new_vec; - }); - - $loc.normalize = new Sk.builtin.func(function (self) { - // normalize() Normalizes the vector - self.v.normalize(); - }); - - $loc.limit = new Sk.builtin.func(function (self, value) { - // limit() Limits the magnitude of the vector - self.v.limit(value.v); - }); - - $loc.angleBetween = new Sk.builtin.func(function (self, vec) { - // angleBetween() Calculates the angle between two vectors - return Sk.builtin.assk$(self.v.angleBetween(vec.v)); - }); - - $loc.array = new Sk.builtin.func(function (self) { - // array() - return new Sk.builtin.list(self.v.array()); - }); - }; - - - - mod.PImage = Sk.misceval.buildClass(mod, imageClass, "PImage", []); - mod.PVector = Sk.misceval.buildClass(mod, vectorClass, "PVector", []); - - - return mod; -}; diff --git a/lib/tasks/server_files/pygal.js b/lib/tasks/server_files/pygal.js deleted file mode 100644 index 2ea36c64a..000000000 --- a/lib/tasks/server_files/pygal.js +++ /dev/null @@ -1,392 +0,0 @@ -var $builtinmodule = function(name) { - function fill(arr, val) { - if (Array.prototype.fill) { - return Array.prototype.fill.bind(arr)(val, arguments[2], arguments[3]); - } - - // Steps 1-2. - if (arr == null) { - throw new TypeError('arr is null or not defined'); - } - - var O = Object(arr); - - // Steps 3-5. - var len = O.length >>> 0; - - // Steps 6-7. - var start = arguments[2]; - var relativeStart = start >> 0; - - // Step 8. - var k = relativeStart < 0 ? - Math.max(len + relativeStart, 0) : - Math.min(relativeStart, len); - - // Steps 9-10. - var end = arguments[3]; - var relativeEnd = end === undefined ? - len : end >> 0; - - // Step 11. - var final = relativeEnd < 0 ? - Math.max(len + relativeEnd, 0) : - Math.min(relativeEnd, len); - - // Step 12. - while (k < final) { - O[k] = val; - k++; - } - - // Step 13. - return O; - } - - - var mod = {}; - - var COLORS = [ - [255, 89, 149], [182, 227, 84], [254, 237, 108], [140, 237, 255], - [158, 111, 254], [137, 156, 161], [248, 248, 242], [191, 70, 70], - [81, 96, 131], [249, 38, 114], [130, 180, 20], [253, 151, 31], - [86, 194, 214], [128, 131, 132], [140, 84, 254], [70, 84, 87] - ]; - - var KWARGS = ['title', 'width', 'height', 'range', 'include_x_axis', 'x_title', 'y_title', 'title_font_size', 'fill', 'stroke', 'x_labels']; - - function Chart(options) { - this._options = options; - this._data = []; - } - - function rgba(rgb, a) { - return 'rgba(' + rgb.join(',') + ',' + a + ')'; - } - - Chart.prototype.add = function(label, values) { - this._data.unshift({ - name: label, - color: rgba(COLORS[this._data.length%COLORS.length], 0.75), - data: values, - marker : { - symbol: 'circle' - }, - stack : 1 - }); - - return ''; - } - - Chart.prototype.render = function(renderer) { - var options = this._options; - var title_style = { - color: '#FFFFFF' - }; - if (options.title_font_size) { - title_style['font-size'] = options.title_font_size + 'px'; - } - var xPlotLines = []; - var yPlotLines = []; - - if (options.range) { - yPlotLines.push({ - value: options.range.min, - width: 1, - color: '#FFFFFF' - }); - } - - var defaultWidth = Sk.availableWidth || 400; - var defaultHeight = Math.min(defaultWidth, Sk.availableHeight || 300); - - var chart = { - chart: { - width : options.width || defaultWidth, - height: options.height || defaultHeight, - backgroundColor: '#000' - }, - credits: { - enabled: false - }, - title: { - text: options.title, - style : title_style - }, - xAxis: { - title: { - text: options.x_title || null, - style : title_style, - margin: 20 - }, - categories: options.x_labels, - labels : { - enabled: options.x_labels ? true : false - }, - tickLength: 0 - }, - yAxis: { - startOnTick: false, - title: { - text: options.y_title || null, - style : title_style, - margin: 20 - }, - plotLines: yPlotLines, - min : options.include_x_axis - ? 0 - : options.range - ? options.range.min - : null, - max : options.range ? options.range.max : null, - gridLineDashStyle : 'ShortDash', - gridLineColor: '#DDD', - tickLength: 0 - }, - legend: { - itemStyle : { - color : '#FFFFFF' - }, - layout: 'vertical', - align: 'left', - verticalAlign: 'top', - y: 50, - borderWidth: 0 - }, - labels : { - style : { - color: '#FFFFFF' - } - }, - series: this._data - }; - - for(var i = 0; i < chart.series.length; i++) { - chart.series[i].legendIndex = chart.series.length - i; - chart.series[i].index = chart.series.length - i; - } - - if (renderer) { - chart = renderer(options, chart); - } - - Highcharts.chart('pygalOutput', chart); - - return ''; - } - - function some(val) { - return val && val !== Sk.builtin.none.none$; - } - - function kwfunc(impl, kwargs) { - if (kwargs && kwargs.length) { - impl.co_varnames = ['__self__'].concat(kwargs); - impl.$defaults = fill(new Array(kwargs.length), Sk.builtin.none.none$); - } - return new Sk.builtin.func(impl); - } - - function createChartType(type, renderer) { - mod[type] = Sk.misceval.buildClass(mod, function($gbl, $loc) { - $loc.__init__ = kwfunc( - function(self, title, width, height, range, include_x_axis, x_title, y_title, title_font_size, fill, stroke, x_labels) { - var options = {}; - if (some(title)) options.title = title.v; - if (some(width)) options.width = width.v; - if (some(height)) options.height = height.v; - if (some(range)) options.range = { - min: range.v[0].v, - max: range.v[1].v - }; - if (some(include_x_axis)) options.include_x_axis = include_x_axis.v; - if (some(x_title)) options.x_title = x_title.v; - if (some(y_title)) options.y_title = y_title.v; - if (some(title_font_size)) options.title_font_size = title_font_size.v; - if (some(fill)) options.fill = fill.v; - if (some(stroke)) options.stroke = stroke.v; - if (some(x_labels)) options.x_labels = x_labels.v; - - self.instance = new Chart(options); - }, KWARGS - ); - - $loc.add = new Sk.builtin.func(function(self, label, values) { - values = (values instanceof Sk.builtin.list) - ? Sk.ffi.remapToJs(values) - : [values.v]; - - return self.instance.add(label.v, values); - }); - - $loc.render = new Sk.builtin.func(function(self) { - var i, key, val; - - for (i = 0; i < KWARGS.length; i++) { - key = KWARGS[i]; - val = self.tp$getattr(key); - - if (typeof val !== "undefined") { - self.instance._options[key] = Sk.ffi.remapToJs(val); - } - } - - return self.instance.render(renderer); - }); - }, type, []); - } - - createChartType('Line', function(options, chart) { - chart.chart.type = options.fill ? 'area' : 'line'; - return chart; - }); - createChartType('StackedLine', function(options, chart) { - chart.chart.type = options.fill ? 'area' : 'line'; - chart.plotOptions = { - area : { - stacking : 'percent' - }, - series : { - stacking : 'percent' - } - }; - return chart; - }); - createChartType('Bar', function(options, chart) { - chart.chart.type = 'column'; - return chart; - }); - createChartType('StackedBar', function(options, chart) { - chart.chart.type = 'column'; - chart.plotOptions = { - column : { - stacking: 'percent' - } - }; - return chart; - }); - createChartType('HorizontalBar', function(options, chart) { - chart.chart.type = 'bar'; - return chart; - }); - createChartType('StackedHorizontalBar', function(options, chart) { - chart.chart.type = 'bar'; - chart.plotOptions = { - bar : { - stacking: 'percent' - } - }; - return chart; - }); - createChartType('XY', function(options, chart) { - if (options.stroke === false) { - chart.chart.type = 'scatter' - } - else { - chart.chart.type = options.fill ? 'area' : 'line'; - } - chart.xAxis.labels.enabled = true; - - return chart; - }); - createChartType('Radar', function(options, chart) { - chart.chart.polar = true; - chart.chart.type = 'line'; - chart.xAxis = { - categories: options.x_labels, - tickmarkPlacement: 'on', - lineWidth: 0 - } - chart.yAxis = { - gridLineInterpolation: 'polygon', - lineWidth: 0, - min: 0, - gridLineDashStyle : 'ShortDash', - gridLineColor: '#DDD' - } - for(var i = 0; i < chart.series.length; i++) { - chart.series[i].pointPlacement = 'on'; - } - - return chart; - }); - createChartType('Pie', function(options, chart) { - chart.chart.type = 'pie'; - var slices = []; - var breakdown = []; - var useBreakdown = false; - for(var i = 0; i < chart.series.length; i++) { - var slice = chart.series[i]; - if (slice.data.length === 1) { - slices.unshift({ - name : slice.name, - color : slice.color, - borderColor : slice.color, - legendIndex : slice.legendIndex, - y : slice.data[0] - }); - breakdown.unshift({ - name : slice.name, - color : slice.color, - borderColor : slice.color, - y : slice.data[0] - }); - } - else { - useBreakdown = true; - var sum = 0; - var maxDecimal = 0; - for(var j = 0; j < slice.data.length; j++) { - var parts = slice.data[j].toString().split('.'); - maxDecimal = Math.max(maxDecimal, parts[1] ? parts[1].length : 0); - sum += slice.data[j]; - breakdown.unshift({ - name: slice.name, - color: 'rgba(0,0,0,0)', - borderColor : slice.color, - y: slice.data[j] - }); - } - slices.unshift({ - name : slice.name, - color : slice.color, - borderColor : slice.color, - legendIndex : slice.legendIndex, - y : parseFloat(sum.toFixed(maxDecimal)) - }); - } - } - chart.tooltip = { - formatter: function() { - return this.key + ': ' + this.y; - } - }; - chart.plotOptions = { - pie: { - allowPointSelect: !useBreakdown, - cursor: useBreakdown ? null : 'pointer', - shadow: false, - center: ['50%', '50%'], - dataLabels: { - enabled: false - } - } - }; - chart.series = [{ - name: ' ', - data: slices, - showInLegend: true - }]; - if (useBreakdown) { - chart.series.push({ - name: ' ', - data: breakdown, - innerSize: '90%', - showInLegend: false - }); - } - return chart; - }); - - return mod; -} diff --git a/lib/tasks/server_files/three/build/three.js b/lib/tasks/server_files/three/build/three.js deleted file mode 100644 index 0b303a053..000000000 --- a/lib/tasks/server_files/three/build/three.js +++ /dev/null @@ -1,36280 +0,0 @@ -/** - * @license - * Copyright 2010-2021 Three.js Authors - * SPDX-License-Identifier: MIT - */ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {})); -}(this, (function (exports) { 'use strict'; - - const REVISION = '130'; - const MOUSE = { - LEFT: 0, - MIDDLE: 1, - RIGHT: 2, - ROTATE: 0, - DOLLY: 1, - PAN: 2 - }; - const TOUCH = { - ROTATE: 0, - PAN: 1, - DOLLY_PAN: 2, - DOLLY_ROTATE: 3 - }; - const CullFaceNone = 0; - const CullFaceBack = 1; - const CullFaceFront = 2; - const CullFaceFrontBack = 3; - const BasicShadowMap = 0; - const PCFShadowMap = 1; - const PCFSoftShadowMap = 2; - const VSMShadowMap = 3; - const FrontSide = 0; - const BackSide = 1; - const DoubleSide = 2; - const FlatShading = 1; - const SmoothShading = 2; - const NoBlending = 0; - const NormalBlending = 1; - const AdditiveBlending = 2; - const SubtractiveBlending = 3; - const MultiplyBlending = 4; - const CustomBlending = 5; - const AddEquation = 100; - const SubtractEquation = 101; - const ReverseSubtractEquation = 102; - const MinEquation = 103; - const MaxEquation = 104; - const ZeroFactor = 200; - const OneFactor = 201; - const SrcColorFactor = 202; - const OneMinusSrcColorFactor = 203; - const SrcAlphaFactor = 204; - const OneMinusSrcAlphaFactor = 205; - const DstAlphaFactor = 206; - const OneMinusDstAlphaFactor = 207; - const DstColorFactor = 208; - const OneMinusDstColorFactor = 209; - const SrcAlphaSaturateFactor = 210; - const NeverDepth = 0; - const AlwaysDepth = 1; - const LessDepth = 2; - const LessEqualDepth = 3; - const EqualDepth = 4; - const GreaterEqualDepth = 5; - const GreaterDepth = 6; - const NotEqualDepth = 7; - const MultiplyOperation = 0; - const MixOperation = 1; - const AddOperation = 2; - const NoToneMapping = 0; - const LinearToneMapping = 1; - const ReinhardToneMapping = 2; - const CineonToneMapping = 3; - const ACESFilmicToneMapping = 4; - const CustomToneMapping = 5; - const UVMapping = 300; - const CubeReflectionMapping = 301; - const CubeRefractionMapping = 302; - const EquirectangularReflectionMapping = 303; - const EquirectangularRefractionMapping = 304; - const CubeUVReflectionMapping = 306; - const CubeUVRefractionMapping = 307; - const RepeatWrapping = 1000; - const ClampToEdgeWrapping = 1001; - const MirroredRepeatWrapping = 1002; - const NearestFilter = 1003; - const NearestMipmapNearestFilter = 1004; - const NearestMipMapNearestFilter = 1004; - const NearestMipmapLinearFilter = 1005; - const NearestMipMapLinearFilter = 1005; - const LinearFilter = 1006; - const LinearMipmapNearestFilter = 1007; - const LinearMipMapNearestFilter = 1007; - const LinearMipmapLinearFilter = 1008; - const LinearMipMapLinearFilter = 1008; - const UnsignedByteType = 1009; - const ByteType = 1010; - const ShortType = 1011; - const UnsignedShortType = 1012; - const IntType = 1013; - const UnsignedIntType = 1014; - const FloatType = 1015; - const HalfFloatType = 1016; - const UnsignedShort4444Type = 1017; - const UnsignedShort5551Type = 1018; - const UnsignedShort565Type = 1019; - const UnsignedInt248Type = 1020; - const AlphaFormat = 1021; - const RGBFormat = 1022; - const RGBAFormat = 1023; - const LuminanceFormat = 1024; - const LuminanceAlphaFormat = 1025; - const RGBEFormat = RGBAFormat; - const DepthFormat = 1026; - const DepthStencilFormat = 1027; - const RedFormat = 1028; - const RedIntegerFormat = 1029; - const RGFormat = 1030; - const RGIntegerFormat = 1031; - const RGBIntegerFormat = 1032; - const RGBAIntegerFormat = 1033; - const RGB_S3TC_DXT1_Format = 33776; - const RGBA_S3TC_DXT1_Format = 33777; - const RGBA_S3TC_DXT3_Format = 33778; - const RGBA_S3TC_DXT5_Format = 33779; - const RGB_PVRTC_4BPPV1_Format = 35840; - const RGB_PVRTC_2BPPV1_Format = 35841; - const RGBA_PVRTC_4BPPV1_Format = 35842; - const RGBA_PVRTC_2BPPV1_Format = 35843; - const RGB_ETC1_Format = 36196; - const RGB_ETC2_Format = 37492; - const RGBA_ETC2_EAC_Format = 37496; - const RGBA_ASTC_4x4_Format = 37808; - const RGBA_ASTC_5x4_Format = 37809; - const RGBA_ASTC_5x5_Format = 37810; - const RGBA_ASTC_6x5_Format = 37811; - const RGBA_ASTC_6x6_Format = 37812; - const RGBA_ASTC_8x5_Format = 37813; - const RGBA_ASTC_8x6_Format = 37814; - const RGBA_ASTC_8x8_Format = 37815; - const RGBA_ASTC_10x5_Format = 37816; - const RGBA_ASTC_10x6_Format = 37817; - const RGBA_ASTC_10x8_Format = 37818; - const RGBA_ASTC_10x10_Format = 37819; - const RGBA_ASTC_12x10_Format = 37820; - const RGBA_ASTC_12x12_Format = 37821; - const RGBA_BPTC_Format = 36492; - const SRGB8_ALPHA8_ASTC_4x4_Format = 37840; - const SRGB8_ALPHA8_ASTC_5x4_Format = 37841; - const SRGB8_ALPHA8_ASTC_5x5_Format = 37842; - const SRGB8_ALPHA8_ASTC_6x5_Format = 37843; - const SRGB8_ALPHA8_ASTC_6x6_Format = 37844; - const SRGB8_ALPHA8_ASTC_8x5_Format = 37845; - const SRGB8_ALPHA8_ASTC_8x6_Format = 37846; - const SRGB8_ALPHA8_ASTC_8x8_Format = 37847; - const SRGB8_ALPHA8_ASTC_10x5_Format = 37848; - const SRGB8_ALPHA8_ASTC_10x6_Format = 37849; - const SRGB8_ALPHA8_ASTC_10x8_Format = 37850; - const SRGB8_ALPHA8_ASTC_10x10_Format = 37851; - const SRGB8_ALPHA8_ASTC_12x10_Format = 37852; - const SRGB8_ALPHA8_ASTC_12x12_Format = 37853; - const LoopOnce = 2200; - const LoopRepeat = 2201; - const LoopPingPong = 2202; - const InterpolateDiscrete = 2300; - const InterpolateLinear = 2301; - const InterpolateSmooth = 2302; - const ZeroCurvatureEnding = 2400; - const ZeroSlopeEnding = 2401; - const WrapAroundEnding = 2402; - const NormalAnimationBlendMode = 2500; - const AdditiveAnimationBlendMode = 2501; - const TrianglesDrawMode = 0; - const TriangleStripDrawMode = 1; - const TriangleFanDrawMode = 2; - const LinearEncoding = 3000; - const sRGBEncoding = 3001; - const GammaEncoding = 3007; - const RGBEEncoding = 3002; - const LogLuvEncoding = 3003; - const RGBM7Encoding = 3004; - const RGBM16Encoding = 3005; - const RGBDEncoding = 3006; - const BasicDepthPacking = 3200; - const RGBADepthPacking = 3201; - const TangentSpaceNormalMap = 0; - const ObjectSpaceNormalMap = 1; - const ZeroStencilOp = 0; - const KeepStencilOp = 7680; - const ReplaceStencilOp = 7681; - const IncrementStencilOp = 7682; - const DecrementStencilOp = 7683; - const IncrementWrapStencilOp = 34055; - const DecrementWrapStencilOp = 34056; - const InvertStencilOp = 5386; - const NeverStencilFunc = 512; - const LessStencilFunc = 513; - const EqualStencilFunc = 514; - const LessEqualStencilFunc = 515; - const GreaterStencilFunc = 516; - const NotEqualStencilFunc = 517; - const GreaterEqualStencilFunc = 518; - const AlwaysStencilFunc = 519; - const StaticDrawUsage = 35044; - const DynamicDrawUsage = 35048; - const StreamDrawUsage = 35040; - const StaticReadUsage = 35045; - const DynamicReadUsage = 35049; - const StreamReadUsage = 35041; - const StaticCopyUsage = 35046; - const DynamicCopyUsage = 35050; - const StreamCopyUsage = 35042; - const GLSL1 = '100'; - const GLSL3 = '300 es'; - - /** - * https://github.com/mrdoob/eventdispatcher.js/ - */ - class EventDispatcher { - addEventListener(type, listener) { - if (this._listeners === undefined) this._listeners = {}; - const listeners = this._listeners; - - if (listeners[type] === undefined) { - listeners[type] = []; - } - - if (listeners[type].indexOf(listener) === -1) { - listeners[type].push(listener); - } - } - - hasEventListener(type, listener) { - if (this._listeners === undefined) return false; - const listeners = this._listeners; - return listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1; - } - - removeEventListener(type, listener) { - if (this._listeners === undefined) return; - const listeners = this._listeners; - const listenerArray = listeners[type]; - - if (listenerArray !== undefined) { - const index = listenerArray.indexOf(listener); - - if (index !== -1) { - listenerArray.splice(index, 1); - } - } - } - - dispatchEvent(event) { - if (this._listeners === undefined) return; - const listeners = this._listeners; - const listenerArray = listeners[event.type]; - - if (listenerArray !== undefined) { - event.target = this; // Make a copy, in case listeners are removed while iterating. - - const array = listenerArray.slice(0); - - for (let i = 0, l = array.length; i < l; i++) { - array[i].call(this, event); - } - - event.target = null; - } - } - - } - - const _lut = []; - - for (let i = 0; i < 256; i++) { - _lut[i] = (i < 16 ? '0' : '') + i.toString(16); - } - - let _seed = 1234567; - const DEG2RAD = Math.PI / 180; - const RAD2DEG = 180 / Math.PI; // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 - - function generateUUID() { - const d0 = Math.random() * 0xffffffff | 0; - const d1 = Math.random() * 0xffffffff | 0; - const d2 = Math.random() * 0xffffffff | 0; - const d3 = Math.random() * 0xffffffff | 0; - const uuid = _lut[d0 & 0xff] + _lut[d0 >> 8 & 0xff] + _lut[d0 >> 16 & 0xff] + _lut[d0 >> 24 & 0xff] + '-' + _lut[d1 & 0xff] + _lut[d1 >> 8 & 0xff] + '-' + _lut[d1 >> 16 & 0x0f | 0x40] + _lut[d1 >> 24 & 0xff] + '-' + _lut[d2 & 0x3f | 0x80] + _lut[d2 >> 8 & 0xff] + '-' + _lut[d2 >> 16 & 0xff] + _lut[d2 >> 24 & 0xff] + _lut[d3 & 0xff] + _lut[d3 >> 8 & 0xff] + _lut[d3 >> 16 & 0xff] + _lut[d3 >> 24 & 0xff]; // .toUpperCase() here flattens concatenated strings to save heap memory space. - - return uuid.toUpperCase(); - } - - function clamp(value, min, max) { - return Math.max(min, Math.min(max, value)); - } // compute euclidian modulo of m % n - // https://en.wikipedia.org/wiki/Modulo_operation - - - function euclideanModulo(n, m) { - return (n % m + m) % m; - } // Linear mapping from range to range - - - function mapLinear(x, a1, a2, b1, b2) { - return b1 + (x - a1) * (b2 - b1) / (a2 - a1); - } // https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/ - - - function inverseLerp(x, y, value) { - if (x !== y) { - return (value - x) / (y - x); - } else { - return 0; - } - } // https://en.wikipedia.org/wiki/Linear_interpolation - - - function lerp(x, y, t) { - return (1 - t) * x + t * y; - } // http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/ - - - function damp(x, y, lambda, dt) { - return lerp(x, y, 1 - Math.exp(-lambda * dt)); - } // https://www.desmos.com/calculator/vcsjnyz7x4 - - - function pingpong(x, length = 1) { - return length - Math.abs(euclideanModulo(x, length * 2) - length); - } // http://en.wikipedia.org/wiki/Smoothstep - - - function smoothstep(x, min, max) { - if (x <= min) return 0; - if (x >= max) return 1; - x = (x - min) / (max - min); - return x * x * (3 - 2 * x); - } - - function smootherstep(x, min, max) { - if (x <= min) return 0; - if (x >= max) return 1; - x = (x - min) / (max - min); - return x * x * x * (x * (x * 6 - 15) + 10); - } // Random integer from interval - - - function randInt(low, high) { - return low + Math.floor(Math.random() * (high - low + 1)); - } // Random float from interval - - - function randFloat(low, high) { - return low + Math.random() * (high - low); - } // Random float from <-range/2, range/2> interval - - - function randFloatSpread(range) { - return range * (0.5 - Math.random()); - } // Deterministic pseudo-random float in the interval [ 0, 1 ] - - - function seededRandom(s) { - if (s !== undefined) _seed = s % 2147483647; // Park-Miller algorithm - - _seed = _seed * 16807 % 2147483647; - return (_seed - 1) / 2147483646; - } - - function degToRad(degrees) { - return degrees * DEG2RAD; - } - - function radToDeg(radians) { - return radians * RAD2DEG; - } - - function isPowerOfTwo(value) { - return (value & value - 1) === 0 && value !== 0; - } - - function ceilPowerOfTwo(value) { - return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2)); - } - - function floorPowerOfTwo(value) { - return Math.pow(2, Math.floor(Math.log(value) / Math.LN2)); - } - - function setQuaternionFromProperEuler(q, a, b, c, order) { - // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles - // rotations are applied to the axes in the order specified by 'order' - // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c' - // angles are in radians - const cos = Math.cos; - const sin = Math.sin; - const c2 = cos(b / 2); - const s2 = sin(b / 2); - const c13 = cos((a + c) / 2); - const s13 = sin((a + c) / 2); - const c1_3 = cos((a - c) / 2); - const s1_3 = sin((a - c) / 2); - const c3_1 = cos((c - a) / 2); - const s3_1 = sin((c - a) / 2); - - switch (order) { - case 'XYX': - q.set(c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13); - break; - - case 'YZY': - q.set(s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13); - break; - - case 'ZXZ': - q.set(s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13); - break; - - case 'XZX': - q.set(c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13); - break; - - case 'YXY': - q.set(s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13); - break; - - case 'ZYZ': - q.set(s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13); - break; - - default: - console.warn('THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order); - } - } - - var MathUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - DEG2RAD: DEG2RAD, - RAD2DEG: RAD2DEG, - generateUUID: generateUUID, - clamp: clamp, - euclideanModulo: euclideanModulo, - mapLinear: mapLinear, - inverseLerp: inverseLerp, - lerp: lerp, - damp: damp, - pingpong: pingpong, - smoothstep: smoothstep, - smootherstep: smootherstep, - randInt: randInt, - randFloat: randFloat, - randFloatSpread: randFloatSpread, - seededRandom: seededRandom, - degToRad: degToRad, - radToDeg: radToDeg, - isPowerOfTwo: isPowerOfTwo, - ceilPowerOfTwo: ceilPowerOfTwo, - floorPowerOfTwo: floorPowerOfTwo, - setQuaternionFromProperEuler: setQuaternionFromProperEuler - }); - - class Vector2 { - constructor(x = 0, y = 0) { - this.x = x; - this.y = y; - } - - get width() { - return this.x; - } - - set width(value) { - this.x = value; - } - - get height() { - return this.y; - } - - set height(value) { - this.y = value; - } - - set(x, y) { - this.x = x; - this.y = y; - return this; - } - - setScalar(scalar) { - this.x = scalar; - this.y = scalar; - return this; - } - - setX(x) { - this.x = x; - return this; - } - - setY(y) { - this.y = y; - return this; - } - - setComponent(index, value) { - switch (index) { - case 0: - this.x = value; - break; - - case 1: - this.y = value; - break; - - default: - throw new Error('index is out of range: ' + index); - } - - return this; - } - - getComponent(index) { - switch (index) { - case 0: - return this.x; - - case 1: - return this.y; - - default: - throw new Error('index is out of range: ' + index); - } - } - - clone() { - return new this.constructor(this.x, this.y); - } - - copy(v) { - this.x = v.x; - this.y = v.y; - return this; - } - - add(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'); - return this.addVectors(v, w); - } - - this.x += v.x; - this.y += v.y; - return this; - } - - addScalar(s) { - this.x += s; - this.y += s; - return this; - } - - addVectors(a, b) { - this.x = a.x + b.x; - this.y = a.y + b.y; - return this; - } - - addScaledVector(v, s) { - this.x += v.x * s; - this.y += v.y * s; - return this; - } - - sub(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'); - return this.subVectors(v, w); - } - - this.x -= v.x; - this.y -= v.y; - return this; - } - - subScalar(s) { - this.x -= s; - this.y -= s; - return this; - } - - subVectors(a, b) { - this.x = a.x - b.x; - this.y = a.y - b.y; - return this; - } - - multiply(v) { - this.x *= v.x; - this.y *= v.y; - return this; - } - - multiplyScalar(scalar) { - this.x *= scalar; - this.y *= scalar; - return this; - } - - divide(v) { - this.x /= v.x; - this.y /= v.y; - return this; - } - - divideScalar(scalar) { - return this.multiplyScalar(1 / scalar); - } - - applyMatrix3(m) { - const x = this.x, - y = this.y; - const e = m.elements; - this.x = e[0] * x + e[3] * y + e[6]; - this.y = e[1] * x + e[4] * y + e[7]; - return this; - } - - min(v) { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - return this; - } - - max(v) { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - return this; - } - - clamp(min, max) { - // assumes min < max, componentwise - this.x = Math.max(min.x, Math.min(max.x, this.x)); - this.y = Math.max(min.y, Math.min(max.y, this.y)); - return this; - } - - clampScalar(minVal, maxVal) { - this.x = Math.max(minVal, Math.min(maxVal, this.x)); - this.y = Math.max(minVal, Math.min(maxVal, this.y)); - return this; - } - - clampLength(min, max) { - const length = this.length(); - return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length))); - } - - floor() { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - return this; - } - - ceil() { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - return this; - } - - round() { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - return this; - } - - roundToZero() { - this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x); - this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y); - return this; - } - - negate() { - this.x = -this.x; - this.y = -this.y; - return this; - } - - dot(v) { - return this.x * v.x + this.y * v.y; - } - - cross(v) { - return this.x * v.y - this.y * v.x; - } - - lengthSq() { - return this.x * this.x + this.y * this.y; - } - - length() { - return Math.sqrt(this.x * this.x + this.y * this.y); - } - - manhattanLength() { - return Math.abs(this.x) + Math.abs(this.y); - } - - normalize() { - return this.divideScalar(this.length() || 1); - } - - angle() { - // computes the angle in radians with respect to the positive x-axis - const angle = Math.atan2(-this.y, -this.x) + Math.PI; - return angle; - } - - distanceTo(v) { - return Math.sqrt(this.distanceToSquared(v)); - } - - distanceToSquared(v) { - const dx = this.x - v.x, - dy = this.y - v.y; - return dx * dx + dy * dy; - } - - manhattanDistanceTo(v) { - return Math.abs(this.x - v.x) + Math.abs(this.y - v.y); - } - - setLength(length) { - return this.normalize().multiplyScalar(length); - } - - lerp(v, alpha) { - this.x += (v.x - this.x) * alpha; - this.y += (v.y - this.y) * alpha; - return this; - } - - lerpVectors(v1, v2, alpha) { - this.x = v1.x + (v2.x - v1.x) * alpha; - this.y = v1.y + (v2.y - v1.y) * alpha; - return this; - } - - equals(v) { - return v.x === this.x && v.y === this.y; - } - - fromArray(array, offset = 0) { - this.x = array[offset]; - this.y = array[offset + 1]; - return this; - } - - toArray(array = [], offset = 0) { - array[offset] = this.x; - array[offset + 1] = this.y; - return array; - } - - fromBufferAttribute(attribute, index, offset) { - if (offset !== undefined) { - console.warn('THREE.Vector2: offset has been removed from .fromBufferAttribute().'); - } - - this.x = attribute.getX(index); - this.y = attribute.getY(index); - return this; - } - - rotateAround(center, angle) { - const c = Math.cos(angle), - s = Math.sin(angle); - const x = this.x - center.x; - const y = this.y - center.y; - this.x = x * c - y * s + center.x; - this.y = x * s + y * c + center.y; - return this; - } - - random() { - this.x = Math.random(); - this.y = Math.random(); - return this; - } - - } - - Vector2.prototype.isVector2 = true; - - class Matrix3 { - constructor() { - this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1]; - - if (arguments.length > 0) { - console.error('THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.'); - } - } - - set(n11, n12, n13, n21, n22, n23, n31, n32, n33) { - const te = this.elements; - te[0] = n11; - te[1] = n21; - te[2] = n31; - te[3] = n12; - te[4] = n22; - te[5] = n32; - te[6] = n13; - te[7] = n23; - te[8] = n33; - return this; - } - - identity() { - this.set(1, 0, 0, 0, 1, 0, 0, 0, 1); - return this; - } - - copy(m) { - const te = this.elements; - const me = m.elements; - te[0] = me[0]; - te[1] = me[1]; - te[2] = me[2]; - te[3] = me[3]; - te[4] = me[4]; - te[5] = me[5]; - te[6] = me[6]; - te[7] = me[7]; - te[8] = me[8]; - return this; - } - - extractBasis(xAxis, yAxis, zAxis) { - xAxis.setFromMatrix3Column(this, 0); - yAxis.setFromMatrix3Column(this, 1); - zAxis.setFromMatrix3Column(this, 2); - return this; - } - - setFromMatrix4(m) { - const me = m.elements; - this.set(me[0], me[4], me[8], me[1], me[5], me[9], me[2], me[6], me[10]); - return this; - } - - multiply(m) { - return this.multiplyMatrices(this, m); - } - - premultiply(m) { - return this.multiplyMatrices(m, this); - } - - multiplyMatrices(a, b) { - const ae = a.elements; - const be = b.elements; - const te = this.elements; - const a11 = ae[0], - a12 = ae[3], - a13 = ae[6]; - const a21 = ae[1], - a22 = ae[4], - a23 = ae[7]; - const a31 = ae[2], - a32 = ae[5], - a33 = ae[8]; - const b11 = be[0], - b12 = be[3], - b13 = be[6]; - const b21 = be[1], - b22 = be[4], - b23 = be[7]; - const b31 = be[2], - b32 = be[5], - b33 = be[8]; - te[0] = a11 * b11 + a12 * b21 + a13 * b31; - te[3] = a11 * b12 + a12 * b22 + a13 * b32; - te[6] = a11 * b13 + a12 * b23 + a13 * b33; - te[1] = a21 * b11 + a22 * b21 + a23 * b31; - te[4] = a21 * b12 + a22 * b22 + a23 * b32; - te[7] = a21 * b13 + a22 * b23 + a23 * b33; - te[2] = a31 * b11 + a32 * b21 + a33 * b31; - te[5] = a31 * b12 + a32 * b22 + a33 * b32; - te[8] = a31 * b13 + a32 * b23 + a33 * b33; - return this; - } - - multiplyScalar(s) { - const te = this.elements; - te[0] *= s; - te[3] *= s; - te[6] *= s; - te[1] *= s; - te[4] *= s; - te[7] *= s; - te[2] *= s; - te[5] *= s; - te[8] *= s; - return this; - } - - determinant() { - const te = this.elements; - const a = te[0], - b = te[1], - c = te[2], - d = te[3], - e = te[4], - f = te[5], - g = te[6], - h = te[7], - i = te[8]; - return a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g; - } - - invert() { - const te = this.elements, - n11 = te[0], - n21 = te[1], - n31 = te[2], - n12 = te[3], - n22 = te[4], - n32 = te[5], - n13 = te[6], - n23 = te[7], - n33 = te[8], - t11 = n33 * n22 - n32 * n23, - t12 = n32 * n13 - n33 * n12, - t13 = n23 * n12 - n22 * n13, - det = n11 * t11 + n21 * t12 + n31 * t13; - if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0); - const detInv = 1 / det; - te[0] = t11 * detInv; - te[1] = (n31 * n23 - n33 * n21) * detInv; - te[2] = (n32 * n21 - n31 * n22) * detInv; - te[3] = t12 * detInv; - te[4] = (n33 * n11 - n31 * n13) * detInv; - te[5] = (n31 * n12 - n32 * n11) * detInv; - te[6] = t13 * detInv; - te[7] = (n21 * n13 - n23 * n11) * detInv; - te[8] = (n22 * n11 - n21 * n12) * detInv; - return this; - } - - transpose() { - let tmp; - const m = this.elements; - tmp = m[1]; - m[1] = m[3]; - m[3] = tmp; - tmp = m[2]; - m[2] = m[6]; - m[6] = tmp; - tmp = m[5]; - m[5] = m[7]; - m[7] = tmp; - return this; - } - - getNormalMatrix(matrix4) { - return this.setFromMatrix4(matrix4).invert().transpose(); - } - - transposeIntoArray(r) { - const m = this.elements; - r[0] = m[0]; - r[1] = m[3]; - r[2] = m[6]; - r[3] = m[1]; - r[4] = m[4]; - r[5] = m[7]; - r[6] = m[2]; - r[7] = m[5]; - r[8] = m[8]; - return this; - } - - setUvTransform(tx, ty, sx, sy, rotation, cx, cy) { - const c = Math.cos(rotation); - const s = Math.sin(rotation); - this.set(sx * c, sx * s, -sx * (c * cx + s * cy) + cx + tx, -sy * s, sy * c, -sy * (-s * cx + c * cy) + cy + ty, 0, 0, 1); - return this; - } - - scale(sx, sy) { - const te = this.elements; - te[0] *= sx; - te[3] *= sx; - te[6] *= sx; - te[1] *= sy; - te[4] *= sy; - te[7] *= sy; - return this; - } - - rotate(theta) { - const c = Math.cos(theta); - const s = Math.sin(theta); - const te = this.elements; - const a11 = te[0], - a12 = te[3], - a13 = te[6]; - const a21 = te[1], - a22 = te[4], - a23 = te[7]; - te[0] = c * a11 + s * a21; - te[3] = c * a12 + s * a22; - te[6] = c * a13 + s * a23; - te[1] = -s * a11 + c * a21; - te[4] = -s * a12 + c * a22; - te[7] = -s * a13 + c * a23; - return this; - } - - translate(tx, ty) { - const te = this.elements; - te[0] += tx * te[2]; - te[3] += tx * te[5]; - te[6] += tx * te[8]; - te[1] += ty * te[2]; - te[4] += ty * te[5]; - te[7] += ty * te[8]; - return this; - } - - equals(matrix) { - const te = this.elements; - const me = matrix.elements; - - for (let i = 0; i < 9; i++) { - if (te[i] !== me[i]) return false; - } - - return true; - } - - fromArray(array, offset = 0) { - for (let i = 0; i < 9; i++) { - this.elements[i] = array[i + offset]; - } - - return this; - } - - toArray(array = [], offset = 0) { - const te = this.elements; - array[offset] = te[0]; - array[offset + 1] = te[1]; - array[offset + 2] = te[2]; - array[offset + 3] = te[3]; - array[offset + 4] = te[4]; - array[offset + 5] = te[5]; - array[offset + 6] = te[6]; - array[offset + 7] = te[7]; - array[offset + 8] = te[8]; - return array; - } - - clone() { - return new this.constructor().fromArray(this.elements); - } - - } - - Matrix3.prototype.isMatrix3 = true; - - let _canvas; - - class ImageUtils { - static getDataURL(image) { - if (/^data:/i.test(image.src)) { - return image.src; - } - - if (typeof HTMLCanvasElement == 'undefined') { - return image.src; - } - - let canvas; - - if (image instanceof HTMLCanvasElement) { - canvas = image; - } else { - if (_canvas === undefined) _canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); - _canvas.width = image.width; - _canvas.height = image.height; - - const context = _canvas.getContext('2d'); - - if (image instanceof ImageData) { - context.putImageData(image, 0, 0); - } else { - context.drawImage(image, 0, 0, image.width, image.height); - } - - canvas = _canvas; - } - - if (canvas.width > 2048 || canvas.height > 2048) { - console.warn('THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image); - return canvas.toDataURL('image/jpeg', 0.6); - } else { - return canvas.toDataURL('image/png'); - } - } - - } - - let textureId = 0; - - class Texture extends EventDispatcher { - constructor(image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1, encoding = LinearEncoding) { - super(); - Object.defineProperty(this, 'id', { - value: textureId++ - }); - this.uuid = generateUUID(); - this.name = ''; - this.image = image; - this.mipmaps = []; - this.mapping = mapping; - this.wrapS = wrapS; - this.wrapT = wrapT; - this.magFilter = magFilter; - this.minFilter = minFilter; - this.anisotropy = anisotropy; - this.format = format; - this.internalFormat = null; - this.type = type; - this.offset = new Vector2(0, 0); - this.repeat = new Vector2(1, 1); - this.center = new Vector2(0, 0); - this.rotation = 0; - this.matrixAutoUpdate = true; - this.matrix = new Matrix3(); - this.generateMipmaps = true; - this.premultiplyAlpha = false; - this.flipY = true; - this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml) - // Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap. - // - // Also changing the encoding after already used by a Material will not automatically make the Material - // update. You need to explicitly call Material.needsUpdate to trigger it to recompile. - - this.encoding = encoding; - this.version = 0; - this.onUpdate = null; - } - - updateMatrix() { - this.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y); - } - - clone() { - return new this.constructor().copy(this); - } - - copy(source) { - this.name = source.name; - this.image = source.image; - this.mipmaps = source.mipmaps.slice(0); - this.mapping = source.mapping; - this.wrapS = source.wrapS; - this.wrapT = source.wrapT; - this.magFilter = source.magFilter; - this.minFilter = source.minFilter; - this.anisotropy = source.anisotropy; - this.format = source.format; - this.internalFormat = source.internalFormat; - this.type = source.type; - this.offset.copy(source.offset); - this.repeat.copy(source.repeat); - this.center.copy(source.center); - this.rotation = source.rotation; - this.matrixAutoUpdate = source.matrixAutoUpdate; - this.matrix.copy(source.matrix); - this.generateMipmaps = source.generateMipmaps; - this.premultiplyAlpha = source.premultiplyAlpha; - this.flipY = source.flipY; - this.unpackAlignment = source.unpackAlignment; - this.encoding = source.encoding; - return this; - } - - toJSON(meta) { - const isRootObject = meta === undefined || typeof meta === 'string'; - - if (!isRootObject && meta.textures[this.uuid] !== undefined) { - return meta.textures[this.uuid]; - } - - const output = { - metadata: { - version: 4.5, - type: 'Texture', - generator: 'Texture.toJSON' - }, - uuid: this.uuid, - name: this.name, - mapping: this.mapping, - repeat: [this.repeat.x, this.repeat.y], - offset: [this.offset.x, this.offset.y], - center: [this.center.x, this.center.y], - rotation: this.rotation, - wrap: [this.wrapS, this.wrapT], - format: this.format, - type: this.type, - encoding: this.encoding, - minFilter: this.minFilter, - magFilter: this.magFilter, - anisotropy: this.anisotropy, - flipY: this.flipY, - premultiplyAlpha: this.premultiplyAlpha, - unpackAlignment: this.unpackAlignment - }; - - if (this.image !== undefined) { - // TODO: Move to THREE.Image - const image = this.image; - - if (image.uuid === undefined) { - image.uuid = generateUUID(); // UGH - } - - if (!isRootObject && meta.images[image.uuid] === undefined) { - let url; - - if (Array.isArray(image)) { - // process array of images e.g. CubeTexture - url = []; - - for (let i = 0, l = image.length; i < l; i++) { - // check cube texture with data textures - if (image[i].isDataTexture) { - url.push(serializeImage(image[i].image)); - } else { - url.push(serializeImage(image[i])); - } - } - } else { - // process single image - url = serializeImage(image); - } - - meta.images[image.uuid] = { - uuid: image.uuid, - url: url - }; - } - - output.image = image.uuid; - } - - if (!isRootObject) { - meta.textures[this.uuid] = output; - } - - return output; - } - - dispose() { - this.dispatchEvent({ - type: 'dispose' - }); - } - - transformUv(uv) { - if (this.mapping !== UVMapping) return uv; - uv.applyMatrix3(this.matrix); - - if (uv.x < 0 || uv.x > 1) { - switch (this.wrapS) { - case RepeatWrapping: - uv.x = uv.x - Math.floor(uv.x); - break; - - case ClampToEdgeWrapping: - uv.x = uv.x < 0 ? 0 : 1; - break; - - case MirroredRepeatWrapping: - if (Math.abs(Math.floor(uv.x) % 2) === 1) { - uv.x = Math.ceil(uv.x) - uv.x; - } else { - uv.x = uv.x - Math.floor(uv.x); - } - - break; - } - } - - if (uv.y < 0 || uv.y > 1) { - switch (this.wrapT) { - case RepeatWrapping: - uv.y = uv.y - Math.floor(uv.y); - break; - - case ClampToEdgeWrapping: - uv.y = uv.y < 0 ? 0 : 1; - break; - - case MirroredRepeatWrapping: - if (Math.abs(Math.floor(uv.y) % 2) === 1) { - uv.y = Math.ceil(uv.y) - uv.y; - } else { - uv.y = uv.y - Math.floor(uv.y); - } - - break; - } - } - - if (this.flipY) { - uv.y = 1 - uv.y; - } - - return uv; - } - - set needsUpdate(value) { - if (value === true) this.version++; - } - - } - - Texture.DEFAULT_IMAGE = undefined; - Texture.DEFAULT_MAPPING = UVMapping; - Texture.prototype.isTexture = true; - - function serializeImage(image) { - if (typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement || typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap) { - // default images - return ImageUtils.getDataURL(image); - } else { - if (image.data) { - // images of DataTexture - return { - data: Array.prototype.slice.call(image.data), - width: image.width, - height: image.height, - type: image.data.constructor.name - }; - } else { - console.warn('THREE.Texture: Unable to serialize Texture.'); - return {}; - } - } - } - - class Vector4 { - constructor(x = 0, y = 0, z = 0, w = 1) { - this.x = x; - this.y = y; - this.z = z; - this.w = w; - } - - get width() { - return this.z; - } - - set width(value) { - this.z = value; - } - - get height() { - return this.w; - } - - set height(value) { - this.w = value; - } - - set(x, y, z, w) { - this.x = x; - this.y = y; - this.z = z; - this.w = w; - return this; - } - - setScalar(scalar) { - this.x = scalar; - this.y = scalar; - this.z = scalar; - this.w = scalar; - return this; - } - - setX(x) { - this.x = x; - return this; - } - - setY(y) { - this.y = y; - return this; - } - - setZ(z) { - this.z = z; - return this; - } - - setW(w) { - this.w = w; - return this; - } - - setComponent(index, value) { - switch (index) { - case 0: - this.x = value; - break; - - case 1: - this.y = value; - break; - - case 2: - this.z = value; - break; - - case 3: - this.w = value; - break; - - default: - throw new Error('index is out of range: ' + index); - } - - return this; - } - - getComponent(index) { - switch (index) { - case 0: - return this.x; - - case 1: - return this.y; - - case 2: - return this.z; - - case 3: - return this.w; - - default: - throw new Error('index is out of range: ' + index); - } - } - - clone() { - return new this.constructor(this.x, this.y, this.z, this.w); - } - - copy(v) { - this.x = v.x; - this.y = v.y; - this.z = v.z; - this.w = v.w !== undefined ? v.w : 1; - return this; - } - - add(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'); - return this.addVectors(v, w); - } - - this.x += v.x; - this.y += v.y; - this.z += v.z; - this.w += v.w; - return this; - } - - addScalar(s) { - this.x += s; - this.y += s; - this.z += s; - this.w += s; - return this; - } - - addVectors(a, b) { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - this.w = a.w + b.w; - return this; - } - - addScaledVector(v, s) { - this.x += v.x * s; - this.y += v.y * s; - this.z += v.z * s; - this.w += v.w * s; - return this; - } - - sub(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'); - return this.subVectors(v, w); - } - - this.x -= v.x; - this.y -= v.y; - this.z -= v.z; - this.w -= v.w; - return this; - } - - subScalar(s) { - this.x -= s; - this.y -= s; - this.z -= s; - this.w -= s; - return this; - } - - subVectors(a, b) { - this.x = a.x - b.x; - this.y = a.y - b.y; - this.z = a.z - b.z; - this.w = a.w - b.w; - return this; - } - - multiply(v) { - this.x *= v.x; - this.y *= v.y; - this.z *= v.z; - this.w *= v.w; - return this; - } - - multiplyScalar(scalar) { - this.x *= scalar; - this.y *= scalar; - this.z *= scalar; - this.w *= scalar; - return this; - } - - applyMatrix4(m) { - const x = this.x, - y = this.y, - z = this.z, - w = this.w; - const e = m.elements; - this.x = e[0] * x + e[4] * y + e[8] * z + e[12] * w; - this.y = e[1] * x + e[5] * y + e[9] * z + e[13] * w; - this.z = e[2] * x + e[6] * y + e[10] * z + e[14] * w; - this.w = e[3] * x + e[7] * y + e[11] * z + e[15] * w; - return this; - } - - divideScalar(scalar) { - return this.multiplyScalar(1 / scalar); - } - - setAxisAngleFromQuaternion(q) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm - // q is assumed to be normalized - this.w = 2 * Math.acos(q.w); - const s = Math.sqrt(1 - q.w * q.w); - - if (s < 0.0001) { - this.x = 1; - this.y = 0; - this.z = 0; - } else { - this.x = q.x / s; - this.y = q.y / s; - this.z = q.z / s; - } - - return this; - } - - setAxisAngleFromRotationMatrix(m) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - let angle, x, y, z; // variables for result - - const epsilon = 0.01, - // margin to allow for rounding errors - epsilon2 = 0.1, - // margin to distinguish between 0 and 180 degrees - te = m.elements, - m11 = te[0], - m12 = te[4], - m13 = te[8], - m21 = te[1], - m22 = te[5], - m23 = te[9], - m31 = te[2], - m32 = te[6], - m33 = te[10]; - - if (Math.abs(m12 - m21) < epsilon && Math.abs(m13 - m31) < epsilon && Math.abs(m23 - m32) < epsilon) { - // singularity found - // first check for identity matrix which must have +1 for all terms - // in leading diagonal and zero in other terms - if (Math.abs(m12 + m21) < epsilon2 && Math.abs(m13 + m31) < epsilon2 && Math.abs(m23 + m32) < epsilon2 && Math.abs(m11 + m22 + m33 - 3) < epsilon2) { - // this singularity is identity matrix so angle = 0 - this.set(1, 0, 0, 0); - return this; // zero angle, arbitrary axis - } // otherwise this singularity is angle = 180 - - - angle = Math.PI; - const xx = (m11 + 1) / 2; - const yy = (m22 + 1) / 2; - const zz = (m33 + 1) / 2; - const xy = (m12 + m21) / 4; - const xz = (m13 + m31) / 4; - const yz = (m23 + m32) / 4; - - if (xx > yy && xx > zz) { - // m11 is the largest diagonal term - if (xx < epsilon) { - x = 0; - y = 0.707106781; - z = 0.707106781; - } else { - x = Math.sqrt(xx); - y = xy / x; - z = xz / x; - } - } else if (yy > zz) { - // m22 is the largest diagonal term - if (yy < epsilon) { - x = 0.707106781; - y = 0; - z = 0.707106781; - } else { - y = Math.sqrt(yy); - x = xy / y; - z = yz / y; - } - } else { - // m33 is the largest diagonal term so base result on this - if (zz < epsilon) { - x = 0.707106781; - y = 0.707106781; - z = 0; - } else { - z = Math.sqrt(zz); - x = xz / z; - y = yz / z; - } - } - - this.set(x, y, z, angle); - return this; // return 180 deg rotation - } // as we have reached here there are no singularities so we can handle normally - - - let s = Math.sqrt((m32 - m23) * (m32 - m23) + (m13 - m31) * (m13 - m31) + (m21 - m12) * (m21 - m12)); // used to normalize - - if (Math.abs(s) < 0.001) s = 1; // prevent divide by zero, should not happen if matrix is orthogonal and should be - // caught by singularity test above, but I've left it in just in case - - this.x = (m32 - m23) / s; - this.y = (m13 - m31) / s; - this.z = (m21 - m12) / s; - this.w = Math.acos((m11 + m22 + m33 - 1) / 2); - return this; - } - - min(v) { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - this.w = Math.min(this.w, v.w); - return this; - } - - max(v) { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - this.w = Math.max(this.w, v.w); - return this; - } - - clamp(min, max) { - // assumes min < max, componentwise - this.x = Math.max(min.x, Math.min(max.x, this.x)); - this.y = Math.max(min.y, Math.min(max.y, this.y)); - this.z = Math.max(min.z, Math.min(max.z, this.z)); - this.w = Math.max(min.w, Math.min(max.w, this.w)); - return this; - } - - clampScalar(minVal, maxVal) { - this.x = Math.max(minVal, Math.min(maxVal, this.x)); - this.y = Math.max(minVal, Math.min(maxVal, this.y)); - this.z = Math.max(minVal, Math.min(maxVal, this.z)); - this.w = Math.max(minVal, Math.min(maxVal, this.w)); - return this; - } - - clampLength(min, max) { - const length = this.length(); - return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length))); - } - - floor() { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - this.z = Math.floor(this.z); - this.w = Math.floor(this.w); - return this; - } - - ceil() { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - this.z = Math.ceil(this.z); - this.w = Math.ceil(this.w); - return this; - } - - round() { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - this.z = Math.round(this.z); - this.w = Math.round(this.w); - return this; - } - - roundToZero() { - this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x); - this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y); - this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z); - this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w); - return this; - } - - negate() { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - this.w = -this.w; - return this; - } - - dot(v) { - return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; - } - - lengthSq() { - return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; - } - - length() { - return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); - } - - manhattanLength() { - return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w); - } - - normalize() { - return this.divideScalar(this.length() || 1); - } - - setLength(length) { - return this.normalize().multiplyScalar(length); - } - - lerp(v, alpha) { - this.x += (v.x - this.x) * alpha; - this.y += (v.y - this.y) * alpha; - this.z += (v.z - this.z) * alpha; - this.w += (v.w - this.w) * alpha; - return this; - } - - lerpVectors(v1, v2, alpha) { - this.x = v1.x + (v2.x - v1.x) * alpha; - this.y = v1.y + (v2.y - v1.y) * alpha; - this.z = v1.z + (v2.z - v1.z) * alpha; - this.w = v1.w + (v2.w - v1.w) * alpha; - return this; - } - - equals(v) { - return v.x === this.x && v.y === this.y && v.z === this.z && v.w === this.w; - } - - fromArray(array, offset = 0) { - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - this.w = array[offset + 3]; - return this; - } - - toArray(array = [], offset = 0) { - array[offset] = this.x; - array[offset + 1] = this.y; - array[offset + 2] = this.z; - array[offset + 3] = this.w; - return array; - } - - fromBufferAttribute(attribute, index, offset) { - if (offset !== undefined) { - console.warn('THREE.Vector4: offset has been removed from .fromBufferAttribute().'); - } - - this.x = attribute.getX(index); - this.y = attribute.getY(index); - this.z = attribute.getZ(index); - this.w = attribute.getW(index); - return this; - } - - random() { - this.x = Math.random(); - this.y = Math.random(); - this.z = Math.random(); - this.w = Math.random(); - return this; - } - - } - - Vector4.prototype.isVector4 = true; - - /* - In options, we can specify: - * Texture parameters for an auto-generated target texture - * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers - */ - - class WebGLRenderTarget extends EventDispatcher { - constructor(width, height, options = {}) { - super(); - this.width = width; - this.height = height; - this.depth = 1; - this.scissor = new Vector4(0, 0, width, height); - this.scissorTest = false; - this.viewport = new Vector4(0, 0, width, height); - this.texture = new Texture(undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding); - this.texture.image = { - width: width, - height: height, - depth: 1 - }; - this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false; - this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter; - this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true; - this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false; - this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null; - } - - setTexture(texture) { - texture.image = { - width: this.width, - height: this.height, - depth: this.depth - }; - this.texture = texture; - } - - setSize(width, height, depth = 1) { - if (this.width !== width || this.height !== height || this.depth !== depth) { - this.width = width; - this.height = height; - this.depth = depth; - this.texture.image.width = width; - this.texture.image.height = height; - this.texture.image.depth = depth; - this.dispose(); - } - - this.viewport.set(0, 0, width, height); - this.scissor.set(0, 0, width, height); - } - - clone() { - return new this.constructor().copy(this); - } - - copy(source) { - this.width = source.width; - this.height = source.height; - this.depth = source.depth; - this.viewport.copy(source.viewport); - this.texture = source.texture.clone(); - this.texture.image = { ...this.texture.image - }; // See #20328. - - this.depthBuffer = source.depthBuffer; - this.stencilBuffer = source.stencilBuffer; - this.depthTexture = source.depthTexture; - return this; - } - - dispose() { - this.dispatchEvent({ - type: 'dispose' - }); - } - - } - - WebGLRenderTarget.prototype.isWebGLRenderTarget = true; - - class WebGLMultipleRenderTargets extends WebGLRenderTarget { - constructor(width, height, count) { - super(width, height); - const texture = this.texture; - this.texture = []; - - for (let i = 0; i < count; i++) { - this.texture[i] = texture.clone(); - } - } - - setSize(width, height, depth = 1) { - if (this.width !== width || this.height !== height || this.depth !== depth) { - this.width = width; - this.height = height; - this.depth = depth; - - for (let i = 0, il = this.texture.length; i < il; i++) { - this.texture[i].image.width = width; - this.texture[i].image.height = height; - this.texture[i].image.depth = depth; - } - - this.dispose(); - } - - this.viewport.set(0, 0, width, height); - this.scissor.set(0, 0, width, height); - return this; - } - - copy(source) { - this.dispose(); - this.width = source.width; - this.height = source.height; - this.depth = source.depth; - this.viewport.set(0, 0, this.width, this.height); - this.scissor.set(0, 0, this.width, this.height); - this.depthBuffer = source.depthBuffer; - this.stencilBuffer = source.stencilBuffer; - this.depthTexture = source.depthTexture; - this.texture.length = 0; - - for (let i = 0, il = source.texture.length; i < il; i++) { - this.texture[i] = source.texture[i].clone(); - } - - return this; - } - - } - - WebGLMultipleRenderTargets.prototype.isWebGLMultipleRenderTargets = true; - - class WebGLMultisampleRenderTarget extends WebGLRenderTarget { - constructor(width, height, options) { - super(width, height, options); - this.samples = 4; - } - - copy(source) { - super.copy.call(this, source); - this.samples = source.samples; - return this; - } - - } - - WebGLMultisampleRenderTarget.prototype.isWebGLMultisampleRenderTarget = true; - - class Quaternion { - constructor(x = 0, y = 0, z = 0, w = 1) { - this._x = x; - this._y = y; - this._z = z; - this._w = w; - } - - static slerp(qa, qb, qm, t) { - console.warn('THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead.'); - return qm.slerpQuaternions(qa, qb, t); - } - - static slerpFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) { - // fuzz-free, array-based Quaternion SLERP operation - let x0 = src0[srcOffset0 + 0], - y0 = src0[srcOffset0 + 1], - z0 = src0[srcOffset0 + 2], - w0 = src0[srcOffset0 + 3]; - const x1 = src1[srcOffset1 + 0], - y1 = src1[srcOffset1 + 1], - z1 = src1[srcOffset1 + 2], - w1 = src1[srcOffset1 + 3]; - - if (t === 0) { - dst[dstOffset + 0] = x0; - dst[dstOffset + 1] = y0; - dst[dstOffset + 2] = z0; - dst[dstOffset + 3] = w0; - return; - } - - if (t === 1) { - dst[dstOffset + 0] = x1; - dst[dstOffset + 1] = y1; - dst[dstOffset + 2] = z1; - dst[dstOffset + 3] = w1; - return; - } - - if (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) { - let s = 1 - t; - const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1, - dir = cos >= 0 ? 1 : -1, - sqrSin = 1 - cos * cos; // Skip the Slerp for tiny steps to avoid numeric problems: - - if (sqrSin > Number.EPSILON) { - const sin = Math.sqrt(sqrSin), - len = Math.atan2(sin, cos * dir); - s = Math.sin(s * len) / sin; - t = Math.sin(t * len) / sin; - } - - const tDir = t * dir; - x0 = x0 * s + x1 * tDir; - y0 = y0 * s + y1 * tDir; - z0 = z0 * s + z1 * tDir; - w0 = w0 * s + w1 * tDir; // Normalize in case we just did a lerp: - - if (s === 1 - t) { - const f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0); - x0 *= f; - y0 *= f; - z0 *= f; - w0 *= f; - } - } - - dst[dstOffset] = x0; - dst[dstOffset + 1] = y0; - dst[dstOffset + 2] = z0; - dst[dstOffset + 3] = w0; - } - - static multiplyQuaternionsFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1) { - const x0 = src0[srcOffset0]; - const y0 = src0[srcOffset0 + 1]; - const z0 = src0[srcOffset0 + 2]; - const w0 = src0[srcOffset0 + 3]; - const x1 = src1[srcOffset1]; - const y1 = src1[srcOffset1 + 1]; - const z1 = src1[srcOffset1 + 2]; - const w1 = src1[srcOffset1 + 3]; - dst[dstOffset] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1; - dst[dstOffset + 1] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1; - dst[dstOffset + 2] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1; - dst[dstOffset + 3] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1; - return dst; - } - - get x() { - return this._x; - } - - set x(value) { - this._x = value; - - this._onChangeCallback(); - } - - get y() { - return this._y; - } - - set y(value) { - this._y = value; - - this._onChangeCallback(); - } - - get z() { - return this._z; - } - - set z(value) { - this._z = value; - - this._onChangeCallback(); - } - - get w() { - return this._w; - } - - set w(value) { - this._w = value; - - this._onChangeCallback(); - } - - set(x, y, z, w) { - this._x = x; - this._y = y; - this._z = z; - this._w = w; - - this._onChangeCallback(); - - return this; - } - - clone() { - return new this.constructor(this._x, this._y, this._z, this._w); - } - - copy(quaternion) { - this._x = quaternion.x; - this._y = quaternion.y; - this._z = quaternion.z; - this._w = quaternion.w; - - this._onChangeCallback(); - - return this; - } - - setFromEuler(euler, update) { - if (!(euler && euler.isEuler)) { - throw new Error('THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.'); - } - - const x = euler._x, - y = euler._y, - z = euler._z, - order = euler._order; // http://www.mathworks.com/matlabcentral/fileexchange/ - // 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/ - // content/SpinCalc.m - - const cos = Math.cos; - const sin = Math.sin; - const c1 = cos(x / 2); - const c2 = cos(y / 2); - const c3 = cos(z / 2); - const s1 = sin(x / 2); - const s2 = sin(y / 2); - const s3 = sin(z / 2); - - switch (order) { - case 'XYZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'YXZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'ZXY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'ZYX': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'YZX': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'XZY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - default: - console.warn('THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order); - } - - if (update !== false) this._onChangeCallback(); - return this; - } - - setFromAxisAngle(axis, angle) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm - // assumes axis is normalized - const halfAngle = angle / 2, - s = Math.sin(halfAngle); - this._x = axis.x * s; - this._y = axis.y * s; - this._z = axis.z * s; - this._w = Math.cos(halfAngle); - - this._onChangeCallback(); - - return this; - } - - setFromRotationMatrix(m) { - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - const te = m.elements, - m11 = te[0], - m12 = te[4], - m13 = te[8], - m21 = te[1], - m22 = te[5], - m23 = te[9], - m31 = te[2], - m32 = te[6], - m33 = te[10], - trace = m11 + m22 + m33; - - if (trace > 0) { - const s = 0.5 / Math.sqrt(trace + 1.0); - this._w = 0.25 / s; - this._x = (m32 - m23) * s; - this._y = (m13 - m31) * s; - this._z = (m21 - m12) * s; - } else if (m11 > m22 && m11 > m33) { - const s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33); - this._w = (m32 - m23) / s; - this._x = 0.25 * s; - this._y = (m12 + m21) / s; - this._z = (m13 + m31) / s; - } else if (m22 > m33) { - const s = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33); - this._w = (m13 - m31) / s; - this._x = (m12 + m21) / s; - this._y = 0.25 * s; - this._z = (m23 + m32) / s; - } else { - const s = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22); - this._w = (m21 - m12) / s; - this._x = (m13 + m31) / s; - this._y = (m23 + m32) / s; - this._z = 0.25 * s; - } - - this._onChangeCallback(); - - return this; - } - - setFromUnitVectors(vFrom, vTo) { - // assumes direction vectors vFrom and vTo are normalized - let r = vFrom.dot(vTo) + 1; - - if (r < Number.EPSILON) { - // vFrom and vTo point in opposite directions - r = 0; - - if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) { - this._x = -vFrom.y; - this._y = vFrom.x; - this._z = 0; - this._w = r; - } else { - this._x = 0; - this._y = -vFrom.z; - this._z = vFrom.y; - this._w = r; - } - } else { - // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3 - this._x = vFrom.y * vTo.z - vFrom.z * vTo.y; - this._y = vFrom.z * vTo.x - vFrom.x * vTo.z; - this._z = vFrom.x * vTo.y - vFrom.y * vTo.x; - this._w = r; - } - - return this.normalize(); - } - - angleTo(q) { - return 2 * Math.acos(Math.abs(clamp(this.dot(q), -1, 1))); - } - - rotateTowards(q, step) { - const angle = this.angleTo(q); - if (angle === 0) return this; - const t = Math.min(1, step / angle); - this.slerp(q, t); - return this; - } - - identity() { - return this.set(0, 0, 0, 1); - } - - invert() { - // quaternion is assumed to have unit length - return this.conjugate(); - } - - conjugate() { - this._x *= -1; - this._y *= -1; - this._z *= -1; - - this._onChangeCallback(); - - return this; - } - - dot(v) { - return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w; - } - - lengthSq() { - return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; - } - - length() { - return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w); - } - - normalize() { - let l = this.length(); - - if (l === 0) { - this._x = 0; - this._y = 0; - this._z = 0; - this._w = 1; - } else { - l = 1 / l; - this._x = this._x * l; - this._y = this._y * l; - this._z = this._z * l; - this._w = this._w * l; - } - - this._onChangeCallback(); - - return this; - } - - multiply(q, p) { - if (p !== undefined) { - console.warn('THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.'); - return this.multiplyQuaternions(q, p); - } - - return this.multiplyQuaternions(this, q); - } - - premultiply(q) { - return this.multiplyQuaternions(q, this); - } - - multiplyQuaternions(a, b) { - // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm - const qax = a._x, - qay = a._y, - qaz = a._z, - qaw = a._w; - const qbx = b._x, - qby = b._y, - qbz = b._z, - qbw = b._w; - this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby; - this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz; - this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; - this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; - - this._onChangeCallback(); - - return this; - } - - slerp(qb, t) { - if (t === 0) return this; - if (t === 1) return this.copy(qb); - const x = this._x, - y = this._y, - z = this._z, - w = this._w; // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/ - - let cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z; - - if (cosHalfTheta < 0) { - this._w = -qb._w; - this._x = -qb._x; - this._y = -qb._y; - this._z = -qb._z; - cosHalfTheta = -cosHalfTheta; - } else { - this.copy(qb); - } - - if (cosHalfTheta >= 1.0) { - this._w = w; - this._x = x; - this._y = y; - this._z = z; - return this; - } - - const sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta; - - if (sqrSinHalfTheta <= Number.EPSILON) { - const s = 1 - t; - this._w = s * w + t * this._w; - this._x = s * x + t * this._x; - this._y = s * y + t * this._y; - this._z = s * z + t * this._z; - this.normalize(); - - this._onChangeCallback(); - - return this; - } - - const sinHalfTheta = Math.sqrt(sqrSinHalfTheta); - const halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta); - const ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta, - ratioB = Math.sin(t * halfTheta) / sinHalfTheta; - this._w = w * ratioA + this._w * ratioB; - this._x = x * ratioA + this._x * ratioB; - this._y = y * ratioA + this._y * ratioB; - this._z = z * ratioA + this._z * ratioB; - - this._onChangeCallback(); - - return this; - } - - slerpQuaternions(qa, qb, t) { - this.copy(qa).slerp(qb, t); - } - - equals(quaternion) { - return quaternion._x === this._x && quaternion._y === this._y && quaternion._z === this._z && quaternion._w === this._w; - } - - fromArray(array, offset = 0) { - this._x = array[offset]; - this._y = array[offset + 1]; - this._z = array[offset + 2]; - this._w = array[offset + 3]; - - this._onChangeCallback(); - - return this; - } - - toArray(array = [], offset = 0) { - array[offset] = this._x; - array[offset + 1] = this._y; - array[offset + 2] = this._z; - array[offset + 3] = this._w; - return array; - } - - fromBufferAttribute(attribute, index) { - this._x = attribute.getX(index); - this._y = attribute.getY(index); - this._z = attribute.getZ(index); - this._w = attribute.getW(index); - return this; - } - - _onChange(callback) { - this._onChangeCallback = callback; - return this; - } - - _onChangeCallback() {} - - } - - Quaternion.prototype.isQuaternion = true; - - class Vector3 { - constructor(x = 0, y = 0, z = 0) { - this.x = x; - this.y = y; - this.z = z; - } - - set(x, y, z) { - if (z === undefined) z = this.z; // sprite.scale.set(x,y) - - this.x = x; - this.y = y; - this.z = z; - return this; - } - - setScalar(scalar) { - this.x = scalar; - this.y = scalar; - this.z = scalar; - return this; - } - - setX(x) { - this.x = x; - return this; - } - - setY(y) { - this.y = y; - return this; - } - - setZ(z) { - this.z = z; - return this; - } - - setComponent(index, value) { - switch (index) { - case 0: - this.x = value; - break; - - case 1: - this.y = value; - break; - - case 2: - this.z = value; - break; - - default: - throw new Error('index is out of range: ' + index); - } - - return this; - } - - getComponent(index) { - switch (index) { - case 0: - return this.x; - - case 1: - return this.y; - - case 2: - return this.z; - - default: - throw new Error('index is out of range: ' + index); - } - } - - clone() { - return new this.constructor(this.x, this.y, this.z); - } - - copy(v) { - this.x = v.x; - this.y = v.y; - this.z = v.z; - return this; - } - - add(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.'); - return this.addVectors(v, w); - } - - this.x += v.x; - this.y += v.y; - this.z += v.z; - return this; - } - - addScalar(s) { - this.x += s; - this.y += s; - this.z += s; - return this; - } - - addVectors(a, b) { - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - return this; - } - - addScaledVector(v, s) { - this.x += v.x * s; - this.y += v.y * s; - this.z += v.z * s; - return this; - } - - sub(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.'); - return this.subVectors(v, w); - } - - this.x -= v.x; - this.y -= v.y; - this.z -= v.z; - return this; - } - - subScalar(s) { - this.x -= s; - this.y -= s; - this.z -= s; - return this; - } - - subVectors(a, b) { - this.x = a.x - b.x; - this.y = a.y - b.y; - this.z = a.z - b.z; - return this; - } - - multiply(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.'); - return this.multiplyVectors(v, w); - } - - this.x *= v.x; - this.y *= v.y; - this.z *= v.z; - return this; - } - - multiplyScalar(scalar) { - this.x *= scalar; - this.y *= scalar; - this.z *= scalar; - return this; - } - - multiplyVectors(a, b) { - this.x = a.x * b.x; - this.y = a.y * b.y; - this.z = a.z * b.z; - return this; - } - - applyEuler(euler) { - if (!(euler && euler.isEuler)) { - console.error('THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.'); - } - - return this.applyQuaternion(_quaternion$4.setFromEuler(euler)); - } - - applyAxisAngle(axis, angle) { - return this.applyQuaternion(_quaternion$4.setFromAxisAngle(axis, angle)); - } - - applyMatrix3(m) { - const x = this.x, - y = this.y, - z = this.z; - const e = m.elements; - this.x = e[0] * x + e[3] * y + e[6] * z; - this.y = e[1] * x + e[4] * y + e[7] * z; - this.z = e[2] * x + e[5] * y + e[8] * z; - return this; - } - - applyNormalMatrix(m) { - return this.applyMatrix3(m).normalize(); - } - - applyMatrix4(m) { - const x = this.x, - y = this.y, - z = this.z; - const e = m.elements; - const w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]); - this.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w; - this.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w; - this.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w; - return this; - } - - applyQuaternion(q) { - const x = this.x, - y = this.y, - z = this.z; - const qx = q.x, - qy = q.y, - qz = q.z, - qw = q.w; // calculate quat * vector - - const ix = qw * x + qy * z - qz * y; - const iy = qw * y + qz * x - qx * z; - const iz = qw * z + qx * y - qy * x; - const iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat - - this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy; - this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz; - this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx; - return this; - } - - project(camera) { - return this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix); - } - - unproject(camera) { - return this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld); - } - - transformDirection(m) { - // input: THREE.Matrix4 affine matrix - // vector interpreted as a direction - const x = this.x, - y = this.y, - z = this.z; - const e = m.elements; - this.x = e[0] * x + e[4] * y + e[8] * z; - this.y = e[1] * x + e[5] * y + e[9] * z; - this.z = e[2] * x + e[6] * y + e[10] * z; - return this.normalize(); - } - - divide(v) { - this.x /= v.x; - this.y /= v.y; - this.z /= v.z; - return this; - } - - divideScalar(scalar) { - return this.multiplyScalar(1 / scalar); - } - - min(v) { - this.x = Math.min(this.x, v.x); - this.y = Math.min(this.y, v.y); - this.z = Math.min(this.z, v.z); - return this; - } - - max(v) { - this.x = Math.max(this.x, v.x); - this.y = Math.max(this.y, v.y); - this.z = Math.max(this.z, v.z); - return this; - } - - clamp(min, max) { - // assumes min < max, componentwise - this.x = Math.max(min.x, Math.min(max.x, this.x)); - this.y = Math.max(min.y, Math.min(max.y, this.y)); - this.z = Math.max(min.z, Math.min(max.z, this.z)); - return this; - } - - clampScalar(minVal, maxVal) { - this.x = Math.max(minVal, Math.min(maxVal, this.x)); - this.y = Math.max(minVal, Math.min(maxVal, this.y)); - this.z = Math.max(minVal, Math.min(maxVal, this.z)); - return this; - } - - clampLength(min, max) { - const length = this.length(); - return this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length))); - } - - floor() { - this.x = Math.floor(this.x); - this.y = Math.floor(this.y); - this.z = Math.floor(this.z); - return this; - } - - ceil() { - this.x = Math.ceil(this.x); - this.y = Math.ceil(this.y); - this.z = Math.ceil(this.z); - return this; - } - - round() { - this.x = Math.round(this.x); - this.y = Math.round(this.y); - this.z = Math.round(this.z); - return this; - } - - roundToZero() { - this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x); - this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y); - this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z); - return this; - } - - negate() { - this.x = -this.x; - this.y = -this.y; - this.z = -this.z; - return this; - } - - dot(v) { - return this.x * v.x + this.y * v.y + this.z * v.z; - } // TODO lengthSquared? - - - lengthSq() { - return this.x * this.x + this.y * this.y + this.z * this.z; - } - - length() { - return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); - } - - manhattanLength() { - return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z); - } - - normalize() { - return this.divideScalar(this.length() || 1); - } - - setLength(length) { - return this.normalize().multiplyScalar(length); - } - - lerp(v, alpha) { - this.x += (v.x - this.x) * alpha; - this.y += (v.y - this.y) * alpha; - this.z += (v.z - this.z) * alpha; - return this; - } - - lerpVectors(v1, v2, alpha) { - this.x = v1.x + (v2.x - v1.x) * alpha; - this.y = v1.y + (v2.y - v1.y) * alpha; - this.z = v1.z + (v2.z - v1.z) * alpha; - return this; - } - - cross(v, w) { - if (w !== undefined) { - console.warn('THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.'); - return this.crossVectors(v, w); - } - - return this.crossVectors(this, v); - } - - crossVectors(a, b) { - const ax = a.x, - ay = a.y, - az = a.z; - const bx = b.x, - by = b.y, - bz = b.z; - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - return this; - } - - projectOnVector(v) { - const denominator = v.lengthSq(); - if (denominator === 0) return this.set(0, 0, 0); - const scalar = v.dot(this) / denominator; - return this.copy(v).multiplyScalar(scalar); - } - - projectOnPlane(planeNormal) { - _vector$c.copy(this).projectOnVector(planeNormal); - - return this.sub(_vector$c); - } - - reflect(normal) { - // reflect incident vector off plane orthogonal to normal - // normal is assumed to have unit length - return this.sub(_vector$c.copy(normal).multiplyScalar(2 * this.dot(normal))); - } - - angleTo(v) { - const denominator = Math.sqrt(this.lengthSq() * v.lengthSq()); - if (denominator === 0) return Math.PI / 2; - const theta = this.dot(v) / denominator; // clamp, to handle numerical problems - - return Math.acos(clamp(theta, -1, 1)); - } - - distanceTo(v) { - return Math.sqrt(this.distanceToSquared(v)); - } - - distanceToSquared(v) { - const dx = this.x - v.x, - dy = this.y - v.y, - dz = this.z - v.z; - return dx * dx + dy * dy + dz * dz; - } - - manhattanDistanceTo(v) { - return Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z); - } - - setFromSpherical(s) { - return this.setFromSphericalCoords(s.radius, s.phi, s.theta); - } - - setFromSphericalCoords(radius, phi, theta) { - const sinPhiRadius = Math.sin(phi) * radius; - this.x = sinPhiRadius * Math.sin(theta); - this.y = Math.cos(phi) * radius; - this.z = sinPhiRadius * Math.cos(theta); - return this; - } - - setFromCylindrical(c) { - return this.setFromCylindricalCoords(c.radius, c.theta, c.y); - } - - setFromCylindricalCoords(radius, theta, y) { - this.x = radius * Math.sin(theta); - this.y = y; - this.z = radius * Math.cos(theta); - return this; - } - - setFromMatrixPosition(m) { - const e = m.elements; - this.x = e[12]; - this.y = e[13]; - this.z = e[14]; - return this; - } - - setFromMatrixScale(m) { - const sx = this.setFromMatrixColumn(m, 0).length(); - const sy = this.setFromMatrixColumn(m, 1).length(); - const sz = this.setFromMatrixColumn(m, 2).length(); - this.x = sx; - this.y = sy; - this.z = sz; - return this; - } - - setFromMatrixColumn(m, index) { - return this.fromArray(m.elements, index * 4); - } - - setFromMatrix3Column(m, index) { - return this.fromArray(m.elements, index * 3); - } - - equals(v) { - return v.x === this.x && v.y === this.y && v.z === this.z; - } - - fromArray(array, offset = 0) { - this.x = array[offset]; - this.y = array[offset + 1]; - this.z = array[offset + 2]; - return this; - } - - toArray(array = [], offset = 0) { - array[offset] = this.x; - array[offset + 1] = this.y; - array[offset + 2] = this.z; - return array; - } - - fromBufferAttribute(attribute, index, offset) { - if (offset !== undefined) { - console.warn('THREE.Vector3: offset has been removed from .fromBufferAttribute().'); - } - - this.x = attribute.getX(index); - this.y = attribute.getY(index); - this.z = attribute.getZ(index); - return this; - } - - random() { - this.x = Math.random(); - this.y = Math.random(); - this.z = Math.random(); - return this; - } - - } - - Vector3.prototype.isVector3 = true; - - const _vector$c = /*@__PURE__*/new Vector3(); - - const _quaternion$4 = /*@__PURE__*/new Quaternion(); - - class Box3 { - constructor(min = new Vector3(+Infinity, +Infinity, +Infinity), max = new Vector3(-Infinity, -Infinity, -Infinity)) { - this.min = min; - this.max = max; - } - - set(min, max) { - this.min.copy(min); - this.max.copy(max); - return this; - } - - setFromArray(array) { - let minX = +Infinity; - let minY = +Infinity; - let minZ = +Infinity; - let maxX = -Infinity; - let maxY = -Infinity; - let maxZ = -Infinity; - - for (let i = 0, l = array.length; i < l; i += 3) { - const x = array[i]; - const y = array[i + 1]; - const z = array[i + 2]; - if (x < minX) minX = x; - if (y < minY) minY = y; - if (z < minZ) minZ = z; - if (x > maxX) maxX = x; - if (y > maxY) maxY = y; - if (z > maxZ) maxZ = z; - } - - this.min.set(minX, minY, minZ); - this.max.set(maxX, maxY, maxZ); - return this; - } - - setFromBufferAttribute(attribute) { - let minX = +Infinity; - let minY = +Infinity; - let minZ = +Infinity; - let maxX = -Infinity; - let maxY = -Infinity; - let maxZ = -Infinity; - - for (let i = 0, l = attribute.count; i < l; i++) { - const x = attribute.getX(i); - const y = attribute.getY(i); - const z = attribute.getZ(i); - if (x < minX) minX = x; - if (y < minY) minY = y; - if (z < minZ) minZ = z; - if (x > maxX) maxX = x; - if (y > maxY) maxY = y; - if (z > maxZ) maxZ = z; - } - - this.min.set(minX, minY, minZ); - this.max.set(maxX, maxY, maxZ); - return this; - } - - setFromPoints(points) { - this.makeEmpty(); - - for (let i = 0, il = points.length; i < il; i++) { - this.expandByPoint(points[i]); - } - - return this; - } - - setFromCenterAndSize(center, size) { - const halfSize = _vector$b.copy(size).multiplyScalar(0.5); - - this.min.copy(center).sub(halfSize); - this.max.copy(center).add(halfSize); - return this; - } - - setFromObject(object) { - this.makeEmpty(); - return this.expandByObject(object); - } - - clone() { - return new this.constructor().copy(this); - } - - copy(box) { - this.min.copy(box.min); - this.max.copy(box.max); - return this; - } - - makeEmpty() { - this.min.x = this.min.y = this.min.z = +Infinity; - this.max.x = this.max.y = this.max.z = -Infinity; - return this; - } - - isEmpty() { - // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes - return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z; - } - - getCenter(target) { - return this.isEmpty() ? target.set(0, 0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5); - } - - getSize(target) { - return this.isEmpty() ? target.set(0, 0, 0) : target.subVectors(this.max, this.min); - } - - expandByPoint(point) { - this.min.min(point); - this.max.max(point); - return this; - } - - expandByVector(vector) { - this.min.sub(vector); - this.max.add(vector); - return this; - } - - expandByScalar(scalar) { - this.min.addScalar(-scalar); - this.max.addScalar(scalar); - return this; - } - - expandByObject(object) { - // Computes the world-axis-aligned bounding box of an object (including its children), - // accounting for both the object's, and children's, world transforms - object.updateWorldMatrix(false, false); - const geometry = object.geometry; - - if (geometry !== undefined) { - if (geometry.boundingBox === null) { - geometry.computeBoundingBox(); - } - - _box$3.copy(geometry.boundingBox); - - _box$3.applyMatrix4(object.matrixWorld); - - this.union(_box$3); - } - - const children = object.children; - - for (let i = 0, l = children.length; i < l; i++) { - this.expandByObject(children[i]); - } - - return this; - } - - containsPoint(point) { - return point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y || point.z < this.min.z || point.z > this.max.z ? false : true; - } - - containsBox(box) { - return this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y && this.min.z <= box.min.z && box.max.z <= this.max.z; - } - - getParameter(point, target) { - // This can potentially have a divide by zero if the box - // has a size dimension of 0. - return target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y), (point.z - this.min.z) / (this.max.z - this.min.z)); - } - - intersectsBox(box) { - // using 6 splitting planes to rule out intersections. - return box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y || box.max.z < this.min.z || box.min.z > this.max.z ? false : true; - } - - intersectsSphere(sphere) { - // Find the point on the AABB closest to the sphere center. - this.clampPoint(sphere.center, _vector$b); // If that point is inside the sphere, the AABB and sphere intersect. - - return _vector$b.distanceToSquared(sphere.center) <= sphere.radius * sphere.radius; - } - - intersectsPlane(plane) { - // We compute the minimum and maximum dot product values. If those values - // are on the same side (back or front) of the plane, then there is no intersection. - let min, max; - - if (plane.normal.x > 0) { - min = plane.normal.x * this.min.x; - max = plane.normal.x * this.max.x; - } else { - min = plane.normal.x * this.max.x; - max = plane.normal.x * this.min.x; - } - - if (plane.normal.y > 0) { - min += plane.normal.y * this.min.y; - max += plane.normal.y * this.max.y; - } else { - min += plane.normal.y * this.max.y; - max += plane.normal.y * this.min.y; - } - - if (plane.normal.z > 0) { - min += plane.normal.z * this.min.z; - max += plane.normal.z * this.max.z; - } else { - min += plane.normal.z * this.max.z; - max += plane.normal.z * this.min.z; - } - - return min <= -plane.constant && max >= -plane.constant; - } - - intersectsTriangle(triangle) { - if (this.isEmpty()) { - return false; - } // compute box center and extents - - - this.getCenter(_center); - - _extents.subVectors(this.max, _center); // translate triangle to aabb origin - - - _v0$2.subVectors(triangle.a, _center); - - _v1$7.subVectors(triangle.b, _center); - - _v2$3.subVectors(triangle.c, _center); // compute edge vectors for triangle - - - _f0.subVectors(_v1$7, _v0$2); - - _f1.subVectors(_v2$3, _v1$7); - - _f2.subVectors(_v0$2, _v2$3); // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb - // make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation - // axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned) - - - let axes = [0, -_f0.z, _f0.y, 0, -_f1.z, _f1.y, 0, -_f2.z, _f2.y, _f0.z, 0, -_f0.x, _f1.z, 0, -_f1.x, _f2.z, 0, -_f2.x, -_f0.y, _f0.x, 0, -_f1.y, _f1.x, 0, -_f2.y, _f2.x, 0]; - - if (!satForAxes(axes, _v0$2, _v1$7, _v2$3, _extents)) { - return false; - } // test 3 face normals from the aabb - - - axes = [1, 0, 0, 0, 1, 0, 0, 0, 1]; - - if (!satForAxes(axes, _v0$2, _v1$7, _v2$3, _extents)) { - return false; - } // finally testing the face normal of the triangle - // use already existing triangle edge vectors here - - - _triangleNormal.crossVectors(_f0, _f1); - - axes = [_triangleNormal.x, _triangleNormal.y, _triangleNormal.z]; - return satForAxes(axes, _v0$2, _v1$7, _v2$3, _extents); - } - - clampPoint(point, target) { - return target.copy(point).clamp(this.min, this.max); - } - - distanceToPoint(point) { - const clampedPoint = _vector$b.copy(point).clamp(this.min, this.max); - - return clampedPoint.sub(point).length(); - } - - getBoundingSphere(target) { - this.getCenter(target.center); - target.radius = this.getSize(_vector$b).length() * 0.5; - return target; - } - - intersect(box) { - this.min.max(box.min); - this.max.min(box.max); // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values. - - if (this.isEmpty()) this.makeEmpty(); - return this; - } - - union(box) { - this.min.min(box.min); - this.max.max(box.max); - return this; - } - - applyMatrix4(matrix) { - // transform of empty box is an empty box. - if (this.isEmpty()) return this; // NOTE: I am using a binary pattern to specify all 2^3 combinations below - - _points[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(matrix); // 000 - - - _points[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(matrix); // 001 - - - _points[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(matrix); // 010 - - - _points[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(matrix); // 011 - - - _points[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(matrix); // 100 - - - _points[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(matrix); // 101 - - - _points[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(matrix); // 110 - - - _points[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(matrix); // 111 - - - this.setFromPoints(_points); - return this; - } - - translate(offset) { - this.min.add(offset); - this.max.add(offset); - return this; - } - - equals(box) { - return box.min.equals(this.min) && box.max.equals(this.max); - } - - } - - Box3.prototype.isBox3 = true; - const _points = [/*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3()]; - - const _vector$b = /*@__PURE__*/new Vector3(); - - const _box$3 = /*@__PURE__*/new Box3(); // triangle centered vertices - - - const _v0$2 = /*@__PURE__*/new Vector3(); - - const _v1$7 = /*@__PURE__*/new Vector3(); - - const _v2$3 = /*@__PURE__*/new Vector3(); // triangle edge vectors - - - const _f0 = /*@__PURE__*/new Vector3(); - - const _f1 = /*@__PURE__*/new Vector3(); - - const _f2 = /*@__PURE__*/new Vector3(); - - const _center = /*@__PURE__*/new Vector3(); - - const _extents = /*@__PURE__*/new Vector3(); - - const _triangleNormal = /*@__PURE__*/new Vector3(); - - const _testAxis = /*@__PURE__*/new Vector3(); - - function satForAxes(axes, v0, v1, v2, extents) { - for (let i = 0, j = axes.length - 3; i <= j; i += 3) { - _testAxis.fromArray(axes, i); // project the aabb onto the seperating axis - - - const r = extents.x * Math.abs(_testAxis.x) + extents.y * Math.abs(_testAxis.y) + extents.z * Math.abs(_testAxis.z); // project all 3 vertices of the triangle onto the seperating axis - - const p0 = v0.dot(_testAxis); - const p1 = v1.dot(_testAxis); - const p2 = v2.dot(_testAxis); // actual test, basically see if either of the most extreme of the triangle points intersects r - - if (Math.max(-Math.max(p0, p1, p2), Math.min(p0, p1, p2)) > r) { - // points of the projected triangle are outside the projected half-length of the aabb - // the axis is seperating and we can exit - return false; - } - } - - return true; - } - - const _box$2 = /*@__PURE__*/new Box3(); - - const _v1$6 = /*@__PURE__*/new Vector3(); - - const _toFarthestPoint = /*@__PURE__*/new Vector3(); - - const _toPoint = /*@__PURE__*/new Vector3(); - - class Sphere { - constructor(center = new Vector3(), radius = -1) { - this.center = center; - this.radius = radius; - } - - set(center, radius) { - this.center.copy(center); - this.radius = radius; - return this; - } - - setFromPoints(points, optionalCenter) { - const center = this.center; - - if (optionalCenter !== undefined) { - center.copy(optionalCenter); - } else { - _box$2.setFromPoints(points).getCenter(center); - } - - let maxRadiusSq = 0; - - for (let i = 0, il = points.length; i < il; i++) { - maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(points[i])); - } - - this.radius = Math.sqrt(maxRadiusSq); - return this; - } - - copy(sphere) { - this.center.copy(sphere.center); - this.radius = sphere.radius; - return this; - } - - isEmpty() { - return this.radius < 0; - } - - makeEmpty() { - this.center.set(0, 0, 0); - this.radius = -1; - return this; - } - - containsPoint(point) { - return point.distanceToSquared(this.center) <= this.radius * this.radius; - } - - distanceToPoint(point) { - return point.distanceTo(this.center) - this.radius; - } - - intersectsSphere(sphere) { - const radiusSum = this.radius + sphere.radius; - return sphere.center.distanceToSquared(this.center) <= radiusSum * radiusSum; - } - - intersectsBox(box) { - return box.intersectsSphere(this); - } - - intersectsPlane(plane) { - return Math.abs(plane.distanceToPoint(this.center)) <= this.radius; - } - - clampPoint(point, target) { - const deltaLengthSq = this.center.distanceToSquared(point); - target.copy(point); - - if (deltaLengthSq > this.radius * this.radius) { - target.sub(this.center).normalize(); - target.multiplyScalar(this.radius).add(this.center); - } - - return target; - } - - getBoundingBox(target) { - if (this.isEmpty()) { - // Empty sphere produces empty bounding box - target.makeEmpty(); - return target; - } - - target.set(this.center, this.center); - target.expandByScalar(this.radius); - return target; - } - - applyMatrix4(matrix) { - this.center.applyMatrix4(matrix); - this.radius = this.radius * matrix.getMaxScaleOnAxis(); - return this; - } - - translate(offset) { - this.center.add(offset); - return this; - } - - expandByPoint(point) { - // from https://github.com/juj/MathGeoLib/blob/2940b99b99cfe575dd45103ef20f4019dee15b54/src/Geometry/Sphere.cpp#L649-L671 - _toPoint.subVectors(point, this.center); - - const lengthSq = _toPoint.lengthSq(); - - if (lengthSq > this.radius * this.radius) { - const length = Math.sqrt(lengthSq); - const missingRadiusHalf = (length - this.radius) * 0.5; // Nudge this sphere towards the target point. Add half the missing distance to radius, - // and the other half to position. This gives a tighter enclosure, instead of if - // the whole missing distance were just added to radius. - - this.center.add(_toPoint.multiplyScalar(missingRadiusHalf / length)); - this.radius += missingRadiusHalf; - } - - return this; - } - - union(sphere) { - // from https://github.com/juj/MathGeoLib/blob/2940b99b99cfe575dd45103ef20f4019dee15b54/src/Geometry/Sphere.cpp#L759-L769 - // To enclose another sphere into this sphere, we only need to enclose two points: - // 1) Enclose the farthest point on the other sphere into this sphere. - // 2) Enclose the opposite point of the farthest point into this sphere. - _toFarthestPoint.subVectors(sphere.center, this.center).normalize().multiplyScalar(sphere.radius); - - this.expandByPoint(_v1$6.copy(sphere.center).add(_toFarthestPoint)); - this.expandByPoint(_v1$6.copy(sphere.center).sub(_toFarthestPoint)); - return this; - } - - equals(sphere) { - return sphere.center.equals(this.center) && sphere.radius === this.radius; - } - - clone() { - return new this.constructor().copy(this); - } - - } - - const _vector$a = /*@__PURE__*/new Vector3(); - - const _segCenter = /*@__PURE__*/new Vector3(); - - const _segDir = /*@__PURE__*/new Vector3(); - - const _diff = /*@__PURE__*/new Vector3(); - - const _edge1 = /*@__PURE__*/new Vector3(); - - const _edge2 = /*@__PURE__*/new Vector3(); - - const _normal$1 = /*@__PURE__*/new Vector3(); - - class Ray { - constructor(origin = new Vector3(), direction = new Vector3(0, 0, -1)) { - this.origin = origin; - this.direction = direction; - } - - set(origin, direction) { - this.origin.copy(origin); - this.direction.copy(direction); - return this; - } - - copy(ray) { - this.origin.copy(ray.origin); - this.direction.copy(ray.direction); - return this; - } - - at(t, target) { - return target.copy(this.direction).multiplyScalar(t).add(this.origin); - } - - lookAt(v) { - this.direction.copy(v).sub(this.origin).normalize(); - return this; - } - - recast(t) { - this.origin.copy(this.at(t, _vector$a)); - return this; - } - - closestPointToPoint(point, target) { - target.subVectors(point, this.origin); - const directionDistance = target.dot(this.direction); - - if (directionDistance < 0) { - return target.copy(this.origin); - } - - return target.copy(this.direction).multiplyScalar(directionDistance).add(this.origin); - } - - distanceToPoint(point) { - return Math.sqrt(this.distanceSqToPoint(point)); - } - - distanceSqToPoint(point) { - const directionDistance = _vector$a.subVectors(point, this.origin).dot(this.direction); // point behind the ray - - - if (directionDistance < 0) { - return this.origin.distanceToSquared(point); - } - - _vector$a.copy(this.direction).multiplyScalar(directionDistance).add(this.origin); - - return _vector$a.distanceToSquared(point); - } - - distanceSqToSegment(v0, v1, optionalPointOnRay, optionalPointOnSegment) { - // from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteDistRaySegment.h - // It returns the min distance between the ray and the segment - // defined by v0 and v1 - // It can also set two optional targets : - // - The closest point on the ray - // - The closest point on the segment - _segCenter.copy(v0).add(v1).multiplyScalar(0.5); - - _segDir.copy(v1).sub(v0).normalize(); - - _diff.copy(this.origin).sub(_segCenter); - - const segExtent = v0.distanceTo(v1) * 0.5; - const a01 = -this.direction.dot(_segDir); - - const b0 = _diff.dot(this.direction); - - const b1 = -_diff.dot(_segDir); - - const c = _diff.lengthSq(); - - const det = Math.abs(1 - a01 * a01); - let s0, s1, sqrDist, extDet; - - if (det > 0) { - // The ray and segment are not parallel. - s0 = a01 * b1 - b0; - s1 = a01 * b0 - b1; - extDet = segExtent * det; - - if (s0 >= 0) { - if (s1 >= -extDet) { - if (s1 <= extDet) { - // region 0 - // Minimum at interior points of ray and segment. - const invDet = 1 / det; - s0 *= invDet; - s1 *= invDet; - sqrDist = s0 * (s0 + a01 * s1 + 2 * b0) + s1 * (a01 * s0 + s1 + 2 * b1) + c; - } else { - // region 1 - s1 = segExtent; - s0 = Math.max(0, -(a01 * s1 + b0)); - sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c; - } - } else { - // region 5 - s1 = -segExtent; - s0 = Math.max(0, -(a01 * s1 + b0)); - sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c; - } - } else { - if (s1 <= -extDet) { - // region 4 - s0 = Math.max(0, -(-a01 * segExtent + b0)); - s1 = s0 > 0 ? -segExtent : Math.min(Math.max(-segExtent, -b1), segExtent); - sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c; - } else if (s1 <= extDet) { - // region 3 - s0 = 0; - s1 = Math.min(Math.max(-segExtent, -b1), segExtent); - sqrDist = s1 * (s1 + 2 * b1) + c; - } else { - // region 2 - s0 = Math.max(0, -(a01 * segExtent + b0)); - s1 = s0 > 0 ? segExtent : Math.min(Math.max(-segExtent, -b1), segExtent); - sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c; - } - } - } else { - // Ray and segment are parallel. - s1 = a01 > 0 ? -segExtent : segExtent; - s0 = Math.max(0, -(a01 * s1 + b0)); - sqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c; - } - - if (optionalPointOnRay) { - optionalPointOnRay.copy(this.direction).multiplyScalar(s0).add(this.origin); - } - - if (optionalPointOnSegment) { - optionalPointOnSegment.copy(_segDir).multiplyScalar(s1).add(_segCenter); - } - - return sqrDist; - } - - intersectSphere(sphere, target) { - _vector$a.subVectors(sphere.center, this.origin); - - const tca = _vector$a.dot(this.direction); - - const d2 = _vector$a.dot(_vector$a) - tca * tca; - const radius2 = sphere.radius * sphere.radius; - if (d2 > radius2) return null; - const thc = Math.sqrt(radius2 - d2); // t0 = first intersect point - entrance on front of sphere - - const t0 = tca - thc; // t1 = second intersect point - exit point on back of sphere - - const t1 = tca + thc; // test to see if both t0 and t1 are behind the ray - if so, return null - - if (t0 < 0 && t1 < 0) return null; // test to see if t0 is behind the ray: - // if it is, the ray is inside the sphere, so return the second exit point scaled by t1, - // in order to always return an intersect point that is in front of the ray. - - if (t0 < 0) return this.at(t1, target); // else t0 is in front of the ray, so return the first collision point scaled by t0 - - return this.at(t0, target); - } - - intersectsSphere(sphere) { - return this.distanceSqToPoint(sphere.center) <= sphere.radius * sphere.radius; - } - - distanceToPlane(plane) { - const denominator = plane.normal.dot(this.direction); - - if (denominator === 0) { - // line is coplanar, return origin - if (plane.distanceToPoint(this.origin) === 0) { - return 0; - } // Null is preferable to undefined since undefined means.... it is undefined - - - return null; - } - - const t = -(this.origin.dot(plane.normal) + plane.constant) / denominator; // Return if the ray never intersects the plane - - return t >= 0 ? t : null; - } - - intersectPlane(plane, target) { - const t = this.distanceToPlane(plane); - - if (t === null) { - return null; - } - - return this.at(t, target); - } - - intersectsPlane(plane) { - // check if the ray lies on the plane first - const distToPoint = plane.distanceToPoint(this.origin); - - if (distToPoint === 0) { - return true; - } - - const denominator = plane.normal.dot(this.direction); - - if (denominator * distToPoint < 0) { - return true; - } // ray origin is behind the plane (and is pointing behind it) - - - return false; - } - - intersectBox(box, target) { - let tmin, tmax, tymin, tymax, tzmin, tzmax; - const invdirx = 1 / this.direction.x, - invdiry = 1 / this.direction.y, - invdirz = 1 / this.direction.z; - const origin = this.origin; - - if (invdirx >= 0) { - tmin = (box.min.x - origin.x) * invdirx; - tmax = (box.max.x - origin.x) * invdirx; - } else { - tmin = (box.max.x - origin.x) * invdirx; - tmax = (box.min.x - origin.x) * invdirx; - } - - if (invdiry >= 0) { - tymin = (box.min.y - origin.y) * invdiry; - tymax = (box.max.y - origin.y) * invdiry; - } else { - tymin = (box.max.y - origin.y) * invdiry; - tymax = (box.min.y - origin.y) * invdiry; - } - - if (tmin > tymax || tymin > tmax) return null; // These lines also handle the case where tmin or tmax is NaN - // (result of 0 * Infinity). x !== x returns true if x is NaN - - if (tymin > tmin || tmin !== tmin) tmin = tymin; - if (tymax < tmax || tmax !== tmax) tmax = tymax; - - if (invdirz >= 0) { - tzmin = (box.min.z - origin.z) * invdirz; - tzmax = (box.max.z - origin.z) * invdirz; - } else { - tzmin = (box.max.z - origin.z) * invdirz; - tzmax = (box.min.z - origin.z) * invdirz; - } - - if (tmin > tzmax || tzmin > tmax) return null; - if (tzmin > tmin || tmin !== tmin) tmin = tzmin; - if (tzmax < tmax || tmax !== tmax) tmax = tzmax; //return point closest to the ray (positive side) - - if (tmax < 0) return null; - return this.at(tmin >= 0 ? tmin : tmax, target); - } - - intersectsBox(box) { - return this.intersectBox(box, _vector$a) !== null; - } - - intersectTriangle(a, b, c, backfaceCulling, target) { - // Compute the offset origin, edges, and normal. - // from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h - _edge1.subVectors(b, a); - - _edge2.subVectors(c, a); - - _normal$1.crossVectors(_edge1, _edge2); // Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction, - // E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by - // |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2)) - // |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q)) - // |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N) - - - let DdN = this.direction.dot(_normal$1); - let sign; - - if (DdN > 0) { - if (backfaceCulling) return null; - sign = 1; - } else if (DdN < 0) { - sign = -1; - DdN = -DdN; - } else { - return null; - } - - _diff.subVectors(this.origin, a); - - const DdQxE2 = sign * this.direction.dot(_edge2.crossVectors(_diff, _edge2)); // b1 < 0, no intersection - - if (DdQxE2 < 0) { - return null; - } - - const DdE1xQ = sign * this.direction.dot(_edge1.cross(_diff)); // b2 < 0, no intersection - - if (DdE1xQ < 0) { - return null; - } // b1+b2 > 1, no intersection - - - if (DdQxE2 + DdE1xQ > DdN) { - return null; - } // Line intersects triangle, check if ray does. - - - const QdN = -sign * _diff.dot(_normal$1); // t < 0, no intersection - - - if (QdN < 0) { - return null; - } // Ray intersects triangle. - - - return this.at(QdN / DdN, target); - } - - applyMatrix4(matrix4) { - this.origin.applyMatrix4(matrix4); - this.direction.transformDirection(matrix4); - return this; - } - - equals(ray) { - return ray.origin.equals(this.origin) && ray.direction.equals(this.direction); - } - - clone() { - return new this.constructor().copy(this); - } - - } - - class Matrix4 { - constructor() { - this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; - - if (arguments.length > 0) { - console.error('THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.'); - } - } - - set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) { - const te = this.elements; - te[0] = n11; - te[4] = n12; - te[8] = n13; - te[12] = n14; - te[1] = n21; - te[5] = n22; - te[9] = n23; - te[13] = n24; - te[2] = n31; - te[6] = n32; - te[10] = n33; - te[14] = n34; - te[3] = n41; - te[7] = n42; - te[11] = n43; - te[15] = n44; - return this; - } - - identity() { - this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return this; - } - - clone() { - return new Matrix4().fromArray(this.elements); - } - - copy(m) { - const te = this.elements; - const me = m.elements; - te[0] = me[0]; - te[1] = me[1]; - te[2] = me[2]; - te[3] = me[3]; - te[4] = me[4]; - te[5] = me[5]; - te[6] = me[6]; - te[7] = me[7]; - te[8] = me[8]; - te[9] = me[9]; - te[10] = me[10]; - te[11] = me[11]; - te[12] = me[12]; - te[13] = me[13]; - te[14] = me[14]; - te[15] = me[15]; - return this; - } - - copyPosition(m) { - const te = this.elements, - me = m.elements; - te[12] = me[12]; - te[13] = me[13]; - te[14] = me[14]; - return this; - } - - setFromMatrix3(m) { - const me = m.elements; - this.set(me[0], me[3], me[6], 0, me[1], me[4], me[7], 0, me[2], me[5], me[8], 0, 0, 0, 0, 1); - return this; - } - - extractBasis(xAxis, yAxis, zAxis) { - xAxis.setFromMatrixColumn(this, 0); - yAxis.setFromMatrixColumn(this, 1); - zAxis.setFromMatrixColumn(this, 2); - return this; - } - - makeBasis(xAxis, yAxis, zAxis) { - this.set(xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1); - return this; - } - - extractRotation(m) { - // this method does not support reflection matrices - const te = this.elements; - const me = m.elements; - - const scaleX = 1 / _v1$5.setFromMatrixColumn(m, 0).length(); - - const scaleY = 1 / _v1$5.setFromMatrixColumn(m, 1).length(); - - const scaleZ = 1 / _v1$5.setFromMatrixColumn(m, 2).length(); - - te[0] = me[0] * scaleX; - te[1] = me[1] * scaleX; - te[2] = me[2] * scaleX; - te[3] = 0; - te[4] = me[4] * scaleY; - te[5] = me[5] * scaleY; - te[6] = me[6] * scaleY; - te[7] = 0; - te[8] = me[8] * scaleZ; - te[9] = me[9] * scaleZ; - te[10] = me[10] * scaleZ; - te[11] = 0; - te[12] = 0; - te[13] = 0; - te[14] = 0; - te[15] = 1; - return this; - } - - makeRotationFromEuler(euler) { - if (!(euler && euler.isEuler)) { - console.error('THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.'); - } - - const te = this.elements; - const x = euler.x, - y = euler.y, - z = euler.z; - const a = Math.cos(x), - b = Math.sin(x); - const c = Math.cos(y), - d = Math.sin(y); - const e = Math.cos(z), - f = Math.sin(z); - - if (euler.order === 'XYZ') { - const ae = a * e, - af = a * f, - be = b * e, - bf = b * f; - te[0] = c * e; - te[4] = -c * f; - te[8] = d; - te[1] = af + be * d; - te[5] = ae - bf * d; - te[9] = -b * c; - te[2] = bf - ae * d; - te[6] = be + af * d; - te[10] = a * c; - } else if (euler.order === 'YXZ') { - const ce = c * e, - cf = c * f, - de = d * e, - df = d * f; - te[0] = ce + df * b; - te[4] = de * b - cf; - te[8] = a * d; - te[1] = a * f; - te[5] = a * e; - te[9] = -b; - te[2] = cf * b - de; - te[6] = df + ce * b; - te[10] = a * c; - } else if (euler.order === 'ZXY') { - const ce = c * e, - cf = c * f, - de = d * e, - df = d * f; - te[0] = ce - df * b; - te[4] = -a * f; - te[8] = de + cf * b; - te[1] = cf + de * b; - te[5] = a * e; - te[9] = df - ce * b; - te[2] = -a * d; - te[6] = b; - te[10] = a * c; - } else if (euler.order === 'ZYX') { - const ae = a * e, - af = a * f, - be = b * e, - bf = b * f; - te[0] = c * e; - te[4] = be * d - af; - te[8] = ae * d + bf; - te[1] = c * f; - te[5] = bf * d + ae; - te[9] = af * d - be; - te[2] = -d; - te[6] = b * c; - te[10] = a * c; - } else if (euler.order === 'YZX') { - const ac = a * c, - ad = a * d, - bc = b * c, - bd = b * d; - te[0] = c * e; - te[4] = bd - ac * f; - te[8] = bc * f + ad; - te[1] = f; - te[5] = a * e; - te[9] = -b * e; - te[2] = -d * e; - te[6] = ad * f + bc; - te[10] = ac - bd * f; - } else if (euler.order === 'XZY') { - const ac = a * c, - ad = a * d, - bc = b * c, - bd = b * d; - te[0] = c * e; - te[4] = -f; - te[8] = d * e; - te[1] = ac * f + bd; - te[5] = a * e; - te[9] = ad * f - bc; - te[2] = bc * f - ad; - te[6] = b * e; - te[10] = bd * f + ac; - } // bottom row - - - te[3] = 0; - te[7] = 0; - te[11] = 0; // last column - - te[12] = 0; - te[13] = 0; - te[14] = 0; - te[15] = 1; - return this; - } - - makeRotationFromQuaternion(q) { - return this.compose(_zero, q, _one); - } - - lookAt(eye, target, up) { - const te = this.elements; - - _z.subVectors(eye, target); - - if (_z.lengthSq() === 0) { - // eye and target are in the same position - _z.z = 1; - } - - _z.normalize(); - - _x.crossVectors(up, _z); - - if (_x.lengthSq() === 0) { - // up and z are parallel - if (Math.abs(up.z) === 1) { - _z.x += 0.0001; - } else { - _z.z += 0.0001; - } - - _z.normalize(); - - _x.crossVectors(up, _z); - } - - _x.normalize(); - - _y.crossVectors(_z, _x); - - te[0] = _x.x; - te[4] = _y.x; - te[8] = _z.x; - te[1] = _x.y; - te[5] = _y.y; - te[9] = _z.y; - te[2] = _x.z; - te[6] = _y.z; - te[10] = _z.z; - return this; - } - - multiply(m, n) { - if (n !== undefined) { - console.warn('THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.'); - return this.multiplyMatrices(m, n); - } - - return this.multiplyMatrices(this, m); - } - - premultiply(m) { - return this.multiplyMatrices(m, this); - } - - multiplyMatrices(a, b) { - const ae = a.elements; - const be = b.elements; - const te = this.elements; - const a11 = ae[0], - a12 = ae[4], - a13 = ae[8], - a14 = ae[12]; - const a21 = ae[1], - a22 = ae[5], - a23 = ae[9], - a24 = ae[13]; - const a31 = ae[2], - a32 = ae[6], - a33 = ae[10], - a34 = ae[14]; - const a41 = ae[3], - a42 = ae[7], - a43 = ae[11], - a44 = ae[15]; - const b11 = be[0], - b12 = be[4], - b13 = be[8], - b14 = be[12]; - const b21 = be[1], - b22 = be[5], - b23 = be[9], - b24 = be[13]; - const b31 = be[2], - b32 = be[6], - b33 = be[10], - b34 = be[14]; - const b41 = be[3], - b42 = be[7], - b43 = be[11], - b44 = be[15]; - te[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41; - te[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42; - te[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43; - te[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44; - te[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41; - te[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42; - te[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43; - te[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44; - te[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41; - te[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42; - te[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43; - te[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44; - te[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41; - te[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42; - te[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43; - te[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44; - return this; - } - - multiplyScalar(s) { - const te = this.elements; - te[0] *= s; - te[4] *= s; - te[8] *= s; - te[12] *= s; - te[1] *= s; - te[5] *= s; - te[9] *= s; - te[13] *= s; - te[2] *= s; - te[6] *= s; - te[10] *= s; - te[14] *= s; - te[3] *= s; - te[7] *= s; - te[11] *= s; - te[15] *= s; - return this; - } - - determinant() { - const te = this.elements; - const n11 = te[0], - n12 = te[4], - n13 = te[8], - n14 = te[12]; - const n21 = te[1], - n22 = te[5], - n23 = te[9], - n24 = te[13]; - const n31 = te[2], - n32 = te[6], - n33 = te[10], - n34 = te[14]; - const n41 = te[3], - n42 = te[7], - n43 = te[11], - n44 = te[15]; //TODO: make this more efficient - //( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm ) - - return n41 * (+n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34) + n42 * (+n11 * n23 * n34 - n11 * n24 * n33 + n14 * n21 * n33 - n13 * n21 * n34 + n13 * n24 * n31 - n14 * n23 * n31) + n43 * (+n11 * n24 * n32 - n11 * n22 * n34 - n14 * n21 * n32 + n12 * n21 * n34 + n14 * n22 * n31 - n12 * n24 * n31) + n44 * (-n13 * n22 * n31 - n11 * n23 * n32 + n11 * n22 * n33 + n13 * n21 * n32 - n12 * n21 * n33 + n12 * n23 * n31); - } - - transpose() { - const te = this.elements; - let tmp; - tmp = te[1]; - te[1] = te[4]; - te[4] = tmp; - tmp = te[2]; - te[2] = te[8]; - te[8] = tmp; - tmp = te[6]; - te[6] = te[9]; - te[9] = tmp; - tmp = te[3]; - te[3] = te[12]; - te[12] = tmp; - tmp = te[7]; - te[7] = te[13]; - te[13] = tmp; - tmp = te[11]; - te[11] = te[14]; - te[14] = tmp; - return this; - } - - setPosition(x, y, z) { - const te = this.elements; - - if (x.isVector3) { - te[12] = x.x; - te[13] = x.y; - te[14] = x.z; - } else { - te[12] = x; - te[13] = y; - te[14] = z; - } - - return this; - } - - invert() { - // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm - const te = this.elements, - n11 = te[0], - n21 = te[1], - n31 = te[2], - n41 = te[3], - n12 = te[4], - n22 = te[5], - n32 = te[6], - n42 = te[7], - n13 = te[8], - n23 = te[9], - n33 = te[10], - n43 = te[11], - n14 = te[12], - n24 = te[13], - n34 = te[14], - n44 = te[15], - t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44, - t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44, - t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44, - t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34; - const det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14; - if (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - const detInv = 1 / det; - te[0] = t11 * detInv; - te[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv; - te[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv; - te[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv; - te[4] = t12 * detInv; - te[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv; - te[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv; - te[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv; - te[8] = t13 * detInv; - te[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv; - te[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv; - te[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv; - te[12] = t14 * detInv; - te[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv; - te[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv; - te[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv; - return this; - } - - scale(v) { - const te = this.elements; - const x = v.x, - y = v.y, - z = v.z; - te[0] *= x; - te[4] *= y; - te[8] *= z; - te[1] *= x; - te[5] *= y; - te[9] *= z; - te[2] *= x; - te[6] *= y; - te[10] *= z; - te[3] *= x; - te[7] *= y; - te[11] *= z; - return this; - } - - getMaxScaleOnAxis() { - const te = this.elements; - const scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2]; - const scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6]; - const scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10]; - return Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq)); - } - - makeTranslation(x, y, z) { - this.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1); - return this; - } - - makeRotationX(theta) { - const c = Math.cos(theta), - s = Math.sin(theta); - this.set(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1); - return this; - } - - makeRotationY(theta) { - const c = Math.cos(theta), - s = Math.sin(theta); - this.set(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1); - return this; - } - - makeRotationZ(theta) { - const c = Math.cos(theta), - s = Math.sin(theta); - this.set(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); - return this; - } - - makeRotationAxis(axis, angle) { - // Based on http://www.gamedev.net/reference/articles/article1199.asp - const c = Math.cos(angle); - const s = Math.sin(angle); - const t = 1 - c; - const x = axis.x, - y = axis.y, - z = axis.z; - const tx = t * x, - ty = t * y; - this.set(tx * x + c, tx * y - s * z, tx * z + s * y, 0, tx * y + s * z, ty * y + c, ty * z - s * x, 0, tx * z - s * y, ty * z + s * x, t * z * z + c, 0, 0, 0, 0, 1); - return this; - } - - makeScale(x, y, z) { - this.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1); - return this; - } - - makeShear(xy, xz, yx, yz, zx, zy) { - this.set(1, yx, zx, 0, xy, 1, zy, 0, xz, yz, 1, 0, 0, 0, 0, 1); - return this; - } - - compose(position, quaternion, scale) { - const te = this.elements; - const x = quaternion._x, - y = quaternion._y, - z = quaternion._z, - w = quaternion._w; - const x2 = x + x, - y2 = y + y, - z2 = z + z; - const xx = x * x2, - xy = x * y2, - xz = x * z2; - const yy = y * y2, - yz = y * z2, - zz = z * z2; - const wx = w * x2, - wy = w * y2, - wz = w * z2; - const sx = scale.x, - sy = scale.y, - sz = scale.z; - te[0] = (1 - (yy + zz)) * sx; - te[1] = (xy + wz) * sx; - te[2] = (xz - wy) * sx; - te[3] = 0; - te[4] = (xy - wz) * sy; - te[5] = (1 - (xx + zz)) * sy; - te[6] = (yz + wx) * sy; - te[7] = 0; - te[8] = (xz + wy) * sz; - te[9] = (yz - wx) * sz; - te[10] = (1 - (xx + yy)) * sz; - te[11] = 0; - te[12] = position.x; - te[13] = position.y; - te[14] = position.z; - te[15] = 1; - return this; - } - - decompose(position, quaternion, scale) { - const te = this.elements; - - let sx = _v1$5.set(te[0], te[1], te[2]).length(); - - const sy = _v1$5.set(te[4], te[5], te[6]).length(); - - const sz = _v1$5.set(te[8], te[9], te[10]).length(); // if determine is negative, we need to invert one scale - - - const det = this.determinant(); - if (det < 0) sx = -sx; - position.x = te[12]; - position.y = te[13]; - position.z = te[14]; // scale the rotation part - - _m1$2.copy(this); - - const invSX = 1 / sx; - const invSY = 1 / sy; - const invSZ = 1 / sz; - _m1$2.elements[0] *= invSX; - _m1$2.elements[1] *= invSX; - _m1$2.elements[2] *= invSX; - _m1$2.elements[4] *= invSY; - _m1$2.elements[5] *= invSY; - _m1$2.elements[6] *= invSY; - _m1$2.elements[8] *= invSZ; - _m1$2.elements[9] *= invSZ; - _m1$2.elements[10] *= invSZ; - quaternion.setFromRotationMatrix(_m1$2); - scale.x = sx; - scale.y = sy; - scale.z = sz; - return this; - } - - makePerspective(left, right, top, bottom, near, far) { - if (far === undefined) { - console.warn('THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.'); - } - - const te = this.elements; - const x = 2 * near / (right - left); - const y = 2 * near / (top - bottom); - const a = (right + left) / (right - left); - const b = (top + bottom) / (top - bottom); - const c = -(far + near) / (far - near); - const d = -2 * far * near / (far - near); - te[0] = x; - te[4] = 0; - te[8] = a; - te[12] = 0; - te[1] = 0; - te[5] = y; - te[9] = b; - te[13] = 0; - te[2] = 0; - te[6] = 0; - te[10] = c; - te[14] = d; - te[3] = 0; - te[7] = 0; - te[11] = -1; - te[15] = 0; - return this; - } - - makeOrthographic(left, right, top, bottom, near, far) { - const te = this.elements; - const w = 1.0 / (right - left); - const h = 1.0 / (top - bottom); - const p = 1.0 / (far - near); - const x = (right + left) * w; - const y = (top + bottom) * h; - const z = (far + near) * p; - te[0] = 2 * w; - te[4] = 0; - te[8] = 0; - te[12] = -x; - te[1] = 0; - te[5] = 2 * h; - te[9] = 0; - te[13] = -y; - te[2] = 0; - te[6] = 0; - te[10] = -2 * p; - te[14] = -z; - te[3] = 0; - te[7] = 0; - te[11] = 0; - te[15] = 1; - return this; - } - - equals(matrix) { - const te = this.elements; - const me = matrix.elements; - - for (let i = 0; i < 16; i++) { - if (te[i] !== me[i]) return false; - } - - return true; - } - - fromArray(array, offset = 0) { - for (let i = 0; i < 16; i++) { - this.elements[i] = array[i + offset]; - } - - return this; - } - - toArray(array = [], offset = 0) { - const te = this.elements; - array[offset] = te[0]; - array[offset + 1] = te[1]; - array[offset + 2] = te[2]; - array[offset + 3] = te[3]; - array[offset + 4] = te[4]; - array[offset + 5] = te[5]; - array[offset + 6] = te[6]; - array[offset + 7] = te[7]; - array[offset + 8] = te[8]; - array[offset + 9] = te[9]; - array[offset + 10] = te[10]; - array[offset + 11] = te[11]; - array[offset + 12] = te[12]; - array[offset + 13] = te[13]; - array[offset + 14] = te[14]; - array[offset + 15] = te[15]; - return array; - } - - } - - Matrix4.prototype.isMatrix4 = true; - - const _v1$5 = /*@__PURE__*/new Vector3(); - - const _m1$2 = /*@__PURE__*/new Matrix4(); - - const _zero = /*@__PURE__*/new Vector3(0, 0, 0); - - const _one = /*@__PURE__*/new Vector3(1, 1, 1); - - const _x = /*@__PURE__*/new Vector3(); - - const _y = /*@__PURE__*/new Vector3(); - - const _z = /*@__PURE__*/new Vector3(); - - const _matrix$1 = /*@__PURE__*/new Matrix4(); - - const _quaternion$3 = /*@__PURE__*/new Quaternion(); - - class Euler { - constructor(x = 0, y = 0, z = 0, order = Euler.DefaultOrder) { - this._x = x; - this._y = y; - this._z = z; - this._order = order; - } - - get x() { - return this._x; - } - - set x(value) { - this._x = value; - - this._onChangeCallback(); - } - - get y() { - return this._y; - } - - set y(value) { - this._y = value; - - this._onChangeCallback(); - } - - get z() { - return this._z; - } - - set z(value) { - this._z = value; - - this._onChangeCallback(); - } - - get order() { - return this._order; - } - - set order(value) { - this._order = value; - - this._onChangeCallback(); - } - - set(x, y, z, order = this._order) { - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this._onChangeCallback(); - - return this; - } - - clone() { - return new this.constructor(this._x, this._y, this._z, this._order); - } - - copy(euler) { - this._x = euler._x; - this._y = euler._y; - this._z = euler._z; - this._order = euler._order; - - this._onChangeCallback(); - - return this; - } - - setFromRotationMatrix(m, order = this._order, update = true) { - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - const te = m.elements; - const m11 = te[0], - m12 = te[4], - m13 = te[8]; - const m21 = te[1], - m22 = te[5], - m23 = te[9]; - const m31 = te[2], - m32 = te[6], - m33 = te[10]; - - switch (order) { - case 'XYZ': - this._y = Math.asin(clamp(m13, -1, 1)); - - if (Math.abs(m13) < 0.9999999) { - this._x = Math.atan2(-m23, m33); - this._z = Math.atan2(-m12, m11); - } else { - this._x = Math.atan2(m32, m22); - this._z = 0; - } - - break; - - case 'YXZ': - this._x = Math.asin(-clamp(m23, -1, 1)); - - if (Math.abs(m23) < 0.9999999) { - this._y = Math.atan2(m13, m33); - this._z = Math.atan2(m21, m22); - } else { - this._y = Math.atan2(-m31, m11); - this._z = 0; - } - - break; - - case 'ZXY': - this._x = Math.asin(clamp(m32, -1, 1)); - - if (Math.abs(m32) < 0.9999999) { - this._y = Math.atan2(-m31, m33); - this._z = Math.atan2(-m12, m22); - } else { - this._y = 0; - this._z = Math.atan2(m21, m11); - } - - break; - - case 'ZYX': - this._y = Math.asin(-clamp(m31, -1, 1)); - - if (Math.abs(m31) < 0.9999999) { - this._x = Math.atan2(m32, m33); - this._z = Math.atan2(m21, m11); - } else { - this._x = 0; - this._z = Math.atan2(-m12, m22); - } - - break; - - case 'YZX': - this._z = Math.asin(clamp(m21, -1, 1)); - - if (Math.abs(m21) < 0.9999999) { - this._x = Math.atan2(-m23, m22); - this._y = Math.atan2(-m31, m11); - } else { - this._x = 0; - this._y = Math.atan2(m13, m33); - } - - break; - - case 'XZY': - this._z = Math.asin(-clamp(m12, -1, 1)); - - if (Math.abs(m12) < 0.9999999) { - this._x = Math.atan2(m32, m22); - this._y = Math.atan2(m13, m11); - } else { - this._x = Math.atan2(-m23, m33); - this._y = 0; - } - - break; - - default: - console.warn('THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order); - } - - this._order = order; - if (update === true) this._onChangeCallback(); - return this; - } - - setFromQuaternion(q, order, update) { - _matrix$1.makeRotationFromQuaternion(q); - - return this.setFromRotationMatrix(_matrix$1, order, update); - } - - setFromVector3(v, order = this._order) { - return this.set(v.x, v.y, v.z, order); - } - - reorder(newOrder) { - // WARNING: this discards revolution information -bhouston - _quaternion$3.setFromEuler(this); - - return this.setFromQuaternion(_quaternion$3, newOrder); - } - - equals(euler) { - return euler._x === this._x && euler._y === this._y && euler._z === this._z && euler._order === this._order; - } - - fromArray(array) { - this._x = array[0]; - this._y = array[1]; - this._z = array[2]; - if (array[3] !== undefined) this._order = array[3]; - - this._onChangeCallback(); - - return this; - } - - toArray(array = [], offset = 0) { - array[offset] = this._x; - array[offset + 1] = this._y; - array[offset + 2] = this._z; - array[offset + 3] = this._order; - return array; - } - - toVector3(optionalResult) { - if (optionalResult) { - return optionalResult.set(this._x, this._y, this._z); - } else { - return new Vector3(this._x, this._y, this._z); - } - } - - _onChange(callback) { - this._onChangeCallback = callback; - return this; - } - - _onChangeCallback() {} - - } - - Euler.prototype.isEuler = true; - Euler.DefaultOrder = 'XYZ'; - Euler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX']; - - class Layers { - constructor() { - this.mask = 1 | 0; - } - - set(channel) { - this.mask = 1 << channel | 0; - } - - enable(channel) { - this.mask |= 1 << channel | 0; - } - - enableAll() { - this.mask = 0xffffffff | 0; - } - - toggle(channel) { - this.mask ^= 1 << channel | 0; - } - - disable(channel) { - this.mask &= ~(1 << channel | 0); - } - - disableAll() { - this.mask = 0; - } - - test(layers) { - return (this.mask & layers.mask) !== 0; - } - - } - - let _object3DId = 0; - - const _v1$4 = /*@__PURE__*/new Vector3(); - - const _q1 = /*@__PURE__*/new Quaternion(); - - const _m1$1 = /*@__PURE__*/new Matrix4(); - - const _target = /*@__PURE__*/new Vector3(); - - const _position$3 = /*@__PURE__*/new Vector3(); - - const _scale$2 = /*@__PURE__*/new Vector3(); - - const _quaternion$2 = /*@__PURE__*/new Quaternion(); - - const _xAxis = /*@__PURE__*/new Vector3(1, 0, 0); - - const _yAxis = /*@__PURE__*/new Vector3(0, 1, 0); - - const _zAxis = /*@__PURE__*/new Vector3(0, 0, 1); - - const _addedEvent = { - type: 'added' - }; - const _removedEvent = { - type: 'removed' - }; - - class Object3D extends EventDispatcher { - constructor() { - super(); - Object.defineProperty(this, 'id', { - value: _object3DId++ - }); - this.uuid = generateUUID(); - this.name = ''; - this.type = 'Object3D'; - this.parent = null; - this.children = []; - this.up = Object3D.DefaultUp.clone(); - const position = new Vector3(); - const rotation = new Euler(); - const quaternion = new Quaternion(); - const scale = new Vector3(1, 1, 1); - - function onRotationChange() { - quaternion.setFromEuler(rotation, false); - } - - function onQuaternionChange() { - rotation.setFromQuaternion(quaternion, undefined, false); - } - - rotation._onChange(onRotationChange); - - quaternion._onChange(onQuaternionChange); - - Object.defineProperties(this, { - position: { - configurable: true, - enumerable: true, - value: position - }, - rotation: { - configurable: true, - enumerable: true, - value: rotation - }, - quaternion: { - configurable: true, - enumerable: true, - value: quaternion - }, - scale: { - configurable: true, - enumerable: true, - value: scale - }, - modelViewMatrix: { - value: new Matrix4() - }, - normalMatrix: { - value: new Matrix3() - } - }); - this.matrix = new Matrix4(); - this.matrixWorld = new Matrix4(); - this.matrixAutoUpdate = Object3D.DefaultMatrixAutoUpdate; - this.matrixWorldNeedsUpdate = false; - this.layers = new Layers(); - this.visible = true; - this.castShadow = false; - this.receiveShadow = false; - this.frustumCulled = true; - this.renderOrder = 0; - this.animations = []; - this.userData = {}; - } - - onBeforeRender() {} - - onAfterRender() {} - - applyMatrix4(matrix) { - if (this.matrixAutoUpdate) this.updateMatrix(); - this.matrix.premultiply(matrix); - this.matrix.decompose(this.position, this.quaternion, this.scale); - } - - applyQuaternion(q) { - this.quaternion.premultiply(q); - return this; - } - - setRotationFromAxisAngle(axis, angle) { - // assumes axis is normalized - this.quaternion.setFromAxisAngle(axis, angle); - } - - setRotationFromEuler(euler) { - this.quaternion.setFromEuler(euler, true); - } - - setRotationFromMatrix(m) { - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - this.quaternion.setFromRotationMatrix(m); - } - - setRotationFromQuaternion(q) { - // assumes q is normalized - this.quaternion.copy(q); - } - - rotateOnAxis(axis, angle) { - // rotate object on axis in object space - // axis is assumed to be normalized - _q1.setFromAxisAngle(axis, angle); - - this.quaternion.multiply(_q1); - return this; - } - - rotateOnWorldAxis(axis, angle) { - // rotate object on axis in world space - // axis is assumed to be normalized - // method assumes no rotated parent - _q1.setFromAxisAngle(axis, angle); - - this.quaternion.premultiply(_q1); - return this; - } - - rotateX(angle) { - return this.rotateOnAxis(_xAxis, angle); - } - - rotateY(angle) { - return this.rotateOnAxis(_yAxis, angle); - } - - rotateZ(angle) { - return this.rotateOnAxis(_zAxis, angle); - } - - translateOnAxis(axis, distance) { - // translate object by distance along axis in object space - // axis is assumed to be normalized - _v1$4.copy(axis).applyQuaternion(this.quaternion); - - this.position.add(_v1$4.multiplyScalar(distance)); - return this; - } - - translateX(distance) { - return this.translateOnAxis(_xAxis, distance); - } - - translateY(distance) { - return this.translateOnAxis(_yAxis, distance); - } - - translateZ(distance) { - return this.translateOnAxis(_zAxis, distance); - } - - localToWorld(vector) { - return vector.applyMatrix4(this.matrixWorld); - } - - worldToLocal(vector) { - return vector.applyMatrix4(_m1$1.copy(this.matrixWorld).invert()); - } - - lookAt(x, y, z) { - // This method does not support objects having non-uniformly-scaled parent(s) - if (x.isVector3) { - _target.copy(x); - } else { - _target.set(x, y, z); - } - - const parent = this.parent; - this.updateWorldMatrix(true, false); - - _position$3.setFromMatrixPosition(this.matrixWorld); - - if (this.isCamera || this.isLight) { - _m1$1.lookAt(_position$3, _target, this.up); - } else { - _m1$1.lookAt(_target, _position$3, this.up); - } - - this.quaternion.setFromRotationMatrix(_m1$1); - - if (parent) { - _m1$1.extractRotation(parent.matrixWorld); - - _q1.setFromRotationMatrix(_m1$1); - - this.quaternion.premultiply(_q1.invert()); - } - } - - add(object) { - if (arguments.length > 1) { - for (let i = 0; i < arguments.length; i++) { - this.add(arguments[i]); - } - - return this; - } - - if (object === this) { - console.error('THREE.Object3D.add: object can\'t be added as a child of itself.', object); - return this; - } - - if (object && object.isObject3D) { - if (object.parent !== null) { - object.parent.remove(object); - } - - object.parent = this; - this.children.push(object); - object.dispatchEvent(_addedEvent); - } else { - console.error('THREE.Object3D.add: object not an instance of THREE.Object3D.', object); - } - - return this; - } - - remove(object) { - if (arguments.length > 1) { - for (let i = 0; i < arguments.length; i++) { - this.remove(arguments[i]); - } - - return this; - } - - const index = this.children.indexOf(object); - - if (index !== -1) { - object.parent = null; - this.children.splice(index, 1); - object.dispatchEvent(_removedEvent); - } - - return this; - } - - removeFromParent() { - const parent = this.parent; - - if (parent !== null) { - parent.remove(this); - } - - return this; - } - - clear() { - for (let i = 0; i < this.children.length; i++) { - const object = this.children[i]; - object.parent = null; - object.dispatchEvent(_removedEvent); - } - - this.children.length = 0; - return this; - } - - attach(object) { - // adds object as a child of this, while maintaining the object's world transform - this.updateWorldMatrix(true, false); - - _m1$1.copy(this.matrixWorld).invert(); - - if (object.parent !== null) { - object.parent.updateWorldMatrix(true, false); - - _m1$1.multiply(object.parent.matrixWorld); - } - - object.applyMatrix4(_m1$1); - this.add(object); - object.updateWorldMatrix(false, true); - return this; - } - - getObjectById(id) { - return this.getObjectByProperty('id', id); - } - - getObjectByName(name) { - return this.getObjectByProperty('name', name); - } - - getObjectByProperty(name, value) { - if (this[name] === value) return this; - - for (let i = 0, l = this.children.length; i < l; i++) { - const child = this.children[i]; - const object = child.getObjectByProperty(name, value); - - if (object !== undefined) { - return object; - } - } - - return undefined; - } - - getWorldPosition(target) { - this.updateWorldMatrix(true, false); - return target.setFromMatrixPosition(this.matrixWorld); - } - - getWorldQuaternion(target) { - this.updateWorldMatrix(true, false); - this.matrixWorld.decompose(_position$3, target, _scale$2); - return target; - } - - getWorldScale(target) { - this.updateWorldMatrix(true, false); - this.matrixWorld.decompose(_position$3, _quaternion$2, target); - return target; - } - - getWorldDirection(target) { - this.updateWorldMatrix(true, false); - const e = this.matrixWorld.elements; - return target.set(e[8], e[9], e[10]).normalize(); - } - - raycast() {} - - traverse(callback) { - callback(this); - const children = this.children; - - for (let i = 0, l = children.length; i < l; i++) { - children[i].traverse(callback); - } - } - - traverseVisible(callback) { - if (this.visible === false) return; - callback(this); - const children = this.children; - - for (let i = 0, l = children.length; i < l; i++) { - children[i].traverseVisible(callback); - } - } - - traverseAncestors(callback) { - const parent = this.parent; - - if (parent !== null) { - callback(parent); - parent.traverseAncestors(callback); - } - } - - updateMatrix() { - this.matrix.compose(this.position, this.quaternion, this.scale); - this.matrixWorldNeedsUpdate = true; - } - - updateMatrixWorld(force) { - if (this.matrixAutoUpdate) this.updateMatrix(); - - if (this.matrixWorldNeedsUpdate || force) { - if (this.parent === null) { - this.matrixWorld.copy(this.matrix); - } else { - this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix); - } - - this.matrixWorldNeedsUpdate = false; - force = true; - } // update children - - - const children = this.children; - - for (let i = 0, l = children.length; i < l; i++) { - children[i].updateMatrixWorld(force); - } - } - - updateWorldMatrix(updateParents, updateChildren) { - const parent = this.parent; - - if (updateParents === true && parent !== null) { - parent.updateWorldMatrix(true, false); - } - - if (this.matrixAutoUpdate) this.updateMatrix(); - - if (this.parent === null) { - this.matrixWorld.copy(this.matrix); - } else { - this.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix); - } // update children - - - if (updateChildren === true) { - const children = this.children; - - for (let i = 0, l = children.length; i < l; i++) { - children[i].updateWorldMatrix(false, true); - } - } - } - - toJSON(meta) { - // meta is a string when called from JSON.stringify - const isRootObject = meta === undefined || typeof meta === 'string'; - const output = {}; // meta is a hash used to collect geometries, materials. - // not providing it implies that this is the root object - // being serialized. - - if (isRootObject) { - // initialize meta obj - meta = { - geometries: {}, - materials: {}, - textures: {}, - images: {}, - shapes: {}, - skeletons: {}, - animations: {} - }; - output.metadata = { - version: 4.5, - type: 'Object', - generator: 'Object3D.toJSON' - }; - } // standard Object3D serialization - - - const object = {}; - object.uuid = this.uuid; - object.type = this.type; - if (this.name !== '') object.name = this.name; - if (this.castShadow === true) object.castShadow = true; - if (this.receiveShadow === true) object.receiveShadow = true; - if (this.visible === false) object.visible = false; - if (this.frustumCulled === false) object.frustumCulled = false; - if (this.renderOrder !== 0) object.renderOrder = this.renderOrder; - if (JSON.stringify(this.userData) !== '{}') object.userData = this.userData; - object.layers = this.layers.mask; - object.matrix = this.matrix.toArray(); - if (this.matrixAutoUpdate === false) object.matrixAutoUpdate = false; // object specific properties - - if (this.isInstancedMesh) { - object.type = 'InstancedMesh'; - object.count = this.count; - object.instanceMatrix = this.instanceMatrix.toJSON(); - if (this.instanceColor !== null) object.instanceColor = this.instanceColor.toJSON(); - } // - - - function serialize(library, element) { - if (library[element.uuid] === undefined) { - library[element.uuid] = element.toJSON(meta); - } - - return element.uuid; - } - - if (this.isScene) { - if (this.background) { - if (this.background.isColor) { - object.background = this.background.toJSON(); - } else if (this.background.isTexture) { - object.background = this.background.toJSON(meta).uuid; - } - } - - if (this.environment && this.environment.isTexture) { - object.environment = this.environment.toJSON(meta).uuid; - } - } else if (this.isMesh || this.isLine || this.isPoints) { - object.geometry = serialize(meta.geometries, this.geometry); - const parameters = this.geometry.parameters; - - if (parameters !== undefined && parameters.shapes !== undefined) { - const shapes = parameters.shapes; - - if (Array.isArray(shapes)) { - for (let i = 0, l = shapes.length; i < l; i++) { - const shape = shapes[i]; - serialize(meta.shapes, shape); - } - } else { - serialize(meta.shapes, shapes); - } - } - } - - if (this.isSkinnedMesh) { - object.bindMode = this.bindMode; - object.bindMatrix = this.bindMatrix.toArray(); - - if (this.skeleton !== undefined) { - serialize(meta.skeletons, this.skeleton); - object.skeleton = this.skeleton.uuid; - } - } - - if (this.material !== undefined) { - if (Array.isArray(this.material)) { - const uuids = []; - - for (let i = 0, l = this.material.length; i < l; i++) { - uuids.push(serialize(meta.materials, this.material[i])); - } - - object.material = uuids; - } else { - object.material = serialize(meta.materials, this.material); - } - } // - - - if (this.children.length > 0) { - object.children = []; - - for (let i = 0; i < this.children.length; i++) { - object.children.push(this.children[i].toJSON(meta).object); - } - } // - - - if (this.animations.length > 0) { - object.animations = []; - - for (let i = 0; i < this.animations.length; i++) { - const animation = this.animations[i]; - object.animations.push(serialize(meta.animations, animation)); - } - } - - if (isRootObject) { - const geometries = extractFromCache(meta.geometries); - const materials = extractFromCache(meta.materials); - const textures = extractFromCache(meta.textures); - const images = extractFromCache(meta.images); - const shapes = extractFromCache(meta.shapes); - const skeletons = extractFromCache(meta.skeletons); - const animations = extractFromCache(meta.animations); - if (geometries.length > 0) output.geometries = geometries; - if (materials.length > 0) output.materials = materials; - if (textures.length > 0) output.textures = textures; - if (images.length > 0) output.images = images; - if (shapes.length > 0) output.shapes = shapes; - if (skeletons.length > 0) output.skeletons = skeletons; - if (animations.length > 0) output.animations = animations; - } - - output.object = object; - return output; // extract data from the cache hash - // remove metadata on each item - // and return as array - - function extractFromCache(cache) { - const values = []; - - for (const key in cache) { - const data = cache[key]; - delete data.metadata; - values.push(data); - } - - return values; - } - } - - clone(recursive) { - return new this.constructor().copy(this, recursive); - } - - copy(source, recursive = true) { - this.name = source.name; - this.up.copy(source.up); - this.position.copy(source.position); - this.rotation.order = source.rotation.order; - this.quaternion.copy(source.quaternion); - this.scale.copy(source.scale); - this.matrix.copy(source.matrix); - this.matrixWorld.copy(source.matrixWorld); - this.matrixAutoUpdate = source.matrixAutoUpdate; - this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate; - this.layers.mask = source.layers.mask; - this.visible = source.visible; - this.castShadow = source.castShadow; - this.receiveShadow = source.receiveShadow; - this.frustumCulled = source.frustumCulled; - this.renderOrder = source.renderOrder; - this.userData = JSON.parse(JSON.stringify(source.userData)); - - if (recursive === true) { - for (let i = 0; i < source.children.length; i++) { - const child = source.children[i]; - this.add(child.clone()); - } - } - - return this; - } - - } - - Object3D.DefaultUp = new Vector3(0, 1, 0); - Object3D.DefaultMatrixAutoUpdate = true; - Object3D.prototype.isObject3D = true; - - const _v0$1 = /*@__PURE__*/new Vector3(); - - const _v1$3 = /*@__PURE__*/new Vector3(); - - const _v2$2 = /*@__PURE__*/new Vector3(); - - const _v3$1 = /*@__PURE__*/new Vector3(); - - const _vab = /*@__PURE__*/new Vector3(); - - const _vac = /*@__PURE__*/new Vector3(); - - const _vbc = /*@__PURE__*/new Vector3(); - - const _vap = /*@__PURE__*/new Vector3(); - - const _vbp = /*@__PURE__*/new Vector3(); - - const _vcp = /*@__PURE__*/new Vector3(); - - class Triangle { - constructor(a = new Vector3(), b = new Vector3(), c = new Vector3()) { - this.a = a; - this.b = b; - this.c = c; - } - - static getNormal(a, b, c, target) { - target.subVectors(c, b); - - _v0$1.subVectors(a, b); - - target.cross(_v0$1); - const targetLengthSq = target.lengthSq(); - - if (targetLengthSq > 0) { - return target.multiplyScalar(1 / Math.sqrt(targetLengthSq)); - } - - return target.set(0, 0, 0); - } // static/instance method to calculate barycentric coordinates - // based on: http://www.blackpawn.com/texts/pointinpoly/default.html - - - static getBarycoord(point, a, b, c, target) { - _v0$1.subVectors(c, a); - - _v1$3.subVectors(b, a); - - _v2$2.subVectors(point, a); - - const dot00 = _v0$1.dot(_v0$1); - - const dot01 = _v0$1.dot(_v1$3); - - const dot02 = _v0$1.dot(_v2$2); - - const dot11 = _v1$3.dot(_v1$3); - - const dot12 = _v1$3.dot(_v2$2); - - const denom = dot00 * dot11 - dot01 * dot01; // collinear or singular triangle - - if (denom === 0) { - // arbitrary location outside of triangle? - // not sure if this is the best idea, maybe should be returning undefined - return target.set(-2, -1, -1); - } - - const invDenom = 1 / denom; - const u = (dot11 * dot02 - dot01 * dot12) * invDenom; - const v = (dot00 * dot12 - dot01 * dot02) * invDenom; // barycentric coordinates must always sum to 1 - - return target.set(1 - u - v, v, u); - } - - static containsPoint(point, a, b, c) { - this.getBarycoord(point, a, b, c, _v3$1); - return _v3$1.x >= 0 && _v3$1.y >= 0 && _v3$1.x + _v3$1.y <= 1; - } - - static getUV(point, p1, p2, p3, uv1, uv2, uv3, target) { - this.getBarycoord(point, p1, p2, p3, _v3$1); - target.set(0, 0); - target.addScaledVector(uv1, _v3$1.x); - target.addScaledVector(uv2, _v3$1.y); - target.addScaledVector(uv3, _v3$1.z); - return target; - } - - static isFrontFacing(a, b, c, direction) { - _v0$1.subVectors(c, b); - - _v1$3.subVectors(a, b); // strictly front facing - - - return _v0$1.cross(_v1$3).dot(direction) < 0 ? true : false; - } - - set(a, b, c) { - this.a.copy(a); - this.b.copy(b); - this.c.copy(c); - return this; - } - - setFromPointsAndIndices(points, i0, i1, i2) { - this.a.copy(points[i0]); - this.b.copy(points[i1]); - this.c.copy(points[i2]); - return this; - } - - clone() { - return new this.constructor().copy(this); - } - - copy(triangle) { - this.a.copy(triangle.a); - this.b.copy(triangle.b); - this.c.copy(triangle.c); - return this; - } - - getArea() { - _v0$1.subVectors(this.c, this.b); - - _v1$3.subVectors(this.a, this.b); - - return _v0$1.cross(_v1$3).length() * 0.5; - } - - getMidpoint(target) { - return target.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3); - } - - getNormal(target) { - return Triangle.getNormal(this.a, this.b, this.c, target); - } - - getPlane(target) { - return target.setFromCoplanarPoints(this.a, this.b, this.c); - } - - getBarycoord(point, target) { - return Triangle.getBarycoord(point, this.a, this.b, this.c, target); - } - - getUV(point, uv1, uv2, uv3, target) { - return Triangle.getUV(point, this.a, this.b, this.c, uv1, uv2, uv3, target); - } - - containsPoint(point) { - return Triangle.containsPoint(point, this.a, this.b, this.c); - } - - isFrontFacing(direction) { - return Triangle.isFrontFacing(this.a, this.b, this.c, direction); - } - - intersectsBox(box) { - return box.intersectsTriangle(this); - } - - closestPointToPoint(p, target) { - const a = this.a, - b = this.b, - c = this.c; - let v, w; // algorithm thanks to Real-Time Collision Detection by Christer Ericson, - // published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc., - // under the accompanying license; see chapter 5.1.5 for detailed explanation. - // basically, we're distinguishing which of the voronoi regions of the triangle - // the point lies in with the minimum amount of redundant computation. - - _vab.subVectors(b, a); - - _vac.subVectors(c, a); - - _vap.subVectors(p, a); - - const d1 = _vab.dot(_vap); - - const d2 = _vac.dot(_vap); - - if (d1 <= 0 && d2 <= 0) { - // vertex region of A; barycentric coords (1, 0, 0) - return target.copy(a); - } - - _vbp.subVectors(p, b); - - const d3 = _vab.dot(_vbp); - - const d4 = _vac.dot(_vbp); - - if (d3 >= 0 && d4 <= d3) { - // vertex region of B; barycentric coords (0, 1, 0) - return target.copy(b); - } - - const vc = d1 * d4 - d3 * d2; - - if (vc <= 0 && d1 >= 0 && d3 <= 0) { - v = d1 / (d1 - d3); // edge region of AB; barycentric coords (1-v, v, 0) - - return target.copy(a).addScaledVector(_vab, v); - } - - _vcp.subVectors(p, c); - - const d5 = _vab.dot(_vcp); - - const d6 = _vac.dot(_vcp); - - if (d6 >= 0 && d5 <= d6) { - // vertex region of C; barycentric coords (0, 0, 1) - return target.copy(c); - } - - const vb = d5 * d2 - d1 * d6; - - if (vb <= 0 && d2 >= 0 && d6 <= 0) { - w = d2 / (d2 - d6); // edge region of AC; barycentric coords (1-w, 0, w) - - return target.copy(a).addScaledVector(_vac, w); - } - - const va = d3 * d6 - d5 * d4; - - if (va <= 0 && d4 - d3 >= 0 && d5 - d6 >= 0) { - _vbc.subVectors(c, b); - - w = (d4 - d3) / (d4 - d3 + (d5 - d6)); // edge region of BC; barycentric coords (0, 1-w, w) - - return target.copy(b).addScaledVector(_vbc, w); // edge region of BC - } // face region - - - const denom = 1 / (va + vb + vc); // u = va * denom - - v = vb * denom; - w = vc * denom; - return target.copy(a).addScaledVector(_vab, v).addScaledVector(_vac, w); - } - - equals(triangle) { - return triangle.a.equals(this.a) && triangle.b.equals(this.b) && triangle.c.equals(this.c); - } - - } - - let materialId = 0; - - class Material extends EventDispatcher { - constructor() { - super(); - Object.defineProperty(this, 'id', { - value: materialId++ - }); - this.uuid = generateUUID(); - this.name = ''; - this.type = 'Material'; - this.fog = true; - this.blending = NormalBlending; - this.side = FrontSide; - this.vertexColors = false; - this.opacity = 1; - this.transparent = false; - this.blendSrc = SrcAlphaFactor; - this.blendDst = OneMinusSrcAlphaFactor; - this.blendEquation = AddEquation; - this.blendSrcAlpha = null; - this.blendDstAlpha = null; - this.blendEquationAlpha = null; - this.depthFunc = LessEqualDepth; - this.depthTest = true; - this.depthWrite = true; - this.stencilWriteMask = 0xff; - this.stencilFunc = AlwaysStencilFunc; - this.stencilRef = 0; - this.stencilFuncMask = 0xff; - this.stencilFail = KeepStencilOp; - this.stencilZFail = KeepStencilOp; - this.stencilZPass = KeepStencilOp; - this.stencilWrite = false; - this.clippingPlanes = null; - this.clipIntersection = false; - this.clipShadows = false; - this.shadowSide = null; - this.colorWrite = true; - this.precision = null; // override the renderer's default precision for this material - - this.polygonOffset = false; - this.polygonOffsetFactor = 0; - this.polygonOffsetUnits = 0; - this.dithering = false; - this.alphaTest = 0; - this.alphaToCoverage = false; - this.premultipliedAlpha = false; - this.visible = true; - this.toneMapped = true; - this.userData = {}; - this.version = 0; - } - - onBuild() - /* shaderobject, renderer */ - {} - - onBeforeCompile() - /* shaderobject, renderer */ - {} - - customProgramCacheKey() { - return this.onBeforeCompile.toString(); - } - - setValues(values) { - if (values === undefined) return; - - for (const key in values) { - const newValue = values[key]; - - if (newValue === undefined) { - console.warn('THREE.Material: \'' + key + '\' parameter is undefined.'); - continue; - } // for backward compatability if shading is set in the constructor - - - if (key === 'shading') { - console.warn('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.'); - this.flatShading = newValue === FlatShading ? true : false; - continue; - } - - const currentValue = this[key]; - - if (currentValue === undefined) { - console.warn('THREE.' + this.type + ': \'' + key + '\' is not a property of this material.'); - continue; - } - - if (currentValue && currentValue.isColor) { - currentValue.set(newValue); - } else if (currentValue && currentValue.isVector3 && newValue && newValue.isVector3) { - currentValue.copy(newValue); - } else { - this[key] = newValue; - } - } - } - - toJSON(meta) { - const isRoot = meta === undefined || typeof meta === 'string'; - - if (isRoot) { - meta = { - textures: {}, - images: {} - }; - } - - const data = { - metadata: { - version: 4.5, - type: 'Material', - generator: 'Material.toJSON' - } - }; // standard Material serialization - - data.uuid = this.uuid; - data.type = this.type; - if (this.name !== '') data.name = this.name; - if (this.color && this.color.isColor) data.color = this.color.getHex(); - if (this.roughness !== undefined) data.roughness = this.roughness; - if (this.metalness !== undefined) data.metalness = this.metalness; - if (this.sheen && this.sheen.isColor) data.sheen = this.sheen.getHex(); - if (this.emissive && this.emissive.isColor) data.emissive = this.emissive.getHex(); - if (this.emissiveIntensity && this.emissiveIntensity !== 1) data.emissiveIntensity = this.emissiveIntensity; - if (this.specular && this.specular.isColor) data.specular = this.specular.getHex(); - if (this.shininess !== undefined) data.shininess = this.shininess; - if (this.clearcoat !== undefined) data.clearcoat = this.clearcoat; - if (this.clearcoatRoughness !== undefined) data.clearcoatRoughness = this.clearcoatRoughness; - - if (this.clearcoatMap && this.clearcoatMap.isTexture) { - data.clearcoatMap = this.clearcoatMap.toJSON(meta).uuid; - } - - if (this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture) { - data.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(meta).uuid; - } - - if (this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture) { - data.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(meta).uuid; - data.clearcoatNormalScale = this.clearcoatNormalScale.toArray(); - } - - if (this.map && this.map.isTexture) data.map = this.map.toJSON(meta).uuid; - if (this.matcap && this.matcap.isTexture) data.matcap = this.matcap.toJSON(meta).uuid; - if (this.alphaMap && this.alphaMap.isTexture) data.alphaMap = this.alphaMap.toJSON(meta).uuid; - - if (this.lightMap && this.lightMap.isTexture) { - data.lightMap = this.lightMap.toJSON(meta).uuid; - data.lightMapIntensity = this.lightMapIntensity; - } - - if (this.aoMap && this.aoMap.isTexture) { - data.aoMap = this.aoMap.toJSON(meta).uuid; - data.aoMapIntensity = this.aoMapIntensity; - } - - if (this.bumpMap && this.bumpMap.isTexture) { - data.bumpMap = this.bumpMap.toJSON(meta).uuid; - data.bumpScale = this.bumpScale; - } - - if (this.normalMap && this.normalMap.isTexture) { - data.normalMap = this.normalMap.toJSON(meta).uuid; - data.normalMapType = this.normalMapType; - data.normalScale = this.normalScale.toArray(); - } - - if (this.displacementMap && this.displacementMap.isTexture) { - data.displacementMap = this.displacementMap.toJSON(meta).uuid; - data.displacementScale = this.displacementScale; - data.displacementBias = this.displacementBias; - } - - if (this.roughnessMap && this.roughnessMap.isTexture) data.roughnessMap = this.roughnessMap.toJSON(meta).uuid; - if (this.metalnessMap && this.metalnessMap.isTexture) data.metalnessMap = this.metalnessMap.toJSON(meta).uuid; - if (this.emissiveMap && this.emissiveMap.isTexture) data.emissiveMap = this.emissiveMap.toJSON(meta).uuid; - if (this.specularMap && this.specularMap.isTexture) data.specularMap = this.specularMap.toJSON(meta).uuid; - - if (this.envMap && this.envMap.isTexture) { - data.envMap = this.envMap.toJSON(meta).uuid; - if (this.combine !== undefined) data.combine = this.combine; - } - - if (this.envMapIntensity !== undefined) data.envMapIntensity = this.envMapIntensity; - if (this.reflectivity !== undefined) data.reflectivity = this.reflectivity; - if (this.refractionRatio !== undefined) data.refractionRatio = this.refractionRatio; - - if (this.gradientMap && this.gradientMap.isTexture) { - data.gradientMap = this.gradientMap.toJSON(meta).uuid; - } - - if (this.transmission !== undefined) data.transmission = this.transmission; - if (this.transmissionMap && this.transmissionMap.isTexture) data.transmissionMap = this.transmissionMap.toJSON(meta).uuid; - if (this.thickness !== undefined) data.thickness = this.thickness; - if (this.thicknessMap && this.thicknessMap.isTexture) data.thicknessMap = this.thicknessMap.toJSON(meta).uuid; - if (this.attenuationDistance !== undefined) data.attenuationDistance = this.attenuationDistance; - if (this.attenuationColor !== undefined) data.attenuationColor = this.attenuationColor.getHex(); - if (this.size !== undefined) data.size = this.size; - if (this.shadowSide !== null) data.shadowSide = this.shadowSide; - if (this.sizeAttenuation !== undefined) data.sizeAttenuation = this.sizeAttenuation; - if (this.blending !== NormalBlending) data.blending = this.blending; - if (this.side !== FrontSide) data.side = this.side; - if (this.vertexColors) data.vertexColors = true; - if (this.opacity < 1) data.opacity = this.opacity; - if (this.transparent === true) data.transparent = this.transparent; - data.depthFunc = this.depthFunc; - data.depthTest = this.depthTest; - data.depthWrite = this.depthWrite; - data.colorWrite = this.colorWrite; - data.stencilWrite = this.stencilWrite; - data.stencilWriteMask = this.stencilWriteMask; - data.stencilFunc = this.stencilFunc; - data.stencilRef = this.stencilRef; - data.stencilFuncMask = this.stencilFuncMask; - data.stencilFail = this.stencilFail; - data.stencilZFail = this.stencilZFail; - data.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial) - - if (this.rotation && this.rotation !== 0) data.rotation = this.rotation; - if (this.polygonOffset === true) data.polygonOffset = true; - if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor; - if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits; - if (this.linewidth && this.linewidth !== 1) data.linewidth = this.linewidth; - if (this.dashSize !== undefined) data.dashSize = this.dashSize; - if (this.gapSize !== undefined) data.gapSize = this.gapSize; - if (this.scale !== undefined) data.scale = this.scale; - if (this.dithering === true) data.dithering = true; - if (this.alphaTest > 0) data.alphaTest = this.alphaTest; - if (this.alphaToCoverage === true) data.alphaToCoverage = this.alphaToCoverage; - if (this.premultipliedAlpha === true) data.premultipliedAlpha = this.premultipliedAlpha; - if (this.wireframe === true) data.wireframe = this.wireframe; - if (this.wireframeLinewidth > 1) data.wireframeLinewidth = this.wireframeLinewidth; - if (this.wireframeLinecap !== 'round') data.wireframeLinecap = this.wireframeLinecap; - if (this.wireframeLinejoin !== 'round') data.wireframeLinejoin = this.wireframeLinejoin; - if (this.morphTargets === true) data.morphTargets = true; - if (this.morphNormals === true) data.morphNormals = true; - if (this.flatShading === true) data.flatShading = this.flatShading; - if (this.visible === false) data.visible = false; - if (this.toneMapped === false) data.toneMapped = false; - if (JSON.stringify(this.userData) !== '{}') data.userData = this.userData; // TODO: Copied from Object3D.toJSON - - function extractFromCache(cache) { - const values = []; - - for (const key in cache) { - const data = cache[key]; - delete data.metadata; - values.push(data); - } - - return values; - } - - if (isRoot) { - const textures = extractFromCache(meta.textures); - const images = extractFromCache(meta.images); - if (textures.length > 0) data.textures = textures; - if (images.length > 0) data.images = images; - } - - return data; - } - - clone() { - return new this.constructor().copy(this); - } - - copy(source) { - this.name = source.name; - this.fog = source.fog; - this.blending = source.blending; - this.side = source.side; - this.vertexColors = source.vertexColors; - this.opacity = source.opacity; - this.transparent = source.transparent; - this.blendSrc = source.blendSrc; - this.blendDst = source.blendDst; - this.blendEquation = source.blendEquation; - this.blendSrcAlpha = source.blendSrcAlpha; - this.blendDstAlpha = source.blendDstAlpha; - this.blendEquationAlpha = source.blendEquationAlpha; - this.depthFunc = source.depthFunc; - this.depthTest = source.depthTest; - this.depthWrite = source.depthWrite; - this.stencilWriteMask = source.stencilWriteMask; - this.stencilFunc = source.stencilFunc; - this.stencilRef = source.stencilRef; - this.stencilFuncMask = source.stencilFuncMask; - this.stencilFail = source.stencilFail; - this.stencilZFail = source.stencilZFail; - this.stencilZPass = source.stencilZPass; - this.stencilWrite = source.stencilWrite; - const srcPlanes = source.clippingPlanes; - let dstPlanes = null; - - if (srcPlanes !== null) { - const n = srcPlanes.length; - dstPlanes = new Array(n); - - for (let i = 0; i !== n; ++i) { - dstPlanes[i] = srcPlanes[i].clone(); - } - } - - this.clippingPlanes = dstPlanes; - this.clipIntersection = source.clipIntersection; - this.clipShadows = source.clipShadows; - this.shadowSide = source.shadowSide; - this.colorWrite = source.colorWrite; - this.precision = source.precision; - this.polygonOffset = source.polygonOffset; - this.polygonOffsetFactor = source.polygonOffsetFactor; - this.polygonOffsetUnits = source.polygonOffsetUnits; - this.dithering = source.dithering; - this.alphaTest = source.alphaTest; - this.alphaToCoverage = source.alphaToCoverage; - this.premultipliedAlpha = source.premultipliedAlpha; - this.visible = source.visible; - this.toneMapped = source.toneMapped; - this.userData = JSON.parse(JSON.stringify(source.userData)); - return this; - } - - dispose() { - this.dispatchEvent({ - type: 'dispose' - }); - } - - set needsUpdate(value) { - if (value === true) this.version++; - } - - } - - Material.prototype.isMaterial = true; - - const _colorKeywords = { - 'aliceblue': 0xF0F8FF, - 'antiquewhite': 0xFAEBD7, - 'aqua': 0x00FFFF, - 'aquamarine': 0x7FFFD4, - 'azure': 0xF0FFFF, - 'beige': 0xF5F5DC, - 'bisque': 0xFFE4C4, - 'black': 0x000000, - 'blanchedalmond': 0xFFEBCD, - 'blue': 0x0000FF, - 'blueviolet': 0x8A2BE2, - 'brown': 0xA52A2A, - 'burlywood': 0xDEB887, - 'cadetblue': 0x5F9EA0, - 'chartreuse': 0x7FFF00, - 'chocolate': 0xD2691E, - 'coral': 0xFF7F50, - 'cornflowerblue': 0x6495ED, - 'cornsilk': 0xFFF8DC, - 'crimson': 0xDC143C, - 'cyan': 0x00FFFF, - 'darkblue': 0x00008B, - 'darkcyan': 0x008B8B, - 'darkgoldenrod': 0xB8860B, - 'darkgray': 0xA9A9A9, - 'darkgreen': 0x006400, - 'darkgrey': 0xA9A9A9, - 'darkkhaki': 0xBDB76B, - 'darkmagenta': 0x8B008B, - 'darkolivegreen': 0x556B2F, - 'darkorange': 0xFF8C00, - 'darkorchid': 0x9932CC, - 'darkred': 0x8B0000, - 'darksalmon': 0xE9967A, - 'darkseagreen': 0x8FBC8F, - 'darkslateblue': 0x483D8B, - 'darkslategray': 0x2F4F4F, - 'darkslategrey': 0x2F4F4F, - 'darkturquoise': 0x00CED1, - 'darkviolet': 0x9400D3, - 'deeppink': 0xFF1493, - 'deepskyblue': 0x00BFFF, - 'dimgray': 0x696969, - 'dimgrey': 0x696969, - 'dodgerblue': 0x1E90FF, - 'firebrick': 0xB22222, - 'floralwhite': 0xFFFAF0, - 'forestgreen': 0x228B22, - 'fuchsia': 0xFF00FF, - 'gainsboro': 0xDCDCDC, - 'ghostwhite': 0xF8F8FF, - 'gold': 0xFFD700, - 'goldenrod': 0xDAA520, - 'gray': 0x808080, - 'green': 0x008000, - 'greenyellow': 0xADFF2F, - 'grey': 0x808080, - 'honeydew': 0xF0FFF0, - 'hotpink': 0xFF69B4, - 'indianred': 0xCD5C5C, - 'indigo': 0x4B0082, - 'ivory': 0xFFFFF0, - 'khaki': 0xF0E68C, - 'lavender': 0xE6E6FA, - 'lavenderblush': 0xFFF0F5, - 'lawngreen': 0x7CFC00, - 'lemonchiffon': 0xFFFACD, - 'lightblue': 0xADD8E6, - 'lightcoral': 0xF08080, - 'lightcyan': 0xE0FFFF, - 'lightgoldenrodyellow': 0xFAFAD2, - 'lightgray': 0xD3D3D3, - 'lightgreen': 0x90EE90, - 'lightgrey': 0xD3D3D3, - 'lightpink': 0xFFB6C1, - 'lightsalmon': 0xFFA07A, - 'lightseagreen': 0x20B2AA, - 'lightskyblue': 0x87CEFA, - 'lightslategray': 0x778899, - 'lightslategrey': 0x778899, - 'lightsteelblue': 0xB0C4DE, - 'lightyellow': 0xFFFFE0, - 'lime': 0x00FF00, - 'limegreen': 0x32CD32, - 'linen': 0xFAF0E6, - 'magenta': 0xFF00FF, - 'maroon': 0x800000, - 'mediumaquamarine': 0x66CDAA, - 'mediumblue': 0x0000CD, - 'mediumorchid': 0xBA55D3, - 'mediumpurple': 0x9370DB, - 'mediumseagreen': 0x3CB371, - 'mediumslateblue': 0x7B68EE, - 'mediumspringgreen': 0x00FA9A, - 'mediumturquoise': 0x48D1CC, - 'mediumvioletred': 0xC71585, - 'midnightblue': 0x191970, - 'mintcream': 0xF5FFFA, - 'mistyrose': 0xFFE4E1, - 'moccasin': 0xFFE4B5, - 'navajowhite': 0xFFDEAD, - 'navy': 0x000080, - 'oldlace': 0xFDF5E6, - 'olive': 0x808000, - 'olivedrab': 0x6B8E23, - 'orange': 0xFFA500, - 'orangered': 0xFF4500, - 'orchid': 0xDA70D6, - 'palegoldenrod': 0xEEE8AA, - 'palegreen': 0x98FB98, - 'paleturquoise': 0xAFEEEE, - 'palevioletred': 0xDB7093, - 'papayawhip': 0xFFEFD5, - 'peachpuff': 0xFFDAB9, - 'peru': 0xCD853F, - 'pink': 0xFFC0CB, - 'plum': 0xDDA0DD, - 'powderblue': 0xB0E0E6, - 'purple': 0x800080, - 'rebeccapurple': 0x663399, - 'red': 0xFF0000, - 'rosybrown': 0xBC8F8F, - 'royalblue': 0x4169E1, - 'saddlebrown': 0x8B4513, - 'salmon': 0xFA8072, - 'sandybrown': 0xF4A460, - 'seagreen': 0x2E8B57, - 'seashell': 0xFFF5EE, - 'sienna': 0xA0522D, - 'silver': 0xC0C0C0, - 'skyblue': 0x87CEEB, - 'slateblue': 0x6A5ACD, - 'slategray': 0x708090, - 'slategrey': 0x708090, - 'snow': 0xFFFAFA, - 'springgreen': 0x00FF7F, - 'steelblue': 0x4682B4, - 'tan': 0xD2B48C, - 'teal': 0x008080, - 'thistle': 0xD8BFD8, - 'tomato': 0xFF6347, - 'turquoise': 0x40E0D0, - 'violet': 0xEE82EE, - 'wheat': 0xF5DEB3, - 'white': 0xFFFFFF, - 'whitesmoke': 0xF5F5F5, - 'yellow': 0xFFFF00, - 'yellowgreen': 0x9ACD32 - }; - const _hslA = { - h: 0, - s: 0, - l: 0 - }; - const _hslB = { - h: 0, - s: 0, - l: 0 - }; - - function hue2rgb(p, q, t) { - if (t < 0) t += 1; - if (t > 1) t -= 1; - if (t < 1 / 6) return p + (q - p) * 6 * t; - if (t < 1 / 2) return q; - if (t < 2 / 3) return p + (q - p) * 6 * (2 / 3 - t); - return p; - } - - function SRGBToLinear(c) { - return c < 0.04045 ? c * 0.0773993808 : Math.pow(c * 0.9478672986 + 0.0521327014, 2.4); - } - - function LinearToSRGB(c) { - return c < 0.0031308 ? c * 12.92 : 1.055 * Math.pow(c, 0.41666) - 0.055; - } - - class Color { - constructor(r, g, b) { - if (g === undefined && b === undefined) { - // r is THREE.Color, hex or string - return this.set(r); - } - - return this.setRGB(r, g, b); - } - - set(value) { - if (value && value.isColor) { - this.copy(value); - } else if (typeof value === 'number') { - this.setHex(value); - } else if (typeof value === 'string') { - this.setStyle(value); - } - - return this; - } - - setScalar(scalar) { - this.r = scalar; - this.g = scalar; - this.b = scalar; - return this; - } - - setHex(hex) { - hex = Math.floor(hex); - this.r = (hex >> 16 & 255) / 255; - this.g = (hex >> 8 & 255) / 255; - this.b = (hex & 255) / 255; - return this; - } - - setRGB(r, g, b) { - this.r = r; - this.g = g; - this.b = b; - return this; - } - - setHSL(h, s, l) { - // h,s,l ranges are in 0.0 - 1.0 - h = euclideanModulo(h, 1); - s = clamp(s, 0, 1); - l = clamp(l, 0, 1); - - if (s === 0) { - this.r = this.g = this.b = l; - } else { - const p = l <= 0.5 ? l * (1 + s) : l + s - l * s; - const q = 2 * l - p; - this.r = hue2rgb(q, p, h + 1 / 3); - this.g = hue2rgb(q, p, h); - this.b = hue2rgb(q, p, h - 1 / 3); - } - - return this; - } - - setStyle(style) { - function handleAlpha(string) { - if (string === undefined) return; - - if (parseFloat(string) < 1) { - console.warn('THREE.Color: Alpha component of ' + style + ' will be ignored.'); - } - } - - let m; - - if (m = /^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(style)) { - // rgb / hsl - let color; - const name = m[1]; - const components = m[2]; - - switch (name) { - case 'rgb': - case 'rgba': - if (color = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)) { - // rgb(255,0,0) rgba(255,0,0,0.5) - this.r = Math.min(255, parseInt(color[1], 10)) / 255; - this.g = Math.min(255, parseInt(color[2], 10)) / 255; - this.b = Math.min(255, parseInt(color[3], 10)) / 255; - handleAlpha(color[4]); - return this; - } - - if (color = /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)) { - // rgb(100%,0%,0%) rgba(100%,0%,0%,0.5) - this.r = Math.min(100, parseInt(color[1], 10)) / 100; - this.g = Math.min(100, parseInt(color[2], 10)) / 100; - this.b = Math.min(100, parseInt(color[3], 10)) / 100; - handleAlpha(color[4]); - return this; - } - - break; - - case 'hsl': - case 'hsla': - if (color = /^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(components)) { - // hsl(120,50%,50%) hsla(120,50%,50%,0.5) - const h = parseFloat(color[1]) / 360; - const s = parseInt(color[2], 10) / 100; - const l = parseInt(color[3], 10) / 100; - handleAlpha(color[4]); - return this.setHSL(h, s, l); - } - - break; - } - } else if (m = /^\#([A-Fa-f\d]+)$/.exec(style)) { - // hex color - const hex = m[1]; - const size = hex.length; - - if (size === 3) { - // #ff0 - this.r = parseInt(hex.charAt(0) + hex.charAt(0), 16) / 255; - this.g = parseInt(hex.charAt(1) + hex.charAt(1), 16) / 255; - this.b = parseInt(hex.charAt(2) + hex.charAt(2), 16) / 255; - return this; - } else if (size === 6) { - // #ff0000 - this.r = parseInt(hex.charAt(0) + hex.charAt(1), 16) / 255; - this.g = parseInt(hex.charAt(2) + hex.charAt(3), 16) / 255; - this.b = parseInt(hex.charAt(4) + hex.charAt(5), 16) / 255; - return this; - } - } - - if (style && style.length > 0) { - return this.setColorName(style); - } - - return this; - } - - setColorName(style) { - // color keywords - const hex = _colorKeywords[style.toLowerCase()]; - - if (hex !== undefined) { - // red - this.setHex(hex); - } else { - // unknown color - console.warn('THREE.Color: Unknown color ' + style); - } - - return this; - } - - clone() { - return new this.constructor(this.r, this.g, this.b); - } - - copy(color) { - this.r = color.r; - this.g = color.g; - this.b = color.b; - return this; - } - - copyGammaToLinear(color, gammaFactor = 2.0) { - this.r = Math.pow(color.r, gammaFactor); - this.g = Math.pow(color.g, gammaFactor); - this.b = Math.pow(color.b, gammaFactor); - return this; - } - - copyLinearToGamma(color, gammaFactor = 2.0) { - const safeInverse = gammaFactor > 0 ? 1.0 / gammaFactor : 1.0; - this.r = Math.pow(color.r, safeInverse); - this.g = Math.pow(color.g, safeInverse); - this.b = Math.pow(color.b, safeInverse); - return this; - } - - convertGammaToLinear(gammaFactor) { - this.copyGammaToLinear(this, gammaFactor); - return this; - } - - convertLinearToGamma(gammaFactor) { - this.copyLinearToGamma(this, gammaFactor); - return this; - } - - copySRGBToLinear(color) { - this.r = SRGBToLinear(color.r); - this.g = SRGBToLinear(color.g); - this.b = SRGBToLinear(color.b); - return this; - } - - copyLinearToSRGB(color) { - this.r = LinearToSRGB(color.r); - this.g = LinearToSRGB(color.g); - this.b = LinearToSRGB(color.b); - return this; - } - - convertSRGBToLinear() { - this.copySRGBToLinear(this); - return this; - } - - convertLinearToSRGB() { - this.copyLinearToSRGB(this); - return this; - } - - getHex() { - return this.r * 255 << 16 ^ this.g * 255 << 8 ^ this.b * 255 << 0; - } - - getHexString() { - return ('000000' + this.getHex().toString(16)).slice(-6); - } - - getHSL(target) { - // h,s,l ranges are in 0.0 - 1.0 - const r = this.r, - g = this.g, - b = this.b; - const max = Math.max(r, g, b); - const min = Math.min(r, g, b); - let hue, saturation; - const lightness = (min + max) / 2.0; - - if (min === max) { - hue = 0; - saturation = 0; - } else { - const delta = max - min; - saturation = lightness <= 0.5 ? delta / (max + min) : delta / (2 - max - min); - - switch (max) { - case r: - hue = (g - b) / delta + (g < b ? 6 : 0); - break; - - case g: - hue = (b - r) / delta + 2; - break; - - case b: - hue = (r - g) / delta + 4; - break; - } - - hue /= 6; - } - - target.h = hue; - target.s = saturation; - target.l = lightness; - return target; - } - - getStyle() { - return 'rgb(' + (this.r * 255 | 0) + ',' + (this.g * 255 | 0) + ',' + (this.b * 255 | 0) + ')'; - } - - offsetHSL(h, s, l) { - this.getHSL(_hslA); - _hslA.h += h; - _hslA.s += s; - _hslA.l += l; - this.setHSL(_hslA.h, _hslA.s, _hslA.l); - return this; - } - - add(color) { - this.r += color.r; - this.g += color.g; - this.b += color.b; - return this; - } - - addColors(color1, color2) { - this.r = color1.r + color2.r; - this.g = color1.g + color2.g; - this.b = color1.b + color2.b; - return this; - } - - addScalar(s) { - this.r += s; - this.g += s; - this.b += s; - return this; - } - - sub(color) { - this.r = Math.max(0, this.r - color.r); - this.g = Math.max(0, this.g - color.g); - this.b = Math.max(0, this.b - color.b); - return this; - } - - multiply(color) { - this.r *= color.r; - this.g *= color.g; - this.b *= color.b; - return this; - } - - multiplyScalar(s) { - this.r *= s; - this.g *= s; - this.b *= s; - return this; - } - - lerp(color, alpha) { - this.r += (color.r - this.r) * alpha; - this.g += (color.g - this.g) * alpha; - this.b += (color.b - this.b) * alpha; - return this; - } - - lerpColors(color1, color2, alpha) { - this.r = color1.r + (color2.r - color1.r) * alpha; - this.g = color1.g + (color2.g - color1.g) * alpha; - this.b = color1.b + (color2.b - color1.b) * alpha; - return this; - } - - lerpHSL(color, alpha) { - this.getHSL(_hslA); - color.getHSL(_hslB); - const h = lerp(_hslA.h, _hslB.h, alpha); - const s = lerp(_hslA.s, _hslB.s, alpha); - const l = lerp(_hslA.l, _hslB.l, alpha); - this.setHSL(h, s, l); - return this; - } - - equals(c) { - return c.r === this.r && c.g === this.g && c.b === this.b; - } - - fromArray(array, offset = 0) { - this.r = array[offset]; - this.g = array[offset + 1]; - this.b = array[offset + 2]; - return this; - } - - toArray(array = [], offset = 0) { - array[offset] = this.r; - array[offset + 1] = this.g; - array[offset + 2] = this.b; - return array; - } - - fromBufferAttribute(attribute, index) { - this.r = attribute.getX(index); - this.g = attribute.getY(index); - this.b = attribute.getZ(index); - - if (attribute.normalized === true) { - // assuming Uint8Array - this.r /= 255; - this.g /= 255; - this.b /= 255; - } - - return this; - } - - toJSON() { - return this.getHex(); - } - - } - - Color.NAMES = _colorKeywords; - Color.prototype.isColor = true; - Color.prototype.r = 1; - Color.prototype.g = 1; - Color.prototype.b = 1; - - /** - * parameters = { - * color: , - * opacity: , - * map: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * specularMap: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ), - * combine: THREE.Multiply, - * reflectivity: , - * refractionRatio: , - * - * depthTest: , - * depthWrite: , - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: - * } - */ - - class MeshBasicMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'MeshBasicMaterial'; - this.color = new Color(0xffffff); // emissive - - this.map = null; - this.lightMap = null; - this.lightMapIntensity = 1.0; - this.aoMap = null; - this.aoMapIntensity = 1.0; - this.specularMap = null; - this.alphaMap = null; - this.envMap = null; - this.combine = MultiplyOperation; - this.reflectivity = 1; - this.refractionRatio = 0.98; - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - this.morphTargets = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - this.map = source.map; - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - this.specularMap = source.specularMap; - this.alphaMap = source.alphaMap; - this.envMap = source.envMap; - this.combine = source.combine; - this.reflectivity = source.reflectivity; - this.refractionRatio = source.refractionRatio; - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - this.morphTargets = source.morphTargets; - return this; - } - - } - - MeshBasicMaterial.prototype.isMeshBasicMaterial = true; - - const _vector$9 = /*@__PURE__*/new Vector3(); - - const _vector2$1 = /*@__PURE__*/new Vector2(); - - class BufferAttribute { - constructor(array, itemSize, normalized) { - if (Array.isArray(array)) { - throw new TypeError('THREE.BufferAttribute: array should be a Typed Array.'); - } - - this.name = ''; - this.array = array; - this.itemSize = itemSize; - this.count = array !== undefined ? array.length / itemSize : 0; - this.normalized = normalized === true; - this.usage = StaticDrawUsage; - this.updateRange = { - offset: 0, - count: -1 - }; - this.version = 0; - } - - onUploadCallback() {} - - set needsUpdate(value) { - if (value === true) this.version++; - } - - setUsage(value) { - this.usage = value; - return this; - } - - copy(source) { - this.name = source.name; - this.array = new source.array.constructor(source.array); - this.itemSize = source.itemSize; - this.count = source.count; - this.normalized = source.normalized; - this.usage = source.usage; - return this; - } - - copyAt(index1, attribute, index2) { - index1 *= this.itemSize; - index2 *= attribute.itemSize; - - for (let i = 0, l = this.itemSize; i < l; i++) { - this.array[index1 + i] = attribute.array[index2 + i]; - } - - return this; - } - - copyArray(array) { - this.array.set(array); - return this; - } - - copyColorsArray(colors) { - const array = this.array; - let offset = 0; - - for (let i = 0, l = colors.length; i < l; i++) { - let color = colors[i]; - - if (color === undefined) { - console.warn('THREE.BufferAttribute.copyColorsArray(): color is undefined', i); - color = new Color(); - } - - array[offset++] = color.r; - array[offset++] = color.g; - array[offset++] = color.b; - } - - return this; - } - - copyVector2sArray(vectors) { - const array = this.array; - let offset = 0; - - for (let i = 0, l = vectors.length; i < l; i++) { - let vector = vectors[i]; - - if (vector === undefined) { - console.warn('THREE.BufferAttribute.copyVector2sArray(): vector is undefined', i); - vector = new Vector2(); - } - - array[offset++] = vector.x; - array[offset++] = vector.y; - } - - return this; - } - - copyVector3sArray(vectors) { - const array = this.array; - let offset = 0; - - for (let i = 0, l = vectors.length; i < l; i++) { - let vector = vectors[i]; - - if (vector === undefined) { - console.warn('THREE.BufferAttribute.copyVector3sArray(): vector is undefined', i); - vector = new Vector3(); - } - - array[offset++] = vector.x; - array[offset++] = vector.y; - array[offset++] = vector.z; - } - - return this; - } - - copyVector4sArray(vectors) { - const array = this.array; - let offset = 0; - - for (let i = 0, l = vectors.length; i < l; i++) { - let vector = vectors[i]; - - if (vector === undefined) { - console.warn('THREE.BufferAttribute.copyVector4sArray(): vector is undefined', i); - vector = new Vector4(); - } - - array[offset++] = vector.x; - array[offset++] = vector.y; - array[offset++] = vector.z; - array[offset++] = vector.w; - } - - return this; - } - - applyMatrix3(m) { - if (this.itemSize === 2) { - for (let i = 0, l = this.count; i < l; i++) { - _vector2$1.fromBufferAttribute(this, i); - - _vector2$1.applyMatrix3(m); - - this.setXY(i, _vector2$1.x, _vector2$1.y); - } - } else if (this.itemSize === 3) { - for (let i = 0, l = this.count; i < l; i++) { - _vector$9.fromBufferAttribute(this, i); - - _vector$9.applyMatrix3(m); - - this.setXYZ(i, _vector$9.x, _vector$9.y, _vector$9.z); - } - } - - return this; - } - - applyMatrix4(m) { - for (let i = 0, l = this.count; i < l; i++) { - _vector$9.x = this.getX(i); - _vector$9.y = this.getY(i); - _vector$9.z = this.getZ(i); - - _vector$9.applyMatrix4(m); - - this.setXYZ(i, _vector$9.x, _vector$9.y, _vector$9.z); - } - - return this; - } - - applyNormalMatrix(m) { - for (let i = 0, l = this.count; i < l; i++) { - _vector$9.x = this.getX(i); - _vector$9.y = this.getY(i); - _vector$9.z = this.getZ(i); - - _vector$9.applyNormalMatrix(m); - - this.setXYZ(i, _vector$9.x, _vector$9.y, _vector$9.z); - } - - return this; - } - - transformDirection(m) { - for (let i = 0, l = this.count; i < l; i++) { - _vector$9.x = this.getX(i); - _vector$9.y = this.getY(i); - _vector$9.z = this.getZ(i); - - _vector$9.transformDirection(m); - - this.setXYZ(i, _vector$9.x, _vector$9.y, _vector$9.z); - } - - return this; - } - - set(value, offset = 0) { - this.array.set(value, offset); - return this; - } - - getX(index) { - return this.array[index * this.itemSize]; - } - - setX(index, x) { - this.array[index * this.itemSize] = x; - return this; - } - - getY(index) { - return this.array[index * this.itemSize + 1]; - } - - setY(index, y) { - this.array[index * this.itemSize + 1] = y; - return this; - } - - getZ(index) { - return this.array[index * this.itemSize + 2]; - } - - setZ(index, z) { - this.array[index * this.itemSize + 2] = z; - return this; - } - - getW(index) { - return this.array[index * this.itemSize + 3]; - } - - setW(index, w) { - this.array[index * this.itemSize + 3] = w; - return this; - } - - setXY(index, x, y) { - index *= this.itemSize; - this.array[index + 0] = x; - this.array[index + 1] = y; - return this; - } - - setXYZ(index, x, y, z) { - index *= this.itemSize; - this.array[index + 0] = x; - this.array[index + 1] = y; - this.array[index + 2] = z; - return this; - } - - setXYZW(index, x, y, z, w) { - index *= this.itemSize; - this.array[index + 0] = x; - this.array[index + 1] = y; - this.array[index + 2] = z; - this.array[index + 3] = w; - return this; - } - - onUpload(callback) { - this.onUploadCallback = callback; - return this; - } - - clone() { - return new this.constructor(this.array, this.itemSize).copy(this); - } - - toJSON() { - const data = { - itemSize: this.itemSize, - type: this.array.constructor.name, - array: Array.prototype.slice.call(this.array), - normalized: this.normalized - }; - if (this.name !== '') data.name = this.name; - if (this.usage !== StaticDrawUsage) data.usage = this.usage; - if (this.updateRange.offset !== 0 || this.updateRange.count !== -1) data.updateRange = this.updateRange; - return data; - } - - } - - BufferAttribute.prototype.isBufferAttribute = true; // - - class Int8BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Int8Array(array), itemSize, normalized); - } - - } - - class Uint8BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Uint8Array(array), itemSize, normalized); - } - - } - - class Uint8ClampedBufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Uint8ClampedArray(array), itemSize, normalized); - } - - } - - class Int16BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Int16Array(array), itemSize, normalized); - } - - } - - class Uint16BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Uint16Array(array), itemSize, normalized); - } - - } - - class Int32BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Int32Array(array), itemSize, normalized); - } - - } - - class Uint32BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Uint32Array(array), itemSize, normalized); - } - - } - - class Float16BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Uint16Array(array), itemSize, normalized); - } - - } - - Float16BufferAttribute.prototype.isFloat16BufferAttribute = true; - - class Float32BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Float32Array(array), itemSize, normalized); - } - - } - - class Float64BufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized) { - super(new Float64Array(array), itemSize, normalized); - } - - } // - - function arrayMax(array) { - if (array.length === 0) return -Infinity; - let max = array[0]; - - for (let i = 1, l = array.length; i < l; ++i) { - if (array[i] > max) max = array[i]; - } - - return max; - } - - const TYPED_ARRAYS = { - Int8Array: Int8Array, - Uint8Array: Uint8Array, - Uint8ClampedArray: Uint8ClampedArray, - Int16Array: Int16Array, - Uint16Array: Uint16Array, - Int32Array: Int32Array, - Uint32Array: Uint32Array, - Float32Array: Float32Array, - Float64Array: Float64Array - }; - - function getTypedArray(type, buffer) { - return new TYPED_ARRAYS[type](buffer); - } - - let _id = 0; - - const _m1 = /*@__PURE__*/new Matrix4(); - - const _obj = /*@__PURE__*/new Object3D(); - - const _offset = /*@__PURE__*/new Vector3(); - - const _box$1 = /*@__PURE__*/new Box3(); - - const _boxMorphTargets = /*@__PURE__*/new Box3(); - - const _vector$8 = /*@__PURE__*/new Vector3(); - - class BufferGeometry extends EventDispatcher { - constructor() { - super(); - Object.defineProperty(this, 'id', { - value: _id++ - }); - this.uuid = generateUUID(); - this.name = ''; - this.type = 'BufferGeometry'; - this.index = null; - this.attributes = {}; - this.morphAttributes = {}; - this.morphTargetsRelative = false; - this.groups = []; - this.boundingBox = null; - this.boundingSphere = null; - this.drawRange = { - start: 0, - count: Infinity - }; - this.userData = {}; - } - - getIndex() { - return this.index; - } - - setIndex(index) { - if (Array.isArray(index)) { - this.index = new (arrayMax(index) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute)(index, 1); - } else { - this.index = index; - } - - return this; - } - - getAttribute(name) { - return this.attributes[name]; - } - - setAttribute(name, attribute) { - this.attributes[name] = attribute; - return this; - } - - deleteAttribute(name) { - delete this.attributes[name]; - return this; - } - - hasAttribute(name) { - return this.attributes[name] !== undefined; - } - - addGroup(start, count, materialIndex = 0) { - this.groups.push({ - start: start, - count: count, - materialIndex: materialIndex - }); - } - - clearGroups() { - this.groups = []; - } - - setDrawRange(start, count) { - this.drawRange.start = start; - this.drawRange.count = count; - } - - applyMatrix4(matrix) { - const position = this.attributes.position; - - if (position !== undefined) { - position.applyMatrix4(matrix); - position.needsUpdate = true; - } - - const normal = this.attributes.normal; - - if (normal !== undefined) { - const normalMatrix = new Matrix3().getNormalMatrix(matrix); - normal.applyNormalMatrix(normalMatrix); - normal.needsUpdate = true; - } - - const tangent = this.attributes.tangent; - - if (tangent !== undefined) { - tangent.transformDirection(matrix); - tangent.needsUpdate = true; - } - - if (this.boundingBox !== null) { - this.computeBoundingBox(); - } - - if (this.boundingSphere !== null) { - this.computeBoundingSphere(); - } - - return this; - } - - applyQuaternion(q) { - _m1.makeRotationFromQuaternion(q); - - this.applyMatrix4(_m1); - return this; - } - - rotateX(angle) { - // rotate geometry around world x-axis - _m1.makeRotationX(angle); - - this.applyMatrix4(_m1); - return this; - } - - rotateY(angle) { - // rotate geometry around world y-axis - _m1.makeRotationY(angle); - - this.applyMatrix4(_m1); - return this; - } - - rotateZ(angle) { - // rotate geometry around world z-axis - _m1.makeRotationZ(angle); - - this.applyMatrix4(_m1); - return this; - } - - translate(x, y, z) { - // translate geometry - _m1.makeTranslation(x, y, z); - - this.applyMatrix4(_m1); - return this; - } - - scale(x, y, z) { - // scale geometry - _m1.makeScale(x, y, z); - - this.applyMatrix4(_m1); - return this; - } - - lookAt(vector) { - _obj.lookAt(vector); - - _obj.updateMatrix(); - - this.applyMatrix4(_obj.matrix); - return this; - } - - center() { - this.computeBoundingBox(); - this.boundingBox.getCenter(_offset).negate(); - this.translate(_offset.x, _offset.y, _offset.z); - return this; - } - - setFromPoints(points) { - const position = []; - - for (let i = 0, l = points.length; i < l; i++) { - const point = points[i]; - position.push(point.x, point.y, point.z || 0); - } - - this.setAttribute('position', new Float32BufferAttribute(position, 3)); - return this; - } - - computeBoundingBox() { - if (this.boundingBox === null) { - this.boundingBox = new Box3(); - } - - const position = this.attributes.position; - const morphAttributesPosition = this.morphAttributes.position; - - if (position && position.isGLBufferAttribute) { - console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".', this); - this.boundingBox.set(new Vector3(-Infinity, -Infinity, -Infinity), new Vector3(+Infinity, +Infinity, +Infinity)); - return; - } - - if (position !== undefined) { - this.boundingBox.setFromBufferAttribute(position); // process morph attributes if present - - if (morphAttributesPosition) { - for (let i = 0, il = morphAttributesPosition.length; i < il; i++) { - const morphAttribute = morphAttributesPosition[i]; - - _box$1.setFromBufferAttribute(morphAttribute); - - if (this.morphTargetsRelative) { - _vector$8.addVectors(this.boundingBox.min, _box$1.min); - - this.boundingBox.expandByPoint(_vector$8); - - _vector$8.addVectors(this.boundingBox.max, _box$1.max); - - this.boundingBox.expandByPoint(_vector$8); - } else { - this.boundingBox.expandByPoint(_box$1.min); - this.boundingBox.expandByPoint(_box$1.max); - } - } - } - } else { - this.boundingBox.makeEmpty(); - } - - if (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) { - console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this); - } - } - - computeBoundingSphere() { - if (this.boundingSphere === null) { - this.boundingSphere = new Sphere(); - } - - const position = this.attributes.position; - const morphAttributesPosition = this.morphAttributes.position; - - if (position && position.isGLBufferAttribute) { - console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".', this); - this.boundingSphere.set(new Vector3(), Infinity); - return; - } - - if (position) { - // first, find the center of the bounding sphere - const center = this.boundingSphere.center; - - _box$1.setFromBufferAttribute(position); // process morph attributes if present - - - if (morphAttributesPosition) { - for (let i = 0, il = morphAttributesPosition.length; i < il; i++) { - const morphAttribute = morphAttributesPosition[i]; - - _boxMorphTargets.setFromBufferAttribute(morphAttribute); - - if (this.morphTargetsRelative) { - _vector$8.addVectors(_box$1.min, _boxMorphTargets.min); - - _box$1.expandByPoint(_vector$8); - - _vector$8.addVectors(_box$1.max, _boxMorphTargets.max); - - _box$1.expandByPoint(_vector$8); - } else { - _box$1.expandByPoint(_boxMorphTargets.min); - - _box$1.expandByPoint(_boxMorphTargets.max); - } - } - } - - _box$1.getCenter(center); // second, try to find a boundingSphere with a radius smaller than the - // boundingSphere of the boundingBox: sqrt(3) smaller in the best case - - - let maxRadiusSq = 0; - - for (let i = 0, il = position.count; i < il; i++) { - _vector$8.fromBufferAttribute(position, i); - - maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector$8)); - } // process morph attributes if present - - - if (morphAttributesPosition) { - for (let i = 0, il = morphAttributesPosition.length; i < il; i++) { - const morphAttribute = morphAttributesPosition[i]; - const morphTargetsRelative = this.morphTargetsRelative; - - for (let j = 0, jl = morphAttribute.count; j < jl; j++) { - _vector$8.fromBufferAttribute(morphAttribute, j); - - if (morphTargetsRelative) { - _offset.fromBufferAttribute(position, j); - - _vector$8.add(_offset); - } - - maxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector$8)); - } - } - } - - this.boundingSphere.radius = Math.sqrt(maxRadiusSq); - - if (isNaN(this.boundingSphere.radius)) { - console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this); - } - } - } - - computeFaceNormals() {// backwards compatibility - } - - computeTangents() { - const index = this.index; - const attributes = this.attributes; // based on http://www.terathon.com/code/tangent.html - // (per vertex tangents) - - if (index === null || attributes.position === undefined || attributes.normal === undefined || attributes.uv === undefined) { - console.error('THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)'); - return; - } - - const indices = index.array; - const positions = attributes.position.array; - const normals = attributes.normal.array; - const uvs = attributes.uv.array; - const nVertices = positions.length / 3; - - if (attributes.tangent === undefined) { - this.setAttribute('tangent', new BufferAttribute(new Float32Array(4 * nVertices), 4)); - } - - const tangents = attributes.tangent.array; - const tan1 = [], - tan2 = []; - - for (let i = 0; i < nVertices; i++) { - tan1[i] = new Vector3(); - tan2[i] = new Vector3(); - } - - const vA = new Vector3(), - vB = new Vector3(), - vC = new Vector3(), - uvA = new Vector2(), - uvB = new Vector2(), - uvC = new Vector2(), - sdir = new Vector3(), - tdir = new Vector3(); - - function handleTriangle(a, b, c) { - vA.fromArray(positions, a * 3); - vB.fromArray(positions, b * 3); - vC.fromArray(positions, c * 3); - uvA.fromArray(uvs, a * 2); - uvB.fromArray(uvs, b * 2); - uvC.fromArray(uvs, c * 2); - vB.sub(vA); - vC.sub(vA); - uvB.sub(uvA); - uvC.sub(uvA); - const r = 1.0 / (uvB.x * uvC.y - uvC.x * uvB.y); // silently ignore degenerate uv triangles having coincident or colinear vertices - - if (!isFinite(r)) return; - sdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC, -uvB.y).multiplyScalar(r); - tdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB, -uvC.x).multiplyScalar(r); - tan1[a].add(sdir); - tan1[b].add(sdir); - tan1[c].add(sdir); - tan2[a].add(tdir); - tan2[b].add(tdir); - tan2[c].add(tdir); - } - - let groups = this.groups; - - if (groups.length === 0) { - groups = [{ - start: 0, - count: indices.length - }]; - } - - for (let i = 0, il = groups.length; i < il; ++i) { - const group = groups[i]; - const start = group.start; - const count = group.count; - - for (let j = start, jl = start + count; j < jl; j += 3) { - handleTriangle(indices[j + 0], indices[j + 1], indices[j + 2]); - } - } - - const tmp = new Vector3(), - tmp2 = new Vector3(); - const n = new Vector3(), - n2 = new Vector3(); - - function handleVertex(v) { - n.fromArray(normals, v * 3); - n2.copy(n); - const t = tan1[v]; // Gram-Schmidt orthogonalize - - tmp.copy(t); - tmp.sub(n.multiplyScalar(n.dot(t))).normalize(); // Calculate handedness - - tmp2.crossVectors(n2, t); - const test = tmp2.dot(tan2[v]); - const w = test < 0.0 ? -1.0 : 1.0; - tangents[v * 4] = tmp.x; - tangents[v * 4 + 1] = tmp.y; - tangents[v * 4 + 2] = tmp.z; - tangents[v * 4 + 3] = w; - } - - for (let i = 0, il = groups.length; i < il; ++i) { - const group = groups[i]; - const start = group.start; - const count = group.count; - - for (let j = start, jl = start + count; j < jl; j += 3) { - handleVertex(indices[j + 0]); - handleVertex(indices[j + 1]); - handleVertex(indices[j + 2]); - } - } - } - - computeVertexNormals() { - const index = this.index; - const positionAttribute = this.getAttribute('position'); - - if (positionAttribute !== undefined) { - let normalAttribute = this.getAttribute('normal'); - - if (normalAttribute === undefined) { - normalAttribute = new BufferAttribute(new Float32Array(positionAttribute.count * 3), 3); - this.setAttribute('normal', normalAttribute); - } else { - // reset existing normals to zero - for (let i = 0, il = normalAttribute.count; i < il; i++) { - normalAttribute.setXYZ(i, 0, 0, 0); - } - } - - const pA = new Vector3(), - pB = new Vector3(), - pC = new Vector3(); - const nA = new Vector3(), - nB = new Vector3(), - nC = new Vector3(); - const cb = new Vector3(), - ab = new Vector3(); // indexed elements - - if (index) { - for (let i = 0, il = index.count; i < il; i += 3) { - const vA = index.getX(i + 0); - const vB = index.getX(i + 1); - const vC = index.getX(i + 2); - pA.fromBufferAttribute(positionAttribute, vA); - pB.fromBufferAttribute(positionAttribute, vB); - pC.fromBufferAttribute(positionAttribute, vC); - cb.subVectors(pC, pB); - ab.subVectors(pA, pB); - cb.cross(ab); - nA.fromBufferAttribute(normalAttribute, vA); - nB.fromBufferAttribute(normalAttribute, vB); - nC.fromBufferAttribute(normalAttribute, vC); - nA.add(cb); - nB.add(cb); - nC.add(cb); - normalAttribute.setXYZ(vA, nA.x, nA.y, nA.z); - normalAttribute.setXYZ(vB, nB.x, nB.y, nB.z); - normalAttribute.setXYZ(vC, nC.x, nC.y, nC.z); - } - } else { - // non-indexed elements (unconnected triangle soup) - for (let i = 0, il = positionAttribute.count; i < il; i += 3) { - pA.fromBufferAttribute(positionAttribute, i + 0); - pB.fromBufferAttribute(positionAttribute, i + 1); - pC.fromBufferAttribute(positionAttribute, i + 2); - cb.subVectors(pC, pB); - ab.subVectors(pA, pB); - cb.cross(ab); - normalAttribute.setXYZ(i + 0, cb.x, cb.y, cb.z); - normalAttribute.setXYZ(i + 1, cb.x, cb.y, cb.z); - normalAttribute.setXYZ(i + 2, cb.x, cb.y, cb.z); - } - } - - this.normalizeNormals(); - normalAttribute.needsUpdate = true; - } - } - - merge(geometry, offset) { - if (!(geometry && geometry.isBufferGeometry)) { - console.error('THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', geometry); - return; - } - - if (offset === undefined) { - offset = 0; - console.warn('THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. ' + 'Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge.'); - } - - const attributes = this.attributes; - - for (const key in attributes) { - if (geometry.attributes[key] === undefined) continue; - const attribute1 = attributes[key]; - const attributeArray1 = attribute1.array; - const attribute2 = geometry.attributes[key]; - const attributeArray2 = attribute2.array; - const attributeOffset = attribute2.itemSize * offset; - const length = Math.min(attributeArray2.length, attributeArray1.length - attributeOffset); - - for (let i = 0, j = attributeOffset; i < length; i++, j++) { - attributeArray1[j] = attributeArray2[i]; - } - } - - return this; - } - - normalizeNormals() { - const normals = this.attributes.normal; - - for (let i = 0, il = normals.count; i < il; i++) { - _vector$8.fromBufferAttribute(normals, i); - - _vector$8.normalize(); - - normals.setXYZ(i, _vector$8.x, _vector$8.y, _vector$8.z); - } - } - - toNonIndexed() { - function convertBufferAttribute(attribute, indices) { - const array = attribute.array; - const itemSize = attribute.itemSize; - const normalized = attribute.normalized; - const array2 = new array.constructor(indices.length * itemSize); - let index = 0, - index2 = 0; - - for (let i = 0, l = indices.length; i < l; i++) { - if (attribute.isInterleavedBufferAttribute) { - index = indices[i] * attribute.data.stride + attribute.offset; - } else { - index = indices[i] * itemSize; - } - - for (let j = 0; j < itemSize; j++) { - array2[index2++] = array[index++]; - } - } - - return new BufferAttribute(array2, itemSize, normalized); - } // - - - if (this.index === null) { - console.warn('THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.'); - return this; - } - - const geometry2 = new BufferGeometry(); - const indices = this.index.array; - const attributes = this.attributes; // attributes - - for (const name in attributes) { - const attribute = attributes[name]; - const newAttribute = convertBufferAttribute(attribute, indices); - geometry2.setAttribute(name, newAttribute); - } // morph attributes - - - const morphAttributes = this.morphAttributes; - - for (const name in morphAttributes) { - const morphArray = []; - const morphAttribute = morphAttributes[name]; // morphAttribute: array of Float32BufferAttributes - - for (let i = 0, il = morphAttribute.length; i < il; i++) { - const attribute = morphAttribute[i]; - const newAttribute = convertBufferAttribute(attribute, indices); - morphArray.push(newAttribute); - } - - geometry2.morphAttributes[name] = morphArray; - } - - geometry2.morphTargetsRelative = this.morphTargetsRelative; // groups - - const groups = this.groups; - - for (let i = 0, l = groups.length; i < l; i++) { - const group = groups[i]; - geometry2.addGroup(group.start, group.count, group.materialIndex); - } - - return geometry2; - } - - toJSON() { - const data = { - metadata: { - version: 4.5, - type: 'BufferGeometry', - generator: 'BufferGeometry.toJSON' - } - }; // standard BufferGeometry serialization - - data.uuid = this.uuid; - data.type = this.type; - if (this.name !== '') data.name = this.name; - if (Object.keys(this.userData).length > 0) data.userData = this.userData; - - if (this.parameters !== undefined) { - const parameters = this.parameters; - - for (const key in parameters) { - if (parameters[key] !== undefined) data[key] = parameters[key]; - } - - return data; - } // for simplicity the code assumes attributes are not shared across geometries, see #15811 - - - data.data = { - attributes: {} - }; - const index = this.index; - - if (index !== null) { - data.data.index = { - type: index.array.constructor.name, - array: Array.prototype.slice.call(index.array) - }; - } - - const attributes = this.attributes; - - for (const key in attributes) { - const attribute = attributes[key]; - data.data.attributes[key] = attribute.toJSON(data.data); - } - - const morphAttributes = {}; - let hasMorphAttributes = false; - - for (const key in this.morphAttributes) { - const attributeArray = this.morphAttributes[key]; - const array = []; - - for (let i = 0, il = attributeArray.length; i < il; i++) { - const attribute = attributeArray[i]; - array.push(attribute.toJSON(data.data)); - } - - if (array.length > 0) { - morphAttributes[key] = array; - hasMorphAttributes = true; - } - } - - if (hasMorphAttributes) { - data.data.morphAttributes = morphAttributes; - data.data.morphTargetsRelative = this.morphTargetsRelative; - } - - const groups = this.groups; - - if (groups.length > 0) { - data.data.groups = JSON.parse(JSON.stringify(groups)); - } - - const boundingSphere = this.boundingSphere; - - if (boundingSphere !== null) { - data.data.boundingSphere = { - center: boundingSphere.center.toArray(), - radius: boundingSphere.radius - }; - } - - return data; - } - - clone() { - /* - // Handle primitives - const parameters = this.parameters; - if ( parameters !== undefined ) { - const values = []; - for ( const key in parameters ) { - values.push( parameters[ key ] ); - } - const geometry = Object.create( this.constructor.prototype ); - this.constructor.apply( geometry, values ); - return geometry; - } - return new this.constructor().copy( this ); - */ - return new BufferGeometry().copy(this); - } - - copy(source) { - // reset - this.index = null; - this.attributes = {}; - this.morphAttributes = {}; - this.groups = []; - this.boundingBox = null; - this.boundingSphere = null; // used for storing cloned, shared data - - const data = {}; // name - - this.name = source.name; // index - - const index = source.index; - - if (index !== null) { - this.setIndex(index.clone(data)); - } // attributes - - - const attributes = source.attributes; - - for (const name in attributes) { - const attribute = attributes[name]; - this.setAttribute(name, attribute.clone(data)); - } // morph attributes - - - const morphAttributes = source.morphAttributes; - - for (const name in morphAttributes) { - const array = []; - const morphAttribute = morphAttributes[name]; // morphAttribute: array of Float32BufferAttributes - - for (let i = 0, l = morphAttribute.length; i < l; i++) { - array.push(morphAttribute[i].clone(data)); - } - - this.morphAttributes[name] = array; - } - - this.morphTargetsRelative = source.morphTargetsRelative; // groups - - const groups = source.groups; - - for (let i = 0, l = groups.length; i < l; i++) { - const group = groups[i]; - this.addGroup(group.start, group.count, group.materialIndex); - } // bounding box - - - const boundingBox = source.boundingBox; - - if (boundingBox !== null) { - this.boundingBox = boundingBox.clone(); - } // bounding sphere - - - const boundingSphere = source.boundingSphere; - - if (boundingSphere !== null) { - this.boundingSphere = boundingSphere.clone(); - } // draw range - - - this.drawRange.start = source.drawRange.start; - this.drawRange.count = source.drawRange.count; // user data - - this.userData = source.userData; - return this; - } - - dispose() { - this.dispatchEvent({ - type: 'dispose' - }); - } - - } - - BufferGeometry.prototype.isBufferGeometry = true; - - const _inverseMatrix$2 = /*@__PURE__*/new Matrix4(); - - const _ray$2 = /*@__PURE__*/new Ray(); - - const _sphere$3 = /*@__PURE__*/new Sphere(); - - const _vA$1 = /*@__PURE__*/new Vector3(); - - const _vB$1 = /*@__PURE__*/new Vector3(); - - const _vC$1 = /*@__PURE__*/new Vector3(); - - const _tempA = /*@__PURE__*/new Vector3(); - - const _tempB = /*@__PURE__*/new Vector3(); - - const _tempC = /*@__PURE__*/new Vector3(); - - const _morphA = /*@__PURE__*/new Vector3(); - - const _morphB = /*@__PURE__*/new Vector3(); - - const _morphC = /*@__PURE__*/new Vector3(); - - const _uvA$1 = /*@__PURE__*/new Vector2(); - - const _uvB$1 = /*@__PURE__*/new Vector2(); - - const _uvC$1 = /*@__PURE__*/new Vector2(); - - const _intersectionPoint = /*@__PURE__*/new Vector3(); - - const _intersectionPointWorld = /*@__PURE__*/new Vector3(); - - class Mesh extends Object3D { - constructor(geometry = new BufferGeometry(), material = new MeshBasicMaterial()) { - super(); - this.type = 'Mesh'; - this.geometry = geometry; - this.material = material; - this.updateMorphTargets(); - } - - copy(source) { - super.copy(source); - - if (source.morphTargetInfluences !== undefined) { - this.morphTargetInfluences = source.morphTargetInfluences.slice(); - } - - if (source.morphTargetDictionary !== undefined) { - this.morphTargetDictionary = Object.assign({}, source.morphTargetDictionary); - } - - this.material = source.material; - this.geometry = source.geometry; - return this; - } - - updateMorphTargets() { - const geometry = this.geometry; - - if (geometry.isBufferGeometry) { - const morphAttributes = geometry.morphAttributes; - const keys = Object.keys(morphAttributes); - - if (keys.length > 0) { - const morphAttribute = morphAttributes[keys[0]]; - - if (morphAttribute !== undefined) { - this.morphTargetInfluences = []; - this.morphTargetDictionary = {}; - - for (let m = 0, ml = morphAttribute.length; m < ml; m++) { - const name = morphAttribute[m].name || String(m); - this.morphTargetInfluences.push(0); - this.morphTargetDictionary[name] = m; - } - } - } - } else { - const morphTargets = geometry.morphTargets; - - if (morphTargets !== undefined && morphTargets.length > 0) { - console.error('THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.'); - } - } - } - - raycast(raycaster, intersects) { - const geometry = this.geometry; - const material = this.material; - const matrixWorld = this.matrixWorld; - if (material === undefined) return; // Checking boundingSphere distance to ray - - if (geometry.boundingSphere === null) geometry.computeBoundingSphere(); - - _sphere$3.copy(geometry.boundingSphere); - - _sphere$3.applyMatrix4(matrixWorld); - - if (raycaster.ray.intersectsSphere(_sphere$3) === false) return; // - - _inverseMatrix$2.copy(matrixWorld).invert(); - - _ray$2.copy(raycaster.ray).applyMatrix4(_inverseMatrix$2); // Check boundingBox before continuing - - - if (geometry.boundingBox !== null) { - if (_ray$2.intersectsBox(geometry.boundingBox) === false) return; - } - - let intersection; - - if (geometry.isBufferGeometry) { - const index = geometry.index; - const position = geometry.attributes.position; - const morphPosition = geometry.morphAttributes.position; - const morphTargetsRelative = geometry.morphTargetsRelative; - const uv = geometry.attributes.uv; - const uv2 = geometry.attributes.uv2; - const groups = geometry.groups; - const drawRange = geometry.drawRange; - - if (index !== null) { - // indexed buffer geometry - if (Array.isArray(material)) { - for (let i = 0, il = groups.length; i < il; i++) { - const group = groups[i]; - const groupMaterial = material[group.materialIndex]; - const start = Math.max(group.start, drawRange.start); - const end = Math.min(group.start + group.count, drawRange.start + drawRange.count); - - for (let j = start, jl = end; j < jl; j += 3) { - const a = index.getX(j); - const b = index.getX(j + 1); - const c = index.getX(j + 2); - intersection = checkBufferGeometryIntersection(this, groupMaterial, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c); - - if (intersection) { - intersection.faceIndex = Math.floor(j / 3); // triangle number in indexed buffer semantics - - intersection.face.materialIndex = group.materialIndex; - intersects.push(intersection); - } - } - } - } else { - const start = Math.max(0, drawRange.start); - const end = Math.min(index.count, drawRange.start + drawRange.count); - - for (let i = start, il = end; i < il; i += 3) { - const a = index.getX(i); - const b = index.getX(i + 1); - const c = index.getX(i + 2); - intersection = checkBufferGeometryIntersection(this, material, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c); - - if (intersection) { - intersection.faceIndex = Math.floor(i / 3); // triangle number in indexed buffer semantics - - intersects.push(intersection); - } - } - } - } else if (position !== undefined) { - // non-indexed buffer geometry - if (Array.isArray(material)) { - for (let i = 0, il = groups.length; i < il; i++) { - const group = groups[i]; - const groupMaterial = material[group.materialIndex]; - const start = Math.max(group.start, drawRange.start); - const end = Math.min(group.start + group.count, drawRange.start + drawRange.count); - - for (let j = start, jl = end; j < jl; j += 3) { - const a = j; - const b = j + 1; - const c = j + 2; - intersection = checkBufferGeometryIntersection(this, groupMaterial, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c); - - if (intersection) { - intersection.faceIndex = Math.floor(j / 3); // triangle number in non-indexed buffer semantics - - intersection.face.materialIndex = group.materialIndex; - intersects.push(intersection); - } - } - } - } else { - const start = Math.max(0, drawRange.start); - const end = Math.min(position.count, drawRange.start + drawRange.count); - - for (let i = start, il = end; i < il; i += 3) { - const a = i; - const b = i + 1; - const c = i + 2; - intersection = checkBufferGeometryIntersection(this, material, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c); - - if (intersection) { - intersection.faceIndex = Math.floor(i / 3); // triangle number in non-indexed buffer semantics - - intersects.push(intersection); - } - } - } - } - } else if (geometry.isGeometry) { - console.error('THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.'); - } - } - - } - - Mesh.prototype.isMesh = true; - - function checkIntersection(object, material, raycaster, ray, pA, pB, pC, point) { - let intersect; - - if (material.side === BackSide) { - intersect = ray.intersectTriangle(pC, pB, pA, true, point); - } else { - intersect = ray.intersectTriangle(pA, pB, pC, material.side !== DoubleSide, point); - } - - if (intersect === null) return null; - - _intersectionPointWorld.copy(point); - - _intersectionPointWorld.applyMatrix4(object.matrixWorld); - - const distance = raycaster.ray.origin.distanceTo(_intersectionPointWorld); - if (distance < raycaster.near || distance > raycaster.far) return null; - return { - distance: distance, - point: _intersectionPointWorld.clone(), - object: object - }; - } - - function checkBufferGeometryIntersection(object, material, raycaster, ray, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c) { - _vA$1.fromBufferAttribute(position, a); - - _vB$1.fromBufferAttribute(position, b); - - _vC$1.fromBufferAttribute(position, c); - - const morphInfluences = object.morphTargetInfluences; - - if (material.morphTargets && morphPosition && morphInfluences) { - _morphA.set(0, 0, 0); - - _morphB.set(0, 0, 0); - - _morphC.set(0, 0, 0); - - for (let i = 0, il = morphPosition.length; i < il; i++) { - const influence = morphInfluences[i]; - const morphAttribute = morphPosition[i]; - if (influence === 0) continue; - - _tempA.fromBufferAttribute(morphAttribute, a); - - _tempB.fromBufferAttribute(morphAttribute, b); - - _tempC.fromBufferAttribute(morphAttribute, c); - - if (morphTargetsRelative) { - _morphA.addScaledVector(_tempA, influence); - - _morphB.addScaledVector(_tempB, influence); - - _morphC.addScaledVector(_tempC, influence); - } else { - _morphA.addScaledVector(_tempA.sub(_vA$1), influence); - - _morphB.addScaledVector(_tempB.sub(_vB$1), influence); - - _morphC.addScaledVector(_tempC.sub(_vC$1), influence); - } - } - - _vA$1.add(_morphA); - - _vB$1.add(_morphB); - - _vC$1.add(_morphC); - } - - if (object.isSkinnedMesh) { - object.boneTransform(a, _vA$1); - object.boneTransform(b, _vB$1); - object.boneTransform(c, _vC$1); - } - - const intersection = checkIntersection(object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint); - - if (intersection) { - if (uv) { - _uvA$1.fromBufferAttribute(uv, a); - - _uvB$1.fromBufferAttribute(uv, b); - - _uvC$1.fromBufferAttribute(uv, c); - - intersection.uv = Triangle.getUV(_intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2()); - } - - if (uv2) { - _uvA$1.fromBufferAttribute(uv2, a); - - _uvB$1.fromBufferAttribute(uv2, b); - - _uvC$1.fromBufferAttribute(uv2, c); - - intersection.uv2 = Triangle.getUV(_intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2()); - } - - const face = { - a: a, - b: b, - c: c, - normal: new Vector3(), - materialIndex: 0 - }; - Triangle.getNormal(_vA$1, _vB$1, _vC$1, face.normal); - intersection.face = face; - } - - return intersection; - } - - class BoxGeometry extends BufferGeometry { - constructor(width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1) { - super(); - this.type = 'BoxGeometry'; - this.parameters = { - width: width, - height: height, - depth: depth, - widthSegments: widthSegments, - heightSegments: heightSegments, - depthSegments: depthSegments - }; - const scope = this; // segments - - widthSegments = Math.floor(widthSegments); - heightSegments = Math.floor(heightSegments); - depthSegments = Math.floor(depthSegments); // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; // helper variables - - let numberOfVertices = 0; - let groupStart = 0; // build each side of the box geometry - - buildPlane('z', 'y', 'x', -1, -1, depth, height, width, depthSegments, heightSegments, 0); // px - - buildPlane('z', 'y', 'x', 1, -1, depth, height, -width, depthSegments, heightSegments, 1); // nx - - buildPlane('x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2); // py - - buildPlane('x', 'z', 'y', 1, -1, width, depth, -height, widthSegments, depthSegments, 3); // ny - - buildPlane('x', 'y', 'z', 1, -1, width, height, depth, widthSegments, heightSegments, 4); // pz - - buildPlane('x', 'y', 'z', -1, -1, width, height, -depth, widthSegments, heightSegments, 5); // nz - // build geometry - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); - - function buildPlane(u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex) { - const segmentWidth = width / gridX; - const segmentHeight = height / gridY; - const widthHalf = width / 2; - const heightHalf = height / 2; - const depthHalf = depth / 2; - const gridX1 = gridX + 1; - const gridY1 = gridY + 1; - let vertexCounter = 0; - let groupCount = 0; - const vector = new Vector3(); // generate vertices, normals and uvs - - for (let iy = 0; iy < gridY1; iy++) { - const y = iy * segmentHeight - heightHalf; - - for (let ix = 0; ix < gridX1; ix++) { - const x = ix * segmentWidth - widthHalf; // set values to correct vector component - - vector[u] = x * udir; - vector[v] = y * vdir; - vector[w] = depthHalf; // now apply vector to vertex buffer - - vertices.push(vector.x, vector.y, vector.z); // set values to correct vector component - - vector[u] = 0; - vector[v] = 0; - vector[w] = depth > 0 ? 1 : -1; // now apply vector to normal buffer - - normals.push(vector.x, vector.y, vector.z); // uvs - - uvs.push(ix / gridX); - uvs.push(1 - iy / gridY); // counters - - vertexCounter += 1; - } - } // indices - // 1. you need three indices to draw a single face - // 2. a single segment consists of two faces - // 3. so we need to generate six (2*3) indices per segment - - - for (let iy = 0; iy < gridY; iy++) { - for (let ix = 0; ix < gridX; ix++) { - const a = numberOfVertices + ix + gridX1 * iy; - const b = numberOfVertices + ix + gridX1 * (iy + 1); - const c = numberOfVertices + (ix + 1) + gridX1 * (iy + 1); - const d = numberOfVertices + (ix + 1) + gridX1 * iy; // faces - - indices.push(a, b, d); - indices.push(b, c, d); // increase counter - - groupCount += 6; - } - } // add a group to the geometry. this will ensure multi material support - - - scope.addGroup(groupStart, groupCount, materialIndex); // calculate new start value for groups - - groupStart += groupCount; // update total number of vertices - - numberOfVertices += vertexCounter; - } - } - - static fromJSON(data) { - return new BoxGeometry(data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments); - } - - } - - /** - * Uniform Utilities - */ - function cloneUniforms(src) { - const dst = {}; - - for (const u in src) { - dst[u] = {}; - - for (const p in src[u]) { - const property = src[u][p]; - - if (property && (property.isColor || property.isMatrix3 || property.isMatrix4 || property.isVector2 || property.isVector3 || property.isVector4 || property.isTexture || property.isQuaternion)) { - dst[u][p] = property.clone(); - } else if (Array.isArray(property)) { - dst[u][p] = property.slice(); - } else { - dst[u][p] = property; - } - } - } - - return dst; - } - function mergeUniforms(uniforms) { - const merged = {}; - - for (let u = 0; u < uniforms.length; u++) { - const tmp = cloneUniforms(uniforms[u]); - - for (const p in tmp) { - merged[p] = tmp[p]; - } - } - - return merged; - } // Legacy - - const UniformsUtils = { - clone: cloneUniforms, - merge: mergeUniforms - }; - - var default_vertex = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"; - - var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}"; - - /** - * parameters = { - * defines: { "label" : "value" }, - * uniforms: { "parameter1": { value: 1.0 }, "parameter2": { value2: 2 } }, - * - * fragmentShader: , - * vertexShader: , - * - * wireframe: , - * wireframeLinewidth: , - * - * lights: , - * - * morphTargets: , - * morphNormals: - * } - */ - - class ShaderMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'ShaderMaterial'; - this.defines = {}; - this.uniforms = {}; - this.vertexShader = default_vertex; - this.fragmentShader = default_fragment; - this.linewidth = 1; - this.wireframe = false; - this.wireframeLinewidth = 1; - this.fog = false; // set to use scene fog - - this.lights = false; // set to use scene lights - - this.clipping = false; // set to use user-defined clipping planes - - this.morphTargets = false; // set to use morph targets - - this.morphNormals = false; // set to use morph normals - - this.extensions = { - derivatives: false, - // set to use derivatives - fragDepth: false, - // set to use fragment depth values - drawBuffers: false, - // set to use draw buffers - shaderTextureLOD: false // set to use shader texture LOD - - }; // When rendered geometry doesn't include these attributes but the material does, - // use these default values in WebGL. This avoids errors when buffer data is missing. - - this.defaultAttributeValues = { - 'color': [1, 1, 1], - 'uv': [0, 0], - 'uv2': [0, 0] - }; - this.index0AttributeName = undefined; - this.uniformsNeedUpdate = false; - this.glslVersion = null; - - if (parameters !== undefined) { - if (parameters.attributes !== undefined) { - console.error('THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.'); - } - - this.setValues(parameters); - } - } - - copy(source) { - super.copy(source); - this.fragmentShader = source.fragmentShader; - this.vertexShader = source.vertexShader; - this.uniforms = cloneUniforms(source.uniforms); - this.defines = Object.assign({}, source.defines); - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.lights = source.lights; - this.clipping = source.clipping; - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - this.extensions = Object.assign({}, source.extensions); - this.glslVersion = source.glslVersion; - return this; - } - - toJSON(meta) { - const data = super.toJSON(meta); - data.glslVersion = this.glslVersion; - data.uniforms = {}; - - for (const name in this.uniforms) { - const uniform = this.uniforms[name]; - const value = uniform.value; - - if (value && value.isTexture) { - data.uniforms[name] = { - type: 't', - value: value.toJSON(meta).uuid - }; - } else if (value && value.isColor) { - data.uniforms[name] = { - type: 'c', - value: value.getHex() - }; - } else if (value && value.isVector2) { - data.uniforms[name] = { - type: 'v2', - value: value.toArray() - }; - } else if (value && value.isVector3) { - data.uniforms[name] = { - type: 'v3', - value: value.toArray() - }; - } else if (value && value.isVector4) { - data.uniforms[name] = { - type: 'v4', - value: value.toArray() - }; - } else if (value && value.isMatrix3) { - data.uniforms[name] = { - type: 'm3', - value: value.toArray() - }; - } else if (value && value.isMatrix4) { - data.uniforms[name] = { - type: 'm4', - value: value.toArray() - }; - } else { - data.uniforms[name] = { - value: value - }; // note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far - } - } - - if (Object.keys(this.defines).length > 0) data.defines = this.defines; - data.vertexShader = this.vertexShader; - data.fragmentShader = this.fragmentShader; - const extensions = {}; - - for (const key in this.extensions) { - if (this.extensions[key] === true) extensions[key] = true; - } - - if (Object.keys(extensions).length > 0) data.extensions = extensions; - return data; - } - - } - - ShaderMaterial.prototype.isShaderMaterial = true; - - class Camera extends Object3D { - constructor() { - super(); - this.type = 'Camera'; - this.matrixWorldInverse = new Matrix4(); - this.projectionMatrix = new Matrix4(); - this.projectionMatrixInverse = new Matrix4(); - } - - copy(source, recursive) { - super.copy(source, recursive); - this.matrixWorldInverse.copy(source.matrixWorldInverse); - this.projectionMatrix.copy(source.projectionMatrix); - this.projectionMatrixInverse.copy(source.projectionMatrixInverse); - return this; - } - - getWorldDirection(target) { - this.updateWorldMatrix(true, false); - const e = this.matrixWorld.elements; - return target.set(-e[8], -e[9], -e[10]).normalize(); - } - - updateMatrixWorld(force) { - super.updateMatrixWorld(force); - this.matrixWorldInverse.copy(this.matrixWorld).invert(); - } - - updateWorldMatrix(updateParents, updateChildren) { - super.updateWorldMatrix(updateParents, updateChildren); - this.matrixWorldInverse.copy(this.matrixWorld).invert(); - } - - clone() { - return new this.constructor().copy(this); - } - - } - - Camera.prototype.isCamera = true; - - class PerspectiveCamera extends Camera { - constructor(fov = 50, aspect = 1, near = 0.1, far = 2000) { - super(); - this.type = 'PerspectiveCamera'; - this.fov = fov; - this.zoom = 1; - this.near = near; - this.far = far; - this.focus = 10; - this.aspect = aspect; - this.view = null; - this.filmGauge = 35; // width of the film (default in millimeters) - - this.filmOffset = 0; // horizontal film offset (same unit as gauge) - - this.updateProjectionMatrix(); - } - - copy(source, recursive) { - super.copy(source, recursive); - this.fov = source.fov; - this.zoom = source.zoom; - this.near = source.near; - this.far = source.far; - this.focus = source.focus; - this.aspect = source.aspect; - this.view = source.view === null ? null : Object.assign({}, source.view); - this.filmGauge = source.filmGauge; - this.filmOffset = source.filmOffset; - return this; - } - /** - * Sets the FOV by focal length in respect to the current .filmGauge. - * - * The default film gauge is 35, so that the focal length can be specified for - * a 35mm (full frame) camera. - * - * Values for focal length and film gauge must have the same unit. - */ - - - setFocalLength(focalLength) { - /** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */ - const vExtentSlope = 0.5 * this.getFilmHeight() / focalLength; - this.fov = RAD2DEG * 2 * Math.atan(vExtentSlope); - this.updateProjectionMatrix(); - } - /** - * Calculates the focal length from the current .fov and .filmGauge. - */ - - - getFocalLength() { - const vExtentSlope = Math.tan(DEG2RAD * 0.5 * this.fov); - return 0.5 * this.getFilmHeight() / vExtentSlope; - } - - getEffectiveFOV() { - return RAD2DEG * 2 * Math.atan(Math.tan(DEG2RAD * 0.5 * this.fov) / this.zoom); - } - - getFilmWidth() { - // film not completely covered in portrait format (aspect < 1) - return this.filmGauge * Math.min(this.aspect, 1); - } - - getFilmHeight() { - // film not completely covered in landscape format (aspect > 1) - return this.filmGauge / Math.max(this.aspect, 1); - } - /** - * Sets an offset in a larger frustum. This is useful for multi-window or - * multi-monitor/multi-machine setups. - * - * For example, if you have 3x2 monitors and each monitor is 1920x1080 and - * the monitors are in grid like this - * - * +---+---+---+ - * | A | B | C | - * +---+---+---+ - * | D | E | F | - * +---+---+---+ - * - * then for each monitor you would call it like this - * - * const w = 1920; - * const h = 1080; - * const fullWidth = w * 3; - * const fullHeight = h * 2; - * - * --A-- - * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h ); - * --B-- - * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h ); - * --C-- - * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h ); - * --D-- - * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h ); - * --E-- - * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h ); - * --F-- - * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h ); - * - * Note there is no reason monitors have to be the same size or in a grid. - */ - - - setViewOffset(fullWidth, fullHeight, x, y, width, height) { - this.aspect = fullWidth / fullHeight; - - if (this.view === null) { - this.view = { - enabled: true, - fullWidth: 1, - fullHeight: 1, - offsetX: 0, - offsetY: 0, - width: 1, - height: 1 - }; - } - - this.view.enabled = true; - this.view.fullWidth = fullWidth; - this.view.fullHeight = fullHeight; - this.view.offsetX = x; - this.view.offsetY = y; - this.view.width = width; - this.view.height = height; - this.updateProjectionMatrix(); - } - - clearViewOffset() { - if (this.view !== null) { - this.view.enabled = false; - } - - this.updateProjectionMatrix(); - } - - updateProjectionMatrix() { - const near = this.near; - let top = near * Math.tan(DEG2RAD * 0.5 * this.fov) / this.zoom; - let height = 2 * top; - let width = this.aspect * height; - let left = -0.5 * width; - const view = this.view; - - if (this.view !== null && this.view.enabled) { - const fullWidth = view.fullWidth, - fullHeight = view.fullHeight; - left += view.offsetX * width / fullWidth; - top -= view.offsetY * height / fullHeight; - width *= view.width / fullWidth; - height *= view.height / fullHeight; - } - - const skew = this.filmOffset; - if (skew !== 0) left += near * skew / this.getFilmWidth(); - this.projectionMatrix.makePerspective(left, left + width, top, top - height, near, this.far); - this.projectionMatrixInverse.copy(this.projectionMatrix).invert(); - } - - toJSON(meta) { - const data = super.toJSON(meta); - data.object.fov = this.fov; - data.object.zoom = this.zoom; - data.object.near = this.near; - data.object.far = this.far; - data.object.focus = this.focus; - data.object.aspect = this.aspect; - if (this.view !== null) data.object.view = Object.assign({}, this.view); - data.object.filmGauge = this.filmGauge; - data.object.filmOffset = this.filmOffset; - return data; - } - - } - - PerspectiveCamera.prototype.isPerspectiveCamera = true; - - const fov = 90, - aspect = 1; - - class CubeCamera extends Object3D { - constructor(near, far, renderTarget) { - super(); - this.type = 'CubeCamera'; - - if (renderTarget.isWebGLCubeRenderTarget !== true) { - console.error('THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.'); - return; - } - - this.renderTarget = renderTarget; - const cameraPX = new PerspectiveCamera(fov, aspect, near, far); - cameraPX.layers = this.layers; - cameraPX.up.set(0, -1, 0); - cameraPX.lookAt(new Vector3(1, 0, 0)); - this.add(cameraPX); - const cameraNX = new PerspectiveCamera(fov, aspect, near, far); - cameraNX.layers = this.layers; - cameraNX.up.set(0, -1, 0); - cameraNX.lookAt(new Vector3(-1, 0, 0)); - this.add(cameraNX); - const cameraPY = new PerspectiveCamera(fov, aspect, near, far); - cameraPY.layers = this.layers; - cameraPY.up.set(0, 0, 1); - cameraPY.lookAt(new Vector3(0, 1, 0)); - this.add(cameraPY); - const cameraNY = new PerspectiveCamera(fov, aspect, near, far); - cameraNY.layers = this.layers; - cameraNY.up.set(0, 0, -1); - cameraNY.lookAt(new Vector3(0, -1, 0)); - this.add(cameraNY); - const cameraPZ = new PerspectiveCamera(fov, aspect, near, far); - cameraPZ.layers = this.layers; - cameraPZ.up.set(0, -1, 0); - cameraPZ.lookAt(new Vector3(0, 0, 1)); - this.add(cameraPZ); - const cameraNZ = new PerspectiveCamera(fov, aspect, near, far); - cameraNZ.layers = this.layers; - cameraNZ.up.set(0, -1, 0); - cameraNZ.lookAt(new Vector3(0, 0, -1)); - this.add(cameraNZ); - } - - update(renderer, scene) { - if (this.parent === null) this.updateMatrixWorld(); - const renderTarget = this.renderTarget; - const [cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ] = this.children; - const currentXrEnabled = renderer.xr.enabled; - const currentRenderTarget = renderer.getRenderTarget(); - renderer.xr.enabled = false; - const generateMipmaps = renderTarget.texture.generateMipmaps; - renderTarget.texture.generateMipmaps = false; - renderer.setRenderTarget(renderTarget, 0); - renderer.render(scene, cameraPX); - renderer.setRenderTarget(renderTarget, 1); - renderer.render(scene, cameraNX); - renderer.setRenderTarget(renderTarget, 2); - renderer.render(scene, cameraPY); - renderer.setRenderTarget(renderTarget, 3); - renderer.render(scene, cameraNY); - renderer.setRenderTarget(renderTarget, 4); - renderer.render(scene, cameraPZ); - renderTarget.texture.generateMipmaps = generateMipmaps; - renderer.setRenderTarget(renderTarget, 5); - renderer.render(scene, cameraNZ); - renderer.setRenderTarget(currentRenderTarget); - renderer.xr.enabled = currentXrEnabled; - } - - } - - class CubeTexture extends Texture { - constructor(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding) { - images = images !== undefined ? images : []; - mapping = mapping !== undefined ? mapping : CubeReflectionMapping; - format = format !== undefined ? format : RGBFormat; - super(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding); // Why CubeTexture._needsFlipEnvMap is necessary: - // - // By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js) - // in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words, - // in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly. - // three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped - // and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false) - // when using WebGLCubeRenderTarget.texture as a cube texture. - - this._needsFlipEnvMap = true; - this.flipY = false; - } - - get images() { - return this.image; - } - - set images(value) { - this.image = value; - } - - } - - CubeTexture.prototype.isCubeTexture = true; - - class WebGLCubeRenderTarget extends WebGLRenderTarget { - constructor(size, options, dummy) { - if (Number.isInteger(options)) { - console.warn('THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )'); - options = dummy; - } - - super(size, size, options); - options = options || {}; - this.texture = new CubeTexture(undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding); - this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false; - this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter; - this.texture._needsFlipEnvMap = false; - } - - fromEquirectangularTexture(renderer, texture) { - this.texture.type = texture.type; - this.texture.format = RGBAFormat; // see #18859 - - this.texture.encoding = texture.encoding; - this.texture.generateMipmaps = texture.generateMipmaps; - this.texture.minFilter = texture.minFilter; - this.texture.magFilter = texture.magFilter; - const shader = { - uniforms: { - tEquirect: { - value: null - } - }, - vertexShader: - /* glsl */ - ` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `, - fragmentShader: - /* glsl */ - ` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - ` - }; - const geometry = new BoxGeometry(5, 5, 5); - const material = new ShaderMaterial({ - name: 'CubemapFromEquirect', - uniforms: cloneUniforms(shader.uniforms), - vertexShader: shader.vertexShader, - fragmentShader: shader.fragmentShader, - side: BackSide, - blending: NoBlending - }); - material.uniforms.tEquirect.value = texture; - const mesh = new Mesh(geometry, material); - const currentMinFilter = texture.minFilter; // Avoid blurred poles - - if (texture.minFilter === LinearMipmapLinearFilter) texture.minFilter = LinearFilter; - const camera = new CubeCamera(1, 10, this); - camera.update(renderer, mesh); - texture.minFilter = currentMinFilter; - mesh.geometry.dispose(); - mesh.material.dispose(); - return this; - } - - clear(renderer, color, depth, stencil) { - const currentRenderTarget = renderer.getRenderTarget(); - - for (let i = 0; i < 6; i++) { - renderer.setRenderTarget(this, i); - renderer.clear(color, depth, stencil); - } - - renderer.setRenderTarget(currentRenderTarget); - } - - } - - WebGLCubeRenderTarget.prototype.isWebGLCubeRenderTarget = true; - - const _vector1 = /*@__PURE__*/new Vector3(); - - const _vector2 = /*@__PURE__*/new Vector3(); - - const _normalMatrix = /*@__PURE__*/new Matrix3(); - - class Plane { - constructor(normal = new Vector3(1, 0, 0), constant = 0) { - // normal is assumed to be normalized - this.normal = normal; - this.constant = constant; - } - - set(normal, constant) { - this.normal.copy(normal); - this.constant = constant; - return this; - } - - setComponents(x, y, z, w) { - this.normal.set(x, y, z); - this.constant = w; - return this; - } - - setFromNormalAndCoplanarPoint(normal, point) { - this.normal.copy(normal); - this.constant = -point.dot(this.normal); - return this; - } - - setFromCoplanarPoints(a, b, c) { - const normal = _vector1.subVectors(c, b).cross(_vector2.subVectors(a, b)).normalize(); // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? - - - this.setFromNormalAndCoplanarPoint(normal, a); - return this; - } - - copy(plane) { - this.normal.copy(plane.normal); - this.constant = plane.constant; - return this; - } - - normalize() { - // Note: will lead to a divide by zero if the plane is invalid. - const inverseNormalLength = 1.0 / this.normal.length(); - this.normal.multiplyScalar(inverseNormalLength); - this.constant *= inverseNormalLength; - return this; - } - - negate() { - this.constant *= -1; - this.normal.negate(); - return this; - } - - distanceToPoint(point) { - return this.normal.dot(point) + this.constant; - } - - distanceToSphere(sphere) { - return this.distanceToPoint(sphere.center) - sphere.radius; - } - - projectPoint(point, target) { - return target.copy(this.normal).multiplyScalar(-this.distanceToPoint(point)).add(point); - } - - intersectLine(line, target) { - const direction = line.delta(_vector1); - const denominator = this.normal.dot(direction); - - if (denominator === 0) { - // line is coplanar, return origin - if (this.distanceToPoint(line.start) === 0) { - return target.copy(line.start); - } // Unsure if this is the correct method to handle this case. - - - return null; - } - - const t = -(line.start.dot(this.normal) + this.constant) / denominator; - - if (t < 0 || t > 1) { - return null; - } - - return target.copy(direction).multiplyScalar(t).add(line.start); - } - - intersectsLine(line) { - // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it. - const startSign = this.distanceToPoint(line.start); - const endSign = this.distanceToPoint(line.end); - return startSign < 0 && endSign > 0 || endSign < 0 && startSign > 0; - } - - intersectsBox(box) { - return box.intersectsPlane(this); - } - - intersectsSphere(sphere) { - return sphere.intersectsPlane(this); - } - - coplanarPoint(target) { - return target.copy(this.normal).multiplyScalar(-this.constant); - } - - applyMatrix4(matrix, optionalNormalMatrix) { - const normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix(matrix); - - const referencePoint = this.coplanarPoint(_vector1).applyMatrix4(matrix); - const normal = this.normal.applyMatrix3(normalMatrix).normalize(); - this.constant = -referencePoint.dot(normal); - return this; - } - - translate(offset) { - this.constant -= offset.dot(this.normal); - return this; - } - - equals(plane) { - return plane.normal.equals(this.normal) && plane.constant === this.constant; - } - - clone() { - return new this.constructor().copy(this); - } - - } - - Plane.prototype.isPlane = true; - - const _sphere$2 = /*@__PURE__*/new Sphere(); - - const _vector$7 = /*@__PURE__*/new Vector3(); - - class Frustum { - constructor(p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane()) { - this.planes = [p0, p1, p2, p3, p4, p5]; - } - - set(p0, p1, p2, p3, p4, p5) { - const planes = this.planes; - planes[0].copy(p0); - planes[1].copy(p1); - planes[2].copy(p2); - planes[3].copy(p3); - planes[4].copy(p4); - planes[5].copy(p5); - return this; - } - - copy(frustum) { - const planes = this.planes; - - for (let i = 0; i < 6; i++) { - planes[i].copy(frustum.planes[i]); - } - - return this; - } - - setFromProjectionMatrix(m) { - const planes = this.planes; - const me = m.elements; - const me0 = me[0], - me1 = me[1], - me2 = me[2], - me3 = me[3]; - const me4 = me[4], - me5 = me[5], - me6 = me[6], - me7 = me[7]; - const me8 = me[8], - me9 = me[9], - me10 = me[10], - me11 = me[11]; - const me12 = me[12], - me13 = me[13], - me14 = me[14], - me15 = me[15]; - planes[0].setComponents(me3 - me0, me7 - me4, me11 - me8, me15 - me12).normalize(); - planes[1].setComponents(me3 + me0, me7 + me4, me11 + me8, me15 + me12).normalize(); - planes[2].setComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13).normalize(); - planes[3].setComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13).normalize(); - planes[4].setComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14).normalize(); - planes[5].setComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14).normalize(); - return this; - } - - intersectsObject(object) { - const geometry = object.geometry; - if (geometry.boundingSphere === null) geometry.computeBoundingSphere(); - - _sphere$2.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld); - - return this.intersectsSphere(_sphere$2); - } - - intersectsSprite(sprite) { - _sphere$2.center.set(0, 0, 0); - - _sphere$2.radius = 0.7071067811865476; - - _sphere$2.applyMatrix4(sprite.matrixWorld); - - return this.intersectsSphere(_sphere$2); - } - - intersectsSphere(sphere) { - const planes = this.planes; - const center = sphere.center; - const negRadius = -sphere.radius; - - for (let i = 0; i < 6; i++) { - const distance = planes[i].distanceToPoint(center); - - if (distance < negRadius) { - return false; - } - } - - return true; - } - - intersectsBox(box) { - const planes = this.planes; - - for (let i = 0; i < 6; i++) { - const plane = planes[i]; // corner at max distance - - _vector$7.x = plane.normal.x > 0 ? box.max.x : box.min.x; - _vector$7.y = plane.normal.y > 0 ? box.max.y : box.min.y; - _vector$7.z = plane.normal.z > 0 ? box.max.z : box.min.z; - - if (plane.distanceToPoint(_vector$7) < 0) { - return false; - } - } - - return true; - } - - containsPoint(point) { - const planes = this.planes; - - for (let i = 0; i < 6; i++) { - if (planes[i].distanceToPoint(point) < 0) { - return false; - } - } - - return true; - } - - clone() { - return new this.constructor().copy(this); - } - - } - - function WebGLAnimation() { - let context = null; - let isAnimating = false; - let animationLoop = null; - let requestId = null; - - function onAnimationFrame(time, frame) { - animationLoop(time, frame); - requestId = context.requestAnimationFrame(onAnimationFrame); - } - - return { - start: function () { - if (isAnimating === true) return; - if (animationLoop === null) return; - requestId = context.requestAnimationFrame(onAnimationFrame); - isAnimating = true; - }, - stop: function () { - context.cancelAnimationFrame(requestId); - isAnimating = false; - }, - setAnimationLoop: function (callback) { - animationLoop = callback; - }, - setContext: function (value) { - context = value; - } - }; - } - - function WebGLAttributes(gl, capabilities) { - const isWebGL2 = capabilities.isWebGL2; - const buffers = new WeakMap(); - - function createBuffer(attribute, bufferType) { - const array = attribute.array; - const usage = attribute.usage; - const buffer = gl.createBuffer(); - gl.bindBuffer(bufferType, buffer); - gl.bufferData(bufferType, array, usage); - attribute.onUploadCallback(); - let type = gl.FLOAT; - - if (array instanceof Float32Array) { - type = gl.FLOAT; - } else if (array instanceof Float64Array) { - console.warn('THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.'); - } else if (array instanceof Uint16Array) { - if (attribute.isFloat16BufferAttribute) { - if (isWebGL2) { - type = gl.HALF_FLOAT; - } else { - console.warn('THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.'); - } - } else { - type = gl.UNSIGNED_SHORT; - } - } else if (array instanceof Int16Array) { - type = gl.SHORT; - } else if (array instanceof Uint32Array) { - type = gl.UNSIGNED_INT; - } else if (array instanceof Int32Array) { - type = gl.INT; - } else if (array instanceof Int8Array) { - type = gl.BYTE; - } else if (array instanceof Uint8Array) { - type = gl.UNSIGNED_BYTE; - } else if (array instanceof Uint8ClampedArray) { - type = gl.UNSIGNED_BYTE; - } - - return { - buffer: buffer, - type: type, - bytesPerElement: array.BYTES_PER_ELEMENT, - version: attribute.version - }; - } - - function updateBuffer(buffer, attribute, bufferType) { - const array = attribute.array; - const updateRange = attribute.updateRange; - gl.bindBuffer(bufferType, buffer); - - if (updateRange.count === -1) { - // Not using update ranges - gl.bufferSubData(bufferType, 0, array); - } else { - if (isWebGL2) { - gl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array, updateRange.offset, updateRange.count); - } else { - gl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array.subarray(updateRange.offset, updateRange.offset + updateRange.count)); - } - - updateRange.count = -1; // reset range - } - } // - - - function get(attribute) { - if (attribute.isInterleavedBufferAttribute) attribute = attribute.data; - return buffers.get(attribute); - } - - function remove(attribute) { - if (attribute.isInterleavedBufferAttribute) attribute = attribute.data; - const data = buffers.get(attribute); - - if (data) { - gl.deleteBuffer(data.buffer); - buffers.delete(attribute); - } - } - - function update(attribute, bufferType) { - if (attribute.isGLBufferAttribute) { - const cached = buffers.get(attribute); - - if (!cached || cached.version < attribute.version) { - buffers.set(attribute, { - buffer: attribute.buffer, - type: attribute.type, - bytesPerElement: attribute.elementSize, - version: attribute.version - }); - } - - return; - } - - if (attribute.isInterleavedBufferAttribute) attribute = attribute.data; - const data = buffers.get(attribute); - - if (data === undefined) { - buffers.set(attribute, createBuffer(attribute, bufferType)); - } else if (data.version < attribute.version) { - updateBuffer(data.buffer, attribute, bufferType); - data.version = attribute.version; - } - } - - return { - get: get, - remove: remove, - update: update - }; - } - - class PlaneGeometry extends BufferGeometry { - constructor(width = 1, height = 1, widthSegments = 1, heightSegments = 1) { - super(); - this.type = 'PlaneGeometry'; - this.parameters = { - width: width, - height: height, - widthSegments: widthSegments, - heightSegments: heightSegments - }; - const width_half = width / 2; - const height_half = height / 2; - const gridX = Math.floor(widthSegments); - const gridY = Math.floor(heightSegments); - const gridX1 = gridX + 1; - const gridY1 = gridY + 1; - const segment_width = width / gridX; - const segment_height = height / gridY; // - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - for (let iy = 0; iy < gridY1; iy++) { - const y = iy * segment_height - height_half; - - for (let ix = 0; ix < gridX1; ix++) { - const x = ix * segment_width - width_half; - vertices.push(x, -y, 0); - normals.push(0, 0, 1); - uvs.push(ix / gridX); - uvs.push(1 - iy / gridY); - } - } - - for (let iy = 0; iy < gridY; iy++) { - for (let ix = 0; ix < gridX; ix++) { - const a = ix + gridX1 * iy; - const b = ix + gridX1 * (iy + 1); - const c = ix + 1 + gridX1 * (iy + 1); - const d = ix + 1 + gridX1 * iy; - indices.push(a, b, d); - indices.push(b, c, d); - } - } - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); - } - - static fromJSON(data) { - return new PlaneGeometry(data.width, data.height, data.widthSegments, data.heightSegments); - } - - } - - var alphamap_fragment = "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif"; - - var alphamap_pars_fragment = "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif"; - - var alphatest_fragment = "#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif"; - - var aomap_fragment = "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif"; - - var aomap_pars_fragment = "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif"; - - var begin_vertex = "vec3 transformed = vec3( position );"; - - var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif"; - - var bsdfs = "vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif"; - - var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif"; - - var clipping_planes_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif"; - - var clipping_planes_pars_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif"; - - var clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif"; - - var clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif"; - - var color_fragment = "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif"; - - var color_pars_fragment = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif"; - - var color_pars_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif"; - - var color_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif"; - - var common = "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}"; - - var cube_uv_reflection_fragment = "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif"; - - var defaultnormal_vertex = "vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif"; - - var displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif"; - - var displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif"; - - var emissivemap_fragment = "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif"; - - var emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif"; - - var encodings_fragment = "gl_FragColor = linearToOutputTexel( gl_FragColor );"; - - var encodings_pars_fragment = "\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}"; - - var envmap_fragment = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif"; - - var envmap_common_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif"; - - var envmap_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif"; - - var envmap_pars_vertex = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif"; - - var envmap_vertex = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif"; - - var fog_vertex = "#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif"; - - var fog_pars_vertex = "#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif"; - - var fog_fragment = "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif"; - - var fog_pars_fragment = "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif"; - - var gradientmap_pars_fragment = "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}"; - - var lightmap_fragment = "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif"; - - var lightmap_pars_fragment = "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif"; - - var lights_lambert_vertex = "vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif"; - - var lights_pars_begin = "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif"; - - var envmap_physical_pars_fragment = "#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif"; - - var lights_toon_fragment = "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;"; - - var lights_toon_pars_fragment = "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)"; - - var lights_phong_fragment = "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;"; - - var lights_phong_pars_fragment = "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)"; - - var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif"; - - var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}"; - - var lights_fragment_begin = "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif"; - - var lights_fragment_maps = "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif"; - - var lights_fragment_end = "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif"; - - var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif"; - - var logdepthbuf_pars_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif"; - - var logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif"; - - var logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif"; - - var map_fragment = "#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif"; - - var map_pars_fragment = "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif"; - - var map_particle_fragment = "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif"; - - var map_particle_pars_fragment = "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif"; - - var metalnessmap_fragment = "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif"; - - var metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif"; - - var morphnormal_vertex = "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif"; - - var morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif"; - - var morphtarget_vertex = "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif"; - - var normal_fragment_begin = "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;"; - - var normal_fragment_maps = "#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif"; - - var normalmap_pars_fragment = "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif"; - - var clearcoat_normal_fragment_begin = "#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif"; - - var clearcoat_normal_fragment_maps = "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif"; - - var clearcoat_pars_fragment = "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif"; - - var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}"; - - var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif"; - - var project_vertex = "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;"; - - var dithering_fragment = "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif"; - - var dithering_pars_fragment = "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif"; - - var roughnessmap_fragment = "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif"; - - var roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif"; - - var shadowmap_pars_fragment = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif"; - - var shadowmap_pars_vertex = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif"; - - var shadowmap_vertex = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif"; - - var shadowmask_pars_fragment = "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}"; - - var skinbase_vertex = "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif"; - - var skinning_pars_vertex = "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif"; - - var skinning_vertex = "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif"; - - var skinnormal_vertex = "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif"; - - var specularmap_fragment = "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif"; - - var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif"; - - var tonemapping_fragment = "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif"; - - var tonemapping_pars_fragment = "#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }"; - - var transmission_fragment = "#ifdef USE_TRANSMISSION\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSNMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n\tvec3 v = normalize( cameraPosition - pos );\n\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n\tvec3 transmission = transmissionFactor * getIBLVolumeRefraction(\n\t\tnormal, v, roughnessFactor, material.diffuseColor, totalSpecular,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\n#endif"; - - var transmission_pars_fragment = "#ifdef USE_TRANSMISSION\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec4 vWorldPosition;\n\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n\t\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\n\t\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\n\t\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\n\t\treturn normalize(refractionVector) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness(float roughness, float ior) {\n\t\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n\t}\n\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n\t\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n\t\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n\t}\n\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n\t\tif (attenuationDistance == 0.0) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n\t\t\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, float attenuationDistance) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n\t\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n\t\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\n\t}\n#endif"; - - var uv_pars_fragment = "#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif"; - - var uv_pars_vertex = "#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif"; - - var uv_vertex = "#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif"; - - var uv2_pars_fragment = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif"; - - var uv2_pars_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif"; - - var uv2_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif"; - - var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif"; - - var background_frag = "uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}"; - - var background_vert = "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}"; - - var cube_frag = "#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}"; - - var cube_vert = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; - - var depth_frag = "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}"; - - var depth_vert = "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}"; - - var distanceRGBA_frag = "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}"; - - var distanceRGBA_vert = "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}"; - - var equirect_frag = "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}"; - - var equirect_vert = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}"; - - var linedashed_frag = "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var linedashed_vert = "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshbasic_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshbasic_vert = "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshlambert_frag = "uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshlambert_vert = "#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshmatcap_frag = "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshmatcap_vert = "#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}"; - - var meshtoon_frag = "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshtoon_vert = "#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}"; - - var meshphong_frag = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshphong_vert = "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshphysical_frag = "#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform vec3 attenuationColor;\n\tuniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var meshphysical_vert = "#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#ifdef USE_TRANSMISSION\n\tvarying vec4 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition;\n#endif\n}"; - - var normal_frag = "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}"; - - var normal_vert = "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}"; - - var points_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var points_vert = "uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var shadow_frag = "uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}"; - - var shadow_vert = "#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - - var sprite_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}"; - - var sprite_vert = "uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"; - - const ShaderChunk = { - alphamap_fragment: alphamap_fragment, - alphamap_pars_fragment: alphamap_pars_fragment, - alphatest_fragment: alphatest_fragment, - aomap_fragment: aomap_fragment, - aomap_pars_fragment: aomap_pars_fragment, - begin_vertex: begin_vertex, - beginnormal_vertex: beginnormal_vertex, - bsdfs: bsdfs, - bumpmap_pars_fragment: bumpmap_pars_fragment, - clipping_planes_fragment: clipping_planes_fragment, - clipping_planes_pars_fragment: clipping_planes_pars_fragment, - clipping_planes_pars_vertex: clipping_planes_pars_vertex, - clipping_planes_vertex: clipping_planes_vertex, - color_fragment: color_fragment, - color_pars_fragment: color_pars_fragment, - color_pars_vertex: color_pars_vertex, - color_vertex: color_vertex, - common: common, - cube_uv_reflection_fragment: cube_uv_reflection_fragment, - defaultnormal_vertex: defaultnormal_vertex, - displacementmap_pars_vertex: displacementmap_pars_vertex, - displacementmap_vertex: displacementmap_vertex, - emissivemap_fragment: emissivemap_fragment, - emissivemap_pars_fragment: emissivemap_pars_fragment, - encodings_fragment: encodings_fragment, - encodings_pars_fragment: encodings_pars_fragment, - envmap_fragment: envmap_fragment, - envmap_common_pars_fragment: envmap_common_pars_fragment, - envmap_pars_fragment: envmap_pars_fragment, - envmap_pars_vertex: envmap_pars_vertex, - envmap_physical_pars_fragment: envmap_physical_pars_fragment, - envmap_vertex: envmap_vertex, - fog_vertex: fog_vertex, - fog_pars_vertex: fog_pars_vertex, - fog_fragment: fog_fragment, - fog_pars_fragment: fog_pars_fragment, - gradientmap_pars_fragment: gradientmap_pars_fragment, - lightmap_fragment: lightmap_fragment, - lightmap_pars_fragment: lightmap_pars_fragment, - lights_lambert_vertex: lights_lambert_vertex, - lights_pars_begin: lights_pars_begin, - lights_toon_fragment: lights_toon_fragment, - lights_toon_pars_fragment: lights_toon_pars_fragment, - lights_phong_fragment: lights_phong_fragment, - lights_phong_pars_fragment: lights_phong_pars_fragment, - lights_physical_fragment: lights_physical_fragment, - lights_physical_pars_fragment: lights_physical_pars_fragment, - lights_fragment_begin: lights_fragment_begin, - lights_fragment_maps: lights_fragment_maps, - lights_fragment_end: lights_fragment_end, - logdepthbuf_fragment: logdepthbuf_fragment, - logdepthbuf_pars_fragment: logdepthbuf_pars_fragment, - logdepthbuf_pars_vertex: logdepthbuf_pars_vertex, - logdepthbuf_vertex: logdepthbuf_vertex, - map_fragment: map_fragment, - map_pars_fragment: map_pars_fragment, - map_particle_fragment: map_particle_fragment, - map_particle_pars_fragment: map_particle_pars_fragment, - metalnessmap_fragment: metalnessmap_fragment, - metalnessmap_pars_fragment: metalnessmap_pars_fragment, - morphnormal_vertex: morphnormal_vertex, - morphtarget_pars_vertex: morphtarget_pars_vertex, - morphtarget_vertex: morphtarget_vertex, - normal_fragment_begin: normal_fragment_begin, - normal_fragment_maps: normal_fragment_maps, - normalmap_pars_fragment: normalmap_pars_fragment, - clearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin, - clearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps, - clearcoat_pars_fragment: clearcoat_pars_fragment, - packing: packing, - premultiplied_alpha_fragment: premultiplied_alpha_fragment, - project_vertex: project_vertex, - dithering_fragment: dithering_fragment, - dithering_pars_fragment: dithering_pars_fragment, - roughnessmap_fragment: roughnessmap_fragment, - roughnessmap_pars_fragment: roughnessmap_pars_fragment, - shadowmap_pars_fragment: shadowmap_pars_fragment, - shadowmap_pars_vertex: shadowmap_pars_vertex, - shadowmap_vertex: shadowmap_vertex, - shadowmask_pars_fragment: shadowmask_pars_fragment, - skinbase_vertex: skinbase_vertex, - skinning_pars_vertex: skinning_pars_vertex, - skinning_vertex: skinning_vertex, - skinnormal_vertex: skinnormal_vertex, - specularmap_fragment: specularmap_fragment, - specularmap_pars_fragment: specularmap_pars_fragment, - tonemapping_fragment: tonemapping_fragment, - tonemapping_pars_fragment: tonemapping_pars_fragment, - transmission_fragment: transmission_fragment, - transmission_pars_fragment: transmission_pars_fragment, - uv_pars_fragment: uv_pars_fragment, - uv_pars_vertex: uv_pars_vertex, - uv_vertex: uv_vertex, - uv2_pars_fragment: uv2_pars_fragment, - uv2_pars_vertex: uv2_pars_vertex, - uv2_vertex: uv2_vertex, - worldpos_vertex: worldpos_vertex, - background_frag: background_frag, - background_vert: background_vert, - cube_frag: cube_frag, - cube_vert: cube_vert, - depth_frag: depth_frag, - depth_vert: depth_vert, - distanceRGBA_frag: distanceRGBA_frag, - distanceRGBA_vert: distanceRGBA_vert, - equirect_frag: equirect_frag, - equirect_vert: equirect_vert, - linedashed_frag: linedashed_frag, - linedashed_vert: linedashed_vert, - meshbasic_frag: meshbasic_frag, - meshbasic_vert: meshbasic_vert, - meshlambert_frag: meshlambert_frag, - meshlambert_vert: meshlambert_vert, - meshmatcap_frag: meshmatcap_frag, - meshmatcap_vert: meshmatcap_vert, - meshtoon_frag: meshtoon_frag, - meshtoon_vert: meshtoon_vert, - meshphong_frag: meshphong_frag, - meshphong_vert: meshphong_vert, - meshphysical_frag: meshphysical_frag, - meshphysical_vert: meshphysical_vert, - normal_frag: normal_frag, - normal_vert: normal_vert, - points_frag: points_frag, - points_vert: points_vert, - shadow_frag: shadow_frag, - shadow_vert: shadow_vert, - sprite_frag: sprite_frag, - sprite_vert: sprite_vert - }; - - /** - * Uniforms library for shared webgl shaders - */ - - const UniformsLib = { - common: { - diffuse: { - value: new Color(0xffffff) - }, - opacity: { - value: 1.0 - }, - map: { - value: null - }, - uvTransform: { - value: new Matrix3() - }, - uv2Transform: { - value: new Matrix3() - }, - alphaMap: { - value: null - } - }, - specularmap: { - specularMap: { - value: null - } - }, - envmap: { - envMap: { - value: null - }, - flipEnvMap: { - value: -1 - }, - reflectivity: { - value: 1.0 - }, - refractionRatio: { - value: 0.98 - }, - maxMipLevel: { - value: 0 - } - }, - aomap: { - aoMap: { - value: null - }, - aoMapIntensity: { - value: 1 - } - }, - lightmap: { - lightMap: { - value: null - }, - lightMapIntensity: { - value: 1 - } - }, - emissivemap: { - emissiveMap: { - value: null - } - }, - bumpmap: { - bumpMap: { - value: null - }, - bumpScale: { - value: 1 - } - }, - normalmap: { - normalMap: { - value: null - }, - normalScale: { - value: new Vector2(1, 1) - } - }, - displacementmap: { - displacementMap: { - value: null - }, - displacementScale: { - value: 1 - }, - displacementBias: { - value: 0 - } - }, - roughnessmap: { - roughnessMap: { - value: null - } - }, - metalnessmap: { - metalnessMap: { - value: null - } - }, - gradientmap: { - gradientMap: { - value: null - } - }, - fog: { - fogDensity: { - value: 0.00025 - }, - fogNear: { - value: 1 - }, - fogFar: { - value: 2000 - }, - fogColor: { - value: new Color(0xffffff) - } - }, - lights: { - ambientLightColor: { - value: [] - }, - lightProbe: { - value: [] - }, - directionalLights: { - value: [], - properties: { - direction: {}, - color: {} - } - }, - directionalLightShadows: { - value: [], - properties: { - shadowBias: {}, - shadowNormalBias: {}, - shadowRadius: {}, - shadowMapSize: {} - } - }, - directionalShadowMap: { - value: [] - }, - directionalShadowMatrix: { - value: [] - }, - spotLights: { - value: [], - properties: { - color: {}, - position: {}, - direction: {}, - distance: {}, - coneCos: {}, - penumbraCos: {}, - decay: {} - } - }, - spotLightShadows: { - value: [], - properties: { - shadowBias: {}, - shadowNormalBias: {}, - shadowRadius: {}, - shadowMapSize: {} - } - }, - spotShadowMap: { - value: [] - }, - spotShadowMatrix: { - value: [] - }, - pointLights: { - value: [], - properties: { - color: {}, - position: {}, - decay: {}, - distance: {} - } - }, - pointLightShadows: { - value: [], - properties: { - shadowBias: {}, - shadowNormalBias: {}, - shadowRadius: {}, - shadowMapSize: {}, - shadowCameraNear: {}, - shadowCameraFar: {} - } - }, - pointShadowMap: { - value: [] - }, - pointShadowMatrix: { - value: [] - }, - hemisphereLights: { - value: [], - properties: { - direction: {}, - skyColor: {}, - groundColor: {} - } - }, - // TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src - rectAreaLights: { - value: [], - properties: { - color: {}, - position: {}, - width: {}, - height: {} - } - }, - ltc_1: { - value: null - }, - ltc_2: { - value: null - } - }, - points: { - diffuse: { - value: new Color(0xffffff) - }, - opacity: { - value: 1.0 - }, - size: { - value: 1.0 - }, - scale: { - value: 1.0 - }, - map: { - value: null - }, - alphaMap: { - value: null - }, - uvTransform: { - value: new Matrix3() - } - }, - sprite: { - diffuse: { - value: new Color(0xffffff) - }, - opacity: { - value: 1.0 - }, - center: { - value: new Vector2(0.5, 0.5) - }, - rotation: { - value: 0.0 - }, - map: { - value: null - }, - alphaMap: { - value: null - }, - uvTransform: { - value: new Matrix3() - } - } - }; - - const ShaderLib = { - basic: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.fog]), - vertexShader: ShaderChunk.meshbasic_vert, - fragmentShader: ShaderChunk.meshbasic_frag - }, - lambert: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.fog, UniformsLib.lights, { - emissive: { - value: new Color(0x000000) - } - }]), - vertexShader: ShaderChunk.meshlambert_vert, - fragmentShader: ShaderChunk.meshlambert_frag - }, - phong: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.fog, UniformsLib.lights, { - emissive: { - value: new Color(0x000000) - }, - specular: { - value: new Color(0x111111) - }, - shininess: { - value: 30 - } - }]), - vertexShader: ShaderChunk.meshphong_vert, - fragmentShader: ShaderChunk.meshphong_frag - }, - standard: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.roughnessmap, UniformsLib.metalnessmap, UniformsLib.fog, UniformsLib.lights, { - emissive: { - value: new Color(0x000000) - }, - roughness: { - value: 1.0 - }, - metalness: { - value: 0.0 - }, - envMapIntensity: { - value: 1 - } // temporary - - }]), - vertexShader: ShaderChunk.meshphysical_vert, - fragmentShader: ShaderChunk.meshphysical_frag - }, - toon: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.gradientmap, UniformsLib.fog, UniformsLib.lights, { - emissive: { - value: new Color(0x000000) - } - }]), - vertexShader: ShaderChunk.meshtoon_vert, - fragmentShader: ShaderChunk.meshtoon_frag - }, - matcap: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.fog, { - matcap: { - value: null - } - }]), - vertexShader: ShaderChunk.meshmatcap_vert, - fragmentShader: ShaderChunk.meshmatcap_frag - }, - points: { - uniforms: mergeUniforms([UniformsLib.points, UniformsLib.fog]), - vertexShader: ShaderChunk.points_vert, - fragmentShader: ShaderChunk.points_frag - }, - dashed: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.fog, { - scale: { - value: 1 - }, - dashSize: { - value: 1 - }, - totalSize: { - value: 2 - } - }]), - vertexShader: ShaderChunk.linedashed_vert, - fragmentShader: ShaderChunk.linedashed_frag - }, - depth: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.displacementmap]), - vertexShader: ShaderChunk.depth_vert, - fragmentShader: ShaderChunk.depth_frag - }, - normal: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, { - opacity: { - value: 1.0 - } - }]), - vertexShader: ShaderChunk.normal_vert, - fragmentShader: ShaderChunk.normal_frag - }, - sprite: { - uniforms: mergeUniforms([UniformsLib.sprite, UniformsLib.fog]), - vertexShader: ShaderChunk.sprite_vert, - fragmentShader: ShaderChunk.sprite_frag - }, - background: { - uniforms: { - uvTransform: { - value: new Matrix3() - }, - t2D: { - value: null - } - }, - vertexShader: ShaderChunk.background_vert, - fragmentShader: ShaderChunk.background_frag - }, - - /* ------------------------------------------------------------------------- - // Cube map shader - ------------------------------------------------------------------------- */ - cube: { - uniforms: mergeUniforms([UniformsLib.envmap, { - opacity: { - value: 1.0 - } - }]), - vertexShader: ShaderChunk.cube_vert, - fragmentShader: ShaderChunk.cube_frag - }, - equirect: { - uniforms: { - tEquirect: { - value: null - } - }, - vertexShader: ShaderChunk.equirect_vert, - fragmentShader: ShaderChunk.equirect_frag - }, - distanceRGBA: { - uniforms: mergeUniforms([UniformsLib.common, UniformsLib.displacementmap, { - referencePosition: { - value: new Vector3() - }, - nearDistance: { - value: 1 - }, - farDistance: { - value: 1000 - } - }]), - vertexShader: ShaderChunk.distanceRGBA_vert, - fragmentShader: ShaderChunk.distanceRGBA_frag - }, - shadow: { - uniforms: mergeUniforms([UniformsLib.lights, UniformsLib.fog, { - color: { - value: new Color(0x00000) - }, - opacity: { - value: 1.0 - } - }]), - vertexShader: ShaderChunk.shadow_vert, - fragmentShader: ShaderChunk.shadow_frag - } - }; - ShaderLib.physical = { - uniforms: mergeUniforms([ShaderLib.standard.uniforms, { - clearcoat: { - value: 0 - }, - clearcoatMap: { - value: null - }, - clearcoatRoughness: { - value: 0 - }, - clearcoatRoughnessMap: { - value: null - }, - clearcoatNormalScale: { - value: new Vector2(1, 1) - }, - clearcoatNormalMap: { - value: null - }, - sheen: { - value: new Color(0x000000) - }, - transmission: { - value: 0 - }, - transmissionMap: { - value: null - }, - transmissionSamplerSize: { - value: new Vector2() - }, - transmissionSamplerMap: { - value: null - }, - thickness: { - value: 0 - }, - thicknessMap: { - value: null - }, - attenuationDistance: { - value: 0 - }, - attenuationColor: { - value: new Color(0x000000) - } - }]), - vertexShader: ShaderChunk.meshphysical_vert, - fragmentShader: ShaderChunk.meshphysical_frag - }; - - function WebGLBackground(renderer, cubemaps, state, objects, premultipliedAlpha) { - const clearColor = new Color(0x000000); - let clearAlpha = 0; - let planeMesh; - let boxMesh; - let currentBackground = null; - let currentBackgroundVersion = 0; - let currentTonemapping = null; - - function render(renderList, scene) { - let forceClear = false; - let background = scene.isScene === true ? scene.background : null; - - if (background && background.isTexture) { - background = cubemaps.get(background); - } // Ignore background in AR - // TODO: Reconsider this. - - - const xr = renderer.xr; - const session = xr.getSession && xr.getSession(); - - if (session && session.environmentBlendMode === 'additive') { - background = null; - } - - if (background === null) { - setClear(clearColor, clearAlpha); - } else if (background && background.isColor) { - setClear(background, 1); - forceClear = true; - } - - if (renderer.autoClear || forceClear) { - renderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil); - } - - if (background && (background.isCubeTexture || background.mapping === CubeUVReflectionMapping)) { - if (boxMesh === undefined) { - boxMesh = new Mesh(new BoxGeometry(1, 1, 1), new ShaderMaterial({ - name: 'BackgroundCubeMaterial', - uniforms: cloneUniforms(ShaderLib.cube.uniforms), - vertexShader: ShaderLib.cube.vertexShader, - fragmentShader: ShaderLib.cube.fragmentShader, - side: BackSide, - depthTest: false, - depthWrite: false, - fog: false - })); - boxMesh.geometry.deleteAttribute('normal'); - boxMesh.geometry.deleteAttribute('uv'); - - boxMesh.onBeforeRender = function (renderer, scene, camera) { - this.matrixWorld.copyPosition(camera.matrixWorld); - }; // enable code injection for non-built-in material - - - Object.defineProperty(boxMesh.material, 'envMap', { - get: function () { - return this.uniforms.envMap.value; - } - }); - objects.update(boxMesh); - } - - boxMesh.material.uniforms.envMap.value = background; - boxMesh.material.uniforms.flipEnvMap.value = background.isCubeTexture && background._needsFlipEnvMap ? -1 : 1; - - if (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) { - boxMesh.material.needsUpdate = true; - currentBackground = background; - currentBackgroundVersion = background.version; - currentTonemapping = renderer.toneMapping; - } // push to the pre-sorted opaque render list - - - renderList.unshift(boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null); - } else if (background && background.isTexture) { - if (planeMesh === undefined) { - planeMesh = new Mesh(new PlaneGeometry(2, 2), new ShaderMaterial({ - name: 'BackgroundMaterial', - uniforms: cloneUniforms(ShaderLib.background.uniforms), - vertexShader: ShaderLib.background.vertexShader, - fragmentShader: ShaderLib.background.fragmentShader, - side: FrontSide, - depthTest: false, - depthWrite: false, - fog: false - })); - planeMesh.geometry.deleteAttribute('normal'); // enable code injection for non-built-in material - - Object.defineProperty(planeMesh.material, 'map', { - get: function () { - return this.uniforms.t2D.value; - } - }); - objects.update(planeMesh); - } - - planeMesh.material.uniforms.t2D.value = background; - - if (background.matrixAutoUpdate === true) { - background.updateMatrix(); - } - - planeMesh.material.uniforms.uvTransform.value.copy(background.matrix); - - if (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) { - planeMesh.material.needsUpdate = true; - currentBackground = background; - currentBackgroundVersion = background.version; - currentTonemapping = renderer.toneMapping; - } // push to the pre-sorted opaque render list - - - renderList.unshift(planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null); - } - } - - function setClear(color, alpha) { - state.buffers.color.setClear(color.r, color.g, color.b, alpha, premultipliedAlpha); - } - - return { - getClearColor: function () { - return clearColor; - }, - setClearColor: function (color, alpha = 1) { - clearColor.set(color); - clearAlpha = alpha; - setClear(clearColor, clearAlpha); - }, - getClearAlpha: function () { - return clearAlpha; - }, - setClearAlpha: function (alpha) { - clearAlpha = alpha; - setClear(clearColor, clearAlpha); - }, - render: render - }; - } - - function WebGLBindingStates(gl, extensions, attributes, capabilities) { - const maxVertexAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); - const extension = capabilities.isWebGL2 ? null : extensions.get('OES_vertex_array_object'); - const vaoAvailable = capabilities.isWebGL2 || extension !== null; - const bindingStates = {}; - const defaultState = createBindingState(null); - let currentState = defaultState; - - function setup(object, material, program, geometry, index) { - let updateBuffers = false; - - if (vaoAvailable) { - const state = getBindingState(geometry, program, material); - - if (currentState !== state) { - currentState = state; - bindVertexArrayObject(currentState.object); - } - - updateBuffers = needsUpdate(geometry, index); - if (updateBuffers) saveCache(geometry, index); - } else { - const wireframe = material.wireframe === true; - - if (currentState.geometry !== geometry.id || currentState.program !== program.id || currentState.wireframe !== wireframe) { - currentState.geometry = geometry.id; - currentState.program = program.id; - currentState.wireframe = wireframe; - updateBuffers = true; - } - } - - if (object.isInstancedMesh === true) { - updateBuffers = true; - } - - if (index !== null) { - attributes.update(index, gl.ELEMENT_ARRAY_BUFFER); - } - - if (updateBuffers) { - setupVertexAttributes(object, material, program, geometry); - - if (index !== null) { - gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, attributes.get(index).buffer); - } - } - } - - function createVertexArrayObject() { - if (capabilities.isWebGL2) return gl.createVertexArray(); - return extension.createVertexArrayOES(); - } - - function bindVertexArrayObject(vao) { - if (capabilities.isWebGL2) return gl.bindVertexArray(vao); - return extension.bindVertexArrayOES(vao); - } - - function deleteVertexArrayObject(vao) { - if (capabilities.isWebGL2) return gl.deleteVertexArray(vao); - return extension.deleteVertexArrayOES(vao); - } - - function getBindingState(geometry, program, material) { - const wireframe = material.wireframe === true; - let programMap = bindingStates[geometry.id]; - - if (programMap === undefined) { - programMap = {}; - bindingStates[geometry.id] = programMap; - } - - let stateMap = programMap[program.id]; - - if (stateMap === undefined) { - stateMap = {}; - programMap[program.id] = stateMap; - } - - let state = stateMap[wireframe]; - - if (state === undefined) { - state = createBindingState(createVertexArrayObject()); - stateMap[wireframe] = state; - } - - return state; - } - - function createBindingState(vao) { - const newAttributes = []; - const enabledAttributes = []; - const attributeDivisors = []; - - for (let i = 0; i < maxVertexAttributes; i++) { - newAttributes[i] = 0; - enabledAttributes[i] = 0; - attributeDivisors[i] = 0; - } - - return { - // for backward compatibility on non-VAO support browser - geometry: null, - program: null, - wireframe: false, - newAttributes: newAttributes, - enabledAttributes: enabledAttributes, - attributeDivisors: attributeDivisors, - object: vao, - attributes: {}, - index: null - }; - } - - function needsUpdate(geometry, index) { - const cachedAttributes = currentState.attributes; - const geometryAttributes = geometry.attributes; - let attributesNum = 0; - - for (const key in geometryAttributes) { - const cachedAttribute = cachedAttributes[key]; - const geometryAttribute = geometryAttributes[key]; - if (cachedAttribute === undefined) return true; - if (cachedAttribute.attribute !== geometryAttribute) return true; - if (cachedAttribute.data !== geometryAttribute.data) return true; - attributesNum++; - } - - if (currentState.attributesNum !== attributesNum) return true; - if (currentState.index !== index) return true; - return false; - } - - function saveCache(geometry, index) { - const cache = {}; - const attributes = geometry.attributes; - let attributesNum = 0; - - for (const key in attributes) { - const attribute = attributes[key]; - const data = {}; - data.attribute = attribute; - - if (attribute.data) { - data.data = attribute.data; - } - - cache[key] = data; - attributesNum++; - } - - currentState.attributes = cache; - currentState.attributesNum = attributesNum; - currentState.index = index; - } - - function initAttributes() { - const newAttributes = currentState.newAttributes; - - for (let i = 0, il = newAttributes.length; i < il; i++) { - newAttributes[i] = 0; - } - } - - function enableAttribute(attribute) { - enableAttributeAndDivisor(attribute, 0); - } - - function enableAttributeAndDivisor(attribute, meshPerAttribute) { - const newAttributes = currentState.newAttributes; - const enabledAttributes = currentState.enabledAttributes; - const attributeDivisors = currentState.attributeDivisors; - newAttributes[attribute] = 1; - - if (enabledAttributes[attribute] === 0) { - gl.enableVertexAttribArray(attribute); - enabledAttributes[attribute] = 1; - } - - if (attributeDivisors[attribute] !== meshPerAttribute) { - const extension = capabilities.isWebGL2 ? gl : extensions.get('ANGLE_instanced_arrays'); - extension[capabilities.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE'](attribute, meshPerAttribute); - attributeDivisors[attribute] = meshPerAttribute; - } - } - - function disableUnusedAttributes() { - const newAttributes = currentState.newAttributes; - const enabledAttributes = currentState.enabledAttributes; - - for (let i = 0, il = enabledAttributes.length; i < il; i++) { - if (enabledAttributes[i] !== newAttributes[i]) { - gl.disableVertexAttribArray(i); - enabledAttributes[i] = 0; - } - } - } - - function vertexAttribPointer(index, size, type, normalized, stride, offset) { - if (capabilities.isWebGL2 === true && (type === gl.INT || type === gl.UNSIGNED_INT)) { - gl.vertexAttribIPointer(index, size, type, stride, offset); - } else { - gl.vertexAttribPointer(index, size, type, normalized, stride, offset); - } - } - - function setupVertexAttributes(object, material, program, geometry) { - if (capabilities.isWebGL2 === false && (object.isInstancedMesh || geometry.isInstancedBufferGeometry)) { - if (extensions.get('ANGLE_instanced_arrays') === null) return; - } - - initAttributes(); - const geometryAttributes = geometry.attributes; - const programAttributes = program.getAttributes(); - const materialDefaultAttributeValues = material.defaultAttributeValues; - - for (const name in programAttributes) { - const programAttribute = programAttributes[name]; - - if (programAttribute >= 0) { - const geometryAttribute = geometryAttributes[name]; - - if (geometryAttribute !== undefined) { - const normalized = geometryAttribute.normalized; - const size = geometryAttribute.itemSize; - const attribute = attributes.get(geometryAttribute); // TODO Attribute may not be available on context restore - - if (attribute === undefined) continue; - const buffer = attribute.buffer; - const type = attribute.type; - const bytesPerElement = attribute.bytesPerElement; - - if (geometryAttribute.isInterleavedBufferAttribute) { - const data = geometryAttribute.data; - const stride = data.stride; - const offset = geometryAttribute.offset; - - if (data && data.isInstancedInterleavedBuffer) { - enableAttributeAndDivisor(programAttribute, data.meshPerAttribute); - - if (geometry._maxInstanceCount === undefined) { - geometry._maxInstanceCount = data.meshPerAttribute * data.count; - } - } else { - enableAttribute(programAttribute); - } - - gl.bindBuffer(gl.ARRAY_BUFFER, buffer); - vertexAttribPointer(programAttribute, size, type, normalized, stride * bytesPerElement, offset * bytesPerElement); - } else { - if (geometryAttribute.isInstancedBufferAttribute) { - enableAttributeAndDivisor(programAttribute, geometryAttribute.meshPerAttribute); - - if (geometry._maxInstanceCount === undefined) { - geometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count; - } - } else { - enableAttribute(programAttribute); - } - - gl.bindBuffer(gl.ARRAY_BUFFER, buffer); - vertexAttribPointer(programAttribute, size, type, normalized, 0, 0); - } - } else if (name === 'instanceMatrix') { - const attribute = attributes.get(object.instanceMatrix); // TODO Attribute may not be available on context restore - - if (attribute === undefined) continue; - const buffer = attribute.buffer; - const type = attribute.type; - enableAttributeAndDivisor(programAttribute + 0, 1); - enableAttributeAndDivisor(programAttribute + 1, 1); - enableAttributeAndDivisor(programAttribute + 2, 1); - enableAttributeAndDivisor(programAttribute + 3, 1); - gl.bindBuffer(gl.ARRAY_BUFFER, buffer); - gl.vertexAttribPointer(programAttribute + 0, 4, type, false, 64, 0); - gl.vertexAttribPointer(programAttribute + 1, 4, type, false, 64, 16); - gl.vertexAttribPointer(programAttribute + 2, 4, type, false, 64, 32); - gl.vertexAttribPointer(programAttribute + 3, 4, type, false, 64, 48); - } else if (name === 'instanceColor') { - const attribute = attributes.get(object.instanceColor); // TODO Attribute may not be available on context restore - - if (attribute === undefined) continue; - const buffer = attribute.buffer; - const type = attribute.type; - enableAttributeAndDivisor(programAttribute, 1); - gl.bindBuffer(gl.ARRAY_BUFFER, buffer); - gl.vertexAttribPointer(programAttribute, 3, type, false, 12, 0); - } else if (materialDefaultAttributeValues !== undefined) { - const value = materialDefaultAttributeValues[name]; - - if (value !== undefined) { - switch (value.length) { - case 2: - gl.vertexAttrib2fv(programAttribute, value); - break; - - case 3: - gl.vertexAttrib3fv(programAttribute, value); - break; - - case 4: - gl.vertexAttrib4fv(programAttribute, value); - break; - - default: - gl.vertexAttrib1fv(programAttribute, value); - } - } - } - } - } - - disableUnusedAttributes(); - } - - function dispose() { - reset(); - - for (const geometryId in bindingStates) { - const programMap = bindingStates[geometryId]; - - for (const programId in programMap) { - const stateMap = programMap[programId]; - - for (const wireframe in stateMap) { - deleteVertexArrayObject(stateMap[wireframe].object); - delete stateMap[wireframe]; - } - - delete programMap[programId]; - } - - delete bindingStates[geometryId]; - } - } - - function releaseStatesOfGeometry(geometry) { - if (bindingStates[geometry.id] === undefined) return; - const programMap = bindingStates[geometry.id]; - - for (const programId in programMap) { - const stateMap = programMap[programId]; - - for (const wireframe in stateMap) { - deleteVertexArrayObject(stateMap[wireframe].object); - delete stateMap[wireframe]; - } - - delete programMap[programId]; - } - - delete bindingStates[geometry.id]; - } - - function releaseStatesOfProgram(program) { - for (const geometryId in bindingStates) { - const programMap = bindingStates[geometryId]; - if (programMap[program.id] === undefined) continue; - const stateMap = programMap[program.id]; - - for (const wireframe in stateMap) { - deleteVertexArrayObject(stateMap[wireframe].object); - delete stateMap[wireframe]; - } - - delete programMap[program.id]; - } - } - - function reset() { - resetDefaultState(); - if (currentState === defaultState) return; - currentState = defaultState; - bindVertexArrayObject(currentState.object); - } // for backward-compatilibity - - - function resetDefaultState() { - defaultState.geometry = null; - defaultState.program = null; - defaultState.wireframe = false; - } - - return { - setup: setup, - reset: reset, - resetDefaultState: resetDefaultState, - dispose: dispose, - releaseStatesOfGeometry: releaseStatesOfGeometry, - releaseStatesOfProgram: releaseStatesOfProgram, - initAttributes: initAttributes, - enableAttribute: enableAttribute, - disableUnusedAttributes: disableUnusedAttributes - }; - } - - function WebGLBufferRenderer(gl, extensions, info, capabilities) { - const isWebGL2 = capabilities.isWebGL2; - let mode; - - function setMode(value) { - mode = value; - } - - function render(start, count) { - gl.drawArrays(mode, start, count); - info.update(count, mode, 1); - } - - function renderInstances(start, count, primcount) { - if (primcount === 0) return; - let extension, methodName; - - if (isWebGL2) { - extension = gl; - methodName = 'drawArraysInstanced'; - } else { - extension = extensions.get('ANGLE_instanced_arrays'); - methodName = 'drawArraysInstancedANGLE'; - - if (extension === null) { - console.error('THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.'); - return; - } - } - - extension[methodName](mode, start, count, primcount); - info.update(count, mode, primcount); - } // - - - this.setMode = setMode; - this.render = render; - this.renderInstances = renderInstances; - } - - function WebGLCapabilities(gl, extensions, parameters) { - let maxAnisotropy; - - function getMaxAnisotropy() { - if (maxAnisotropy !== undefined) return maxAnisotropy; - - if (extensions.has('EXT_texture_filter_anisotropic') === true) { - const extension = extensions.get('EXT_texture_filter_anisotropic'); - maxAnisotropy = gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT); - } else { - maxAnisotropy = 0; - } - - return maxAnisotropy; - } - - function getMaxPrecision(precision) { - if (precision === 'highp') { - if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT).precision > 0 && gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT).precision > 0) { - return 'highp'; - } - - precision = 'mediump'; - } - - if (precision === 'mediump') { - if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT).precision > 0 && gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT).precision > 0) { - return 'mediump'; - } - } - - return 'lowp'; - } - /* eslint-disable no-undef */ - - - const isWebGL2 = typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext || typeof WebGL2ComputeRenderingContext !== 'undefined' && gl instanceof WebGL2ComputeRenderingContext; - /* eslint-enable no-undef */ - - let precision = parameters.precision !== undefined ? parameters.precision : 'highp'; - const maxPrecision = getMaxPrecision(precision); - - if (maxPrecision !== precision) { - console.warn('THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.'); - precision = maxPrecision; - } - - const drawBuffers = isWebGL2 || extensions.has('WEBGL_draw_buffers'); - const logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true; - const maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS); - const maxVertexTextures = gl.getParameter(gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS); - const maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE); - const maxCubemapSize = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE); - const maxAttributes = gl.getParameter(gl.MAX_VERTEX_ATTRIBS); - const maxVertexUniforms = gl.getParameter(gl.MAX_VERTEX_UNIFORM_VECTORS); - const maxVaryings = gl.getParameter(gl.MAX_VARYING_VECTORS); - const maxFragmentUniforms = gl.getParameter(gl.MAX_FRAGMENT_UNIFORM_VECTORS); - const vertexTextures = maxVertexTextures > 0; - const floatFragmentTextures = isWebGL2 || extensions.has('OES_texture_float'); - const floatVertexTextures = vertexTextures && floatFragmentTextures; - const maxSamples = isWebGL2 ? gl.getParameter(gl.MAX_SAMPLES) : 0; - return { - isWebGL2: isWebGL2, - drawBuffers: drawBuffers, - getMaxAnisotropy: getMaxAnisotropy, - getMaxPrecision: getMaxPrecision, - precision: precision, - logarithmicDepthBuffer: logarithmicDepthBuffer, - maxTextures: maxTextures, - maxVertexTextures: maxVertexTextures, - maxTextureSize: maxTextureSize, - maxCubemapSize: maxCubemapSize, - maxAttributes: maxAttributes, - maxVertexUniforms: maxVertexUniforms, - maxVaryings: maxVaryings, - maxFragmentUniforms: maxFragmentUniforms, - vertexTextures: vertexTextures, - floatFragmentTextures: floatFragmentTextures, - floatVertexTextures: floatVertexTextures, - maxSamples: maxSamples - }; - } - - function WebGLClipping(properties) { - const scope = this; - let globalState = null, - numGlobalPlanes = 0, - localClippingEnabled = false, - renderingShadows = false; - const plane = new Plane(), - viewNormalMatrix = new Matrix3(), - uniform = { - value: null, - needsUpdate: false - }; - this.uniform = uniform; - this.numPlanes = 0; - this.numIntersection = 0; - - this.init = function (planes, enableLocalClipping, camera) { - const enabled = planes.length !== 0 || enableLocalClipping || // enable state of previous frame - the clipping code has to - // run another frame in order to reset the state: - numGlobalPlanes !== 0 || localClippingEnabled; - localClippingEnabled = enableLocalClipping; - globalState = projectPlanes(planes, camera, 0); - numGlobalPlanes = planes.length; - return enabled; - }; - - this.beginShadows = function () { - renderingShadows = true; - projectPlanes(null); - }; - - this.endShadows = function () { - renderingShadows = false; - resetGlobalState(); - }; - - this.setState = function (material, camera, useCache) { - const planes = material.clippingPlanes, - clipIntersection = material.clipIntersection, - clipShadows = material.clipShadows; - const materialProperties = properties.get(material); - - if (!localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && !clipShadows) { - // there's no local clipping - if (renderingShadows) { - // there's no global clipping - projectPlanes(null); - } else { - resetGlobalState(); - } - } else { - const nGlobal = renderingShadows ? 0 : numGlobalPlanes, - lGlobal = nGlobal * 4; - let dstArray = materialProperties.clippingState || null; - uniform.value = dstArray; // ensure unique state - - dstArray = projectPlanes(planes, camera, lGlobal, useCache); - - for (let i = 0; i !== lGlobal; ++i) { - dstArray[i] = globalState[i]; - } - - materialProperties.clippingState = dstArray; - this.numIntersection = clipIntersection ? this.numPlanes : 0; - this.numPlanes += nGlobal; - } - }; - - function resetGlobalState() { - if (uniform.value !== globalState) { - uniform.value = globalState; - uniform.needsUpdate = numGlobalPlanes > 0; - } - - scope.numPlanes = numGlobalPlanes; - scope.numIntersection = 0; - } - - function projectPlanes(planes, camera, dstOffset, skipTransform) { - const nPlanes = planes !== null ? planes.length : 0; - let dstArray = null; - - if (nPlanes !== 0) { - dstArray = uniform.value; - - if (skipTransform !== true || dstArray === null) { - const flatSize = dstOffset + nPlanes * 4, - viewMatrix = camera.matrixWorldInverse; - viewNormalMatrix.getNormalMatrix(viewMatrix); - - if (dstArray === null || dstArray.length < flatSize) { - dstArray = new Float32Array(flatSize); - } - - for (let i = 0, i4 = dstOffset; i !== nPlanes; ++i, i4 += 4) { - plane.copy(planes[i]).applyMatrix4(viewMatrix, viewNormalMatrix); - plane.normal.toArray(dstArray, i4); - dstArray[i4 + 3] = plane.constant; - } - } - - uniform.value = dstArray; - uniform.needsUpdate = true; - } - - scope.numPlanes = nPlanes; - scope.numIntersection = 0; - return dstArray; - } - } - - function WebGLCubeMaps(renderer) { - let cubemaps = new WeakMap(); - - function mapTextureMapping(texture, mapping) { - if (mapping === EquirectangularReflectionMapping) { - texture.mapping = CubeReflectionMapping; - } else if (mapping === EquirectangularRefractionMapping) { - texture.mapping = CubeRefractionMapping; - } - - return texture; - } - - function get(texture) { - if (texture && texture.isTexture) { - const mapping = texture.mapping; - - if (mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping) { - if (cubemaps.has(texture)) { - const cubemap = cubemaps.get(texture).texture; - return mapTextureMapping(cubemap, texture.mapping); - } else { - const image = texture.image; - - if (image && image.height > 0) { - const currentRenderTarget = renderer.getRenderTarget(); - const renderTarget = new WebGLCubeRenderTarget(image.height / 2); - renderTarget.fromEquirectangularTexture(renderer, texture); - cubemaps.set(texture, renderTarget); - renderer.setRenderTarget(currentRenderTarget); - texture.addEventListener('dispose', onTextureDispose); - return mapTextureMapping(renderTarget.texture, texture.mapping); - } else { - // image not yet ready. try the conversion next frame - return null; - } - } - } - } - - return texture; - } - - function onTextureDispose(event) { - const texture = event.target; - texture.removeEventListener('dispose', onTextureDispose); - const cubemap = cubemaps.get(texture); - - if (cubemap !== undefined) { - cubemaps.delete(texture); - cubemap.dispose(); - } - } - - function dispose() { - cubemaps = new WeakMap(); - } - - return { - get: get, - dispose: dispose - }; - } - - function WebGLExtensions(gl) { - const extensions = {}; - - function getExtension(name) { - if (extensions[name] !== undefined) { - return extensions[name]; - } - - let extension; - - switch (name) { - case 'WEBGL_depth_texture': - extension = gl.getExtension('WEBGL_depth_texture') || gl.getExtension('MOZ_WEBGL_depth_texture') || gl.getExtension('WEBKIT_WEBGL_depth_texture'); - break; - - case 'EXT_texture_filter_anisotropic': - extension = gl.getExtension('EXT_texture_filter_anisotropic') || gl.getExtension('MOZ_EXT_texture_filter_anisotropic') || gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic'); - break; - - case 'WEBGL_compressed_texture_s3tc': - extension = gl.getExtension('WEBGL_compressed_texture_s3tc') || gl.getExtension('MOZ_WEBGL_compressed_texture_s3tc') || gl.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc'); - break; - - case 'WEBGL_compressed_texture_pvrtc': - extension = gl.getExtension('WEBGL_compressed_texture_pvrtc') || gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc'); - break; - - default: - extension = gl.getExtension(name); - } - - extensions[name] = extension; - return extension; - } - - return { - has: function (name) { - return getExtension(name) !== null; - }, - init: function (capabilities) { - if (capabilities.isWebGL2) { - getExtension('EXT_color_buffer_float'); - } else { - getExtension('WEBGL_depth_texture'); - getExtension('OES_texture_float'); - getExtension('OES_texture_half_float'); - getExtension('OES_texture_half_float_linear'); - getExtension('OES_standard_derivatives'); - getExtension('OES_element_index_uint'); - getExtension('OES_vertex_array_object'); - getExtension('ANGLE_instanced_arrays'); - } - - getExtension('OES_texture_float_linear'); - getExtension('EXT_color_buffer_half_float'); - }, - get: function (name) { - const extension = getExtension(name); - - if (extension === null) { - console.warn('THREE.WebGLRenderer: ' + name + ' extension not supported.'); - } - - return extension; - } - }; - } - - function WebGLGeometries(gl, attributes, info, bindingStates) { - const geometries = {}; - const wireframeAttributes = new WeakMap(); - - function onGeometryDispose(event) { - const geometry = event.target; - - if (geometry.index !== null) { - attributes.remove(geometry.index); - } - - for (const name in geometry.attributes) { - attributes.remove(geometry.attributes[name]); - } - - geometry.removeEventListener('dispose', onGeometryDispose); - delete geometries[geometry.id]; - const attribute = wireframeAttributes.get(geometry); - - if (attribute) { - attributes.remove(attribute); - wireframeAttributes.delete(geometry); - } - - bindingStates.releaseStatesOfGeometry(geometry); - - if (geometry.isInstancedBufferGeometry === true) { - delete geometry._maxInstanceCount; - } // - - - info.memory.geometries--; - } - - function get(object, geometry) { - if (geometries[geometry.id] === true) return geometry; - geometry.addEventListener('dispose', onGeometryDispose); - geometries[geometry.id] = true; - info.memory.geometries++; - return geometry; - } - - function update(geometry) { - const geometryAttributes = geometry.attributes; // Updating index buffer in VAO now. See WebGLBindingStates. - - for (const name in geometryAttributes) { - attributes.update(geometryAttributes[name], gl.ARRAY_BUFFER); - } // morph targets - - - const morphAttributes = geometry.morphAttributes; - - for (const name in morphAttributes) { - const array = morphAttributes[name]; - - for (let i = 0, l = array.length; i < l; i++) { - attributes.update(array[i], gl.ARRAY_BUFFER); - } - } - } - - function updateWireframeAttribute(geometry) { - const indices = []; - const geometryIndex = geometry.index; - const geometryPosition = geometry.attributes.position; - let version = 0; - - if (geometryIndex !== null) { - const array = geometryIndex.array; - version = geometryIndex.version; - - for (let i = 0, l = array.length; i < l; i += 3) { - const a = array[i + 0]; - const b = array[i + 1]; - const c = array[i + 2]; - indices.push(a, b, b, c, c, a); - } - } else { - const array = geometryPosition.array; - version = geometryPosition.version; - - for (let i = 0, l = array.length / 3 - 1; i < l; i += 3) { - const a = i + 0; - const b = i + 1; - const c = i + 2; - indices.push(a, b, b, c, c, a); - } - } - - const attribute = new (arrayMax(indices) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute)(indices, 1); - attribute.version = version; // Updating index buffer in VAO now. See WebGLBindingStates - // - - const previousAttribute = wireframeAttributes.get(geometry); - if (previousAttribute) attributes.remove(previousAttribute); // - - wireframeAttributes.set(geometry, attribute); - } - - function getWireframeAttribute(geometry) { - const currentAttribute = wireframeAttributes.get(geometry); - - if (currentAttribute) { - const geometryIndex = geometry.index; - - if (geometryIndex !== null) { - // if the attribute is obsolete, create a new one - if (currentAttribute.version < geometryIndex.version) { - updateWireframeAttribute(geometry); - } - } - } else { - updateWireframeAttribute(geometry); - } - - return wireframeAttributes.get(geometry); - } - - return { - get: get, - update: update, - getWireframeAttribute: getWireframeAttribute - }; - } - - function WebGLIndexedBufferRenderer(gl, extensions, info, capabilities) { - const isWebGL2 = capabilities.isWebGL2; - let mode; - - function setMode(value) { - mode = value; - } - - let type, bytesPerElement; - - function setIndex(value) { - type = value.type; - bytesPerElement = value.bytesPerElement; - } - - function render(start, count) { - gl.drawElements(mode, count, type, start * bytesPerElement); - info.update(count, mode, 1); - } - - function renderInstances(start, count, primcount) { - if (primcount === 0) return; - let extension, methodName; - - if (isWebGL2) { - extension = gl; - methodName = 'drawElementsInstanced'; - } else { - extension = extensions.get('ANGLE_instanced_arrays'); - methodName = 'drawElementsInstancedANGLE'; - - if (extension === null) { - console.error('THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.'); - return; - } - } - - extension[methodName](mode, count, type, start * bytesPerElement, primcount); - info.update(count, mode, primcount); - } // - - - this.setMode = setMode; - this.setIndex = setIndex; - this.render = render; - this.renderInstances = renderInstances; - } - - function WebGLInfo(gl) { - const memory = { - geometries: 0, - textures: 0 - }; - const render = { - frame: 0, - calls: 0, - triangles: 0, - points: 0, - lines: 0 - }; - - function update(count, mode, instanceCount) { - render.calls++; - - switch (mode) { - case gl.TRIANGLES: - render.triangles += instanceCount * (count / 3); - break; - - case gl.LINES: - render.lines += instanceCount * (count / 2); - break; - - case gl.LINE_STRIP: - render.lines += instanceCount * (count - 1); - break; - - case gl.LINE_LOOP: - render.lines += instanceCount * count; - break; - - case gl.POINTS: - render.points += instanceCount * count; - break; - - default: - console.error('THREE.WebGLInfo: Unknown draw mode:', mode); - break; - } - } - - function reset() { - render.frame++; - render.calls = 0; - render.triangles = 0; - render.points = 0; - render.lines = 0; - } - - return { - memory: memory, - render: render, - programs: null, - autoReset: true, - reset: reset, - update: update - }; - } - - function numericalSort(a, b) { - return a[0] - b[0]; - } - - function absNumericalSort(a, b) { - return Math.abs(b[1]) - Math.abs(a[1]); - } - - function WebGLMorphtargets(gl) { - const influencesList = {}; - const morphInfluences = new Float32Array(8); - const workInfluences = []; - - for (let i = 0; i < 8; i++) { - workInfluences[i] = [i, 0]; - } - - function update(object, geometry, material, program) { - const objectInfluences = object.morphTargetInfluences; // When object doesn't have morph target influences defined, we treat it as a 0-length array - // This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences - - const length = objectInfluences === undefined ? 0 : objectInfluences.length; - let influences = influencesList[geometry.id]; - - if (influences === undefined || influences.length !== length) { - // initialise list - influences = []; - - for (let i = 0; i < length; i++) { - influences[i] = [i, 0]; - } - - influencesList[geometry.id] = influences; - } // Collect influences - - - for (let i = 0; i < length; i++) { - const influence = influences[i]; - influence[0] = i; - influence[1] = objectInfluences[i]; - } - - influences.sort(absNumericalSort); - - for (let i = 0; i < 8; i++) { - if (i < length && influences[i][1]) { - workInfluences[i][0] = influences[i][0]; - workInfluences[i][1] = influences[i][1]; - } else { - workInfluences[i][0] = Number.MAX_SAFE_INTEGER; - workInfluences[i][1] = 0; - } - } - - workInfluences.sort(numericalSort); - const morphTargets = material.morphTargets && geometry.morphAttributes.position; - const morphNormals = material.morphNormals && geometry.morphAttributes.normal; - let morphInfluencesSum = 0; - - for (let i = 0; i < 8; i++) { - const influence = workInfluences[i]; - const index = influence[0]; - const value = influence[1]; - - if (index !== Number.MAX_SAFE_INTEGER && value) { - if (morphTargets && geometry.getAttribute('morphTarget' + i) !== morphTargets[index]) { - geometry.setAttribute('morphTarget' + i, morphTargets[index]); - } - - if (morphNormals && geometry.getAttribute('morphNormal' + i) !== morphNormals[index]) { - geometry.setAttribute('morphNormal' + i, morphNormals[index]); - } - - morphInfluences[i] = value; - morphInfluencesSum += value; - } else { - if (morphTargets && geometry.hasAttribute('morphTarget' + i) === true) { - geometry.deleteAttribute('morphTarget' + i); - } - - if (morphNormals && geometry.hasAttribute('morphNormal' + i) === true) { - geometry.deleteAttribute('morphNormal' + i); - } - - morphInfluences[i] = 0; - } - } // GLSL shader uses formula baseinfluence * base + sum(target * influence) - // This allows us to switch between absolute morphs and relative morphs without changing shader code - // When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence) - - - const morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum; - program.getUniforms().setValue(gl, 'morphTargetBaseInfluence', morphBaseInfluence); - program.getUniforms().setValue(gl, 'morphTargetInfluences', morphInfluences); - } - - return { - update: update - }; - } - - function WebGLObjects(gl, geometries, attributes, info) { - let updateMap = new WeakMap(); - - function update(object) { - const frame = info.render.frame; - const geometry = object.geometry; - const buffergeometry = geometries.get(object, geometry); // Update once per frame - - if (updateMap.get(buffergeometry) !== frame) { - geometries.update(buffergeometry); - updateMap.set(buffergeometry, frame); - } - - if (object.isInstancedMesh) { - if (object.hasEventListener('dispose', onInstancedMeshDispose) === false) { - object.addEventListener('dispose', onInstancedMeshDispose); - } - - attributes.update(object.instanceMatrix, gl.ARRAY_BUFFER); - - if (object.instanceColor !== null) { - attributes.update(object.instanceColor, gl.ARRAY_BUFFER); - } - } - - return buffergeometry; - } - - function dispose() { - updateMap = new WeakMap(); - } - - function onInstancedMeshDispose(event) { - const instancedMesh = event.target; - instancedMesh.removeEventListener('dispose', onInstancedMeshDispose); - attributes.remove(instancedMesh.instanceMatrix); - if (instancedMesh.instanceColor !== null) attributes.remove(instancedMesh.instanceColor); - } - - return { - update: update, - dispose: dispose - }; - } - - class DataTexture2DArray extends Texture { - constructor(data = null, width = 1, height = 1, depth = 1) { - super(null); - this.image = { - data, - width, - height, - depth - }; - this.magFilter = NearestFilter; - this.minFilter = NearestFilter; - this.wrapR = ClampToEdgeWrapping; - this.generateMipmaps = false; - this.flipY = false; - this.unpackAlignment = 1; - this.needsUpdate = true; - } - - } - - DataTexture2DArray.prototype.isDataTexture2DArray = true; - - class DataTexture3D extends Texture { - constructor(data = null, width = 1, height = 1, depth = 1) { - // We're going to add .setXXX() methods for setting properties later. - // Users can still set in DataTexture3D directly. - // - // const texture = new THREE.DataTexture3D( data, width, height, depth ); - // texture.anisotropy = 16; - // - // See #14839 - super(null); - this.image = { - data, - width, - height, - depth - }; - this.magFilter = NearestFilter; - this.minFilter = NearestFilter; - this.wrapR = ClampToEdgeWrapping; - this.generateMipmaps = false; - this.flipY = false; - this.unpackAlignment = 1; - this.needsUpdate = true; - } - - } - - DataTexture3D.prototype.isDataTexture3D = true; - - /** - * Uniforms of a program. - * Those form a tree structure with a special top-level container for the root, - * which you get by calling 'new WebGLUniforms( gl, program )'. - * - * - * Properties of inner nodes including the top-level container: - * - * .seq - array of nested uniforms - * .map - nested uniforms by name - * - * - * Methods of all nodes except the top-level container: - * - * .setValue( gl, value, [textures] ) - * - * uploads a uniform value(s) - * the 'textures' parameter is needed for sampler uniforms - * - * - * Static methods of the top-level container (textures factorizations): - * - * .upload( gl, seq, values, textures ) - * - * sets uniforms in 'seq' to 'values[id].value' - * - * .seqWithValue( seq, values ) : filteredSeq - * - * filters 'seq' entries with corresponding entry in values - * - * - * Methods of the top-level container (textures factorizations): - * - * .setValue( gl, name, value, textures ) - * - * sets uniform with name 'name' to 'value' - * - * .setOptional( gl, obj, prop ) - * - * like .set for an optional property of the object - * - */ - const emptyTexture = new Texture(); - const emptyTexture2dArray = new DataTexture2DArray(); - const emptyTexture3d = new DataTexture3D(); - const emptyCubeTexture = new CubeTexture(); // --- Utilities --- - // Array Caches (provide typed arrays for temporary by size) - - const arrayCacheF32 = []; - const arrayCacheI32 = []; // Float32Array caches used for uploading Matrix uniforms - - const mat4array = new Float32Array(16); - const mat3array = new Float32Array(9); - const mat2array = new Float32Array(4); // Flattening for arrays of vectors and matrices - - function flatten(array, nBlocks, blockSize) { - const firstElem = array[0]; - if (firstElem <= 0 || firstElem > 0) return array; // unoptimized: ! isNaN( firstElem ) - // see http://jacksondunstan.com/articles/983 - - const n = nBlocks * blockSize; - let r = arrayCacheF32[n]; - - if (r === undefined) { - r = new Float32Array(n); - arrayCacheF32[n] = r; - } - - if (nBlocks !== 0) { - firstElem.toArray(r, 0); - - for (let i = 1, offset = 0; i !== nBlocks; ++i) { - offset += blockSize; - array[i].toArray(r, offset); - } - } - - return r; - } - - function arraysEqual(a, b) { - if (a.length !== b.length) return false; - - for (let i = 0, l = a.length; i < l; i++) { - if (a[i] !== b[i]) return false; - } - - return true; - } - - function copyArray(a, b) { - for (let i = 0, l = b.length; i < l; i++) { - a[i] = b[i]; - } - } // Texture unit allocation - - - function allocTexUnits(textures, n) { - let r = arrayCacheI32[n]; - - if (r === undefined) { - r = new Int32Array(n); - arrayCacheI32[n] = r; - } - - for (let i = 0; i !== n; ++i) { - r[i] = textures.allocateTextureUnit(); - } - - return r; - } // --- Setters --- - // Note: Defining these methods externally, because they come in a bunch - // and this way their names minify. - // Single scalar - - - function setValueV1f(gl, v) { - const cache = this.cache; - if (cache[0] === v) return; - gl.uniform1f(this.addr, v); - cache[0] = v; - } // Single float vector (from flat array or THREE.VectorN) - - - function setValueV2f(gl, v) { - const cache = this.cache; - - if (v.x !== undefined) { - if (cache[0] !== v.x || cache[1] !== v.y) { - gl.uniform2f(this.addr, v.x, v.y); - cache[0] = v.x; - cache[1] = v.y; - } - } else { - if (arraysEqual(cache, v)) return; - gl.uniform2fv(this.addr, v); - copyArray(cache, v); - } - } - - function setValueV3f(gl, v) { - const cache = this.cache; - - if (v.x !== undefined) { - if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) { - gl.uniform3f(this.addr, v.x, v.y, v.z); - cache[0] = v.x; - cache[1] = v.y; - cache[2] = v.z; - } - } else if (v.r !== undefined) { - if (cache[0] !== v.r || cache[1] !== v.g || cache[2] !== v.b) { - gl.uniform3f(this.addr, v.r, v.g, v.b); - cache[0] = v.r; - cache[1] = v.g; - cache[2] = v.b; - } - } else { - if (arraysEqual(cache, v)) return; - gl.uniform3fv(this.addr, v); - copyArray(cache, v); - } - } - - function setValueV4f(gl, v) { - const cache = this.cache; - - if (v.x !== undefined) { - if (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) { - gl.uniform4f(this.addr, v.x, v.y, v.z, v.w); - cache[0] = v.x; - cache[1] = v.y; - cache[2] = v.z; - cache[3] = v.w; - } - } else { - if (arraysEqual(cache, v)) return; - gl.uniform4fv(this.addr, v); - copyArray(cache, v); - } - } // Single matrix (from flat array or THREE.MatrixN) - - - function setValueM2(gl, v) { - const cache = this.cache; - const elements = v.elements; - - if (elements === undefined) { - if (arraysEqual(cache, v)) return; - gl.uniformMatrix2fv(this.addr, false, v); - copyArray(cache, v); - } else { - if (arraysEqual(cache, elements)) return; - mat2array.set(elements); - gl.uniformMatrix2fv(this.addr, false, mat2array); - copyArray(cache, elements); - } - } - - function setValueM3(gl, v) { - const cache = this.cache; - const elements = v.elements; - - if (elements === undefined) { - if (arraysEqual(cache, v)) return; - gl.uniformMatrix3fv(this.addr, false, v); - copyArray(cache, v); - } else { - if (arraysEqual(cache, elements)) return; - mat3array.set(elements); - gl.uniformMatrix3fv(this.addr, false, mat3array); - copyArray(cache, elements); - } - } - - function setValueM4(gl, v) { - const cache = this.cache; - const elements = v.elements; - - if (elements === undefined) { - if (arraysEqual(cache, v)) return; - gl.uniformMatrix4fv(this.addr, false, v); - copyArray(cache, v); - } else { - if (arraysEqual(cache, elements)) return; - mat4array.set(elements); - gl.uniformMatrix4fv(this.addr, false, mat4array); - copyArray(cache, elements); - } - } // Single integer / boolean - - - function setValueV1i(gl, v) { - const cache = this.cache; - if (cache[0] === v) return; - gl.uniform1i(this.addr, v); - cache[0] = v; - } // Single integer / boolean vector (from flat array) - - - function setValueV2i(gl, v) { - const cache = this.cache; - if (arraysEqual(cache, v)) return; - gl.uniform2iv(this.addr, v); - copyArray(cache, v); - } - - function setValueV3i(gl, v) { - const cache = this.cache; - if (arraysEqual(cache, v)) return; - gl.uniform3iv(this.addr, v); - copyArray(cache, v); - } - - function setValueV4i(gl, v) { - const cache = this.cache; - if (arraysEqual(cache, v)) return; - gl.uniform4iv(this.addr, v); - copyArray(cache, v); - } // Single unsigned integer - - - function setValueV1ui(gl, v) { - const cache = this.cache; - if (cache[0] === v) return; - gl.uniform1ui(this.addr, v); - cache[0] = v; - } // Single unsigned integer vector (from flat array) - - - function setValueV2ui(gl, v) { - const cache = this.cache; - if (arraysEqual(cache, v)) return; - gl.uniform2uiv(this.addr, v); - copyArray(cache, v); - } - - function setValueV3ui(gl, v) { - const cache = this.cache; - if (arraysEqual(cache, v)) return; - gl.uniform3uiv(this.addr, v); - copyArray(cache, v); - } - - function setValueV4ui(gl, v) { - const cache = this.cache; - if (arraysEqual(cache, v)) return; - gl.uniform4uiv(this.addr, v); - copyArray(cache, v); - } // Single texture (2D / Cube) - - - function setValueT1(gl, v, textures) { - const cache = this.cache; - const unit = textures.allocateTextureUnit(); - - if (cache[0] !== unit) { - gl.uniform1i(this.addr, unit); - cache[0] = unit; - } - - textures.safeSetTexture2D(v || emptyTexture, unit); - } - - function setValueT3D1(gl, v, textures) { - const cache = this.cache; - const unit = textures.allocateTextureUnit(); - - if (cache[0] !== unit) { - gl.uniform1i(this.addr, unit); - cache[0] = unit; - } - - textures.setTexture3D(v || emptyTexture3d, unit); - } - - function setValueT6(gl, v, textures) { - const cache = this.cache; - const unit = textures.allocateTextureUnit(); - - if (cache[0] !== unit) { - gl.uniform1i(this.addr, unit); - cache[0] = unit; - } - - textures.safeSetTextureCube(v || emptyCubeTexture, unit); - } - - function setValueT2DArray1(gl, v, textures) { - const cache = this.cache; - const unit = textures.allocateTextureUnit(); - - if (cache[0] !== unit) { - gl.uniform1i(this.addr, unit); - cache[0] = unit; - } - - textures.setTexture2DArray(v || emptyTexture2dArray, unit); - } // Helper to pick the right setter for the singular case - - - function getSingularSetter(type) { - switch (type) { - case 0x1406: - return setValueV1f; - // FLOAT - - case 0x8b50: - return setValueV2f; - // _VEC2 - - case 0x8b51: - return setValueV3f; - // _VEC3 - - case 0x8b52: - return setValueV4f; - // _VEC4 - - case 0x8b5a: - return setValueM2; - // _MAT2 - - case 0x8b5b: - return setValueM3; - // _MAT3 - - case 0x8b5c: - return setValueM4; - // _MAT4 - - case 0x1404: - case 0x8b56: - return setValueV1i; - // INT, BOOL - - case 0x8b53: - case 0x8b57: - return setValueV2i; - // _VEC2 - - case 0x8b54: - case 0x8b58: - return setValueV3i; - // _VEC3 - - case 0x8b55: - case 0x8b59: - return setValueV4i; - // _VEC4 - - case 0x1405: - return setValueV1ui; - // UINT - - case 0x8dc6: - return setValueV2ui; - // _VEC2 - - case 0x8dc7: - return setValueV3ui; - // _VEC3 - - case 0x8dc8: - return setValueV4ui; - // _VEC4 - - case 0x8b5e: // SAMPLER_2D - - case 0x8d66: // SAMPLER_EXTERNAL_OES - - case 0x8dca: // INT_SAMPLER_2D - - case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D - - case 0x8b62: - // SAMPLER_2D_SHADOW - return setValueT1; - - case 0x8b5f: // SAMPLER_3D - - case 0x8dcb: // INT_SAMPLER_3D - - case 0x8dd3: - // UNSIGNED_INT_SAMPLER_3D - return setValueT3D1; - - case 0x8b60: // SAMPLER_CUBE - - case 0x8dcc: // INT_SAMPLER_CUBE - - case 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE - - case 0x8dc5: - // SAMPLER_CUBE_SHADOW - return setValueT6; - - case 0x8dc1: // SAMPLER_2D_ARRAY - - case 0x8dcf: // INT_SAMPLER_2D_ARRAY - - case 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY - - case 0x8dc4: - // SAMPLER_2D_ARRAY_SHADOW - return setValueT2DArray1; - } - } // Array of scalars - - - function setValueV1fArray(gl, v) { - gl.uniform1fv(this.addr, v); - } // Array of vectors (from flat array or array of THREE.VectorN) - - - function setValueV2fArray(gl, v) { - const data = flatten(v, this.size, 2); - gl.uniform2fv(this.addr, data); - } - - function setValueV3fArray(gl, v) { - const data = flatten(v, this.size, 3); - gl.uniform3fv(this.addr, data); - } - - function setValueV4fArray(gl, v) { - const data = flatten(v, this.size, 4); - gl.uniform4fv(this.addr, data); - } // Array of matrices (from flat array or array of THREE.MatrixN) - - - function setValueM2Array(gl, v) { - const data = flatten(v, this.size, 4); - gl.uniformMatrix2fv(this.addr, false, data); - } - - function setValueM3Array(gl, v) { - const data = flatten(v, this.size, 9); - gl.uniformMatrix3fv(this.addr, false, data); - } - - function setValueM4Array(gl, v) { - const data = flatten(v, this.size, 16); - gl.uniformMatrix4fv(this.addr, false, data); - } // Array of integer / boolean - - - function setValueV1iArray(gl, v) { - gl.uniform1iv(this.addr, v); - } // Array of integer / boolean vectors (from flat array) - - - function setValueV2iArray(gl, v) { - gl.uniform2iv(this.addr, v); - } - - function setValueV3iArray(gl, v) { - gl.uniform3iv(this.addr, v); - } - - function setValueV4iArray(gl, v) { - gl.uniform4iv(this.addr, v); - } // Array of unsigned integer - - - function setValueV1uiArray(gl, v) { - gl.uniform1uiv(this.addr, v); - } // Array of unsigned integer vectors (from flat array) - - - function setValueV2uiArray(gl, v) { - gl.uniform2uiv(this.addr, v); - } - - function setValueV3uiArray(gl, v) { - gl.uniform3uiv(this.addr, v); - } - - function setValueV4uiArray(gl, v) { - gl.uniform4uiv(this.addr, v); - } // Array of textures (2D / Cube) - - - function setValueT1Array(gl, v, textures) { - const n = v.length; - const units = allocTexUnits(textures, n); - gl.uniform1iv(this.addr, units); - - for (let i = 0; i !== n; ++i) { - textures.safeSetTexture2D(v[i] || emptyTexture, units[i]); - } - } - - function setValueT6Array(gl, v, textures) { - const n = v.length; - const units = allocTexUnits(textures, n); - gl.uniform1iv(this.addr, units); - - for (let i = 0; i !== n; ++i) { - textures.safeSetTextureCube(v[i] || emptyCubeTexture, units[i]); - } - } // Helper to pick the right setter for a pure (bottom-level) array - - - function getPureArraySetter(type) { - switch (type) { - case 0x1406: - return setValueV1fArray; - // FLOAT - - case 0x8b50: - return setValueV2fArray; - // _VEC2 - - case 0x8b51: - return setValueV3fArray; - // _VEC3 - - case 0x8b52: - return setValueV4fArray; - // _VEC4 - - case 0x8b5a: - return setValueM2Array; - // _MAT2 - - case 0x8b5b: - return setValueM3Array; - // _MAT3 - - case 0x8b5c: - return setValueM4Array; - // _MAT4 - - case 0x1404: - case 0x8b56: - return setValueV1iArray; - // INT, BOOL - - case 0x8b53: - case 0x8b57: - return setValueV2iArray; - // _VEC2 - - case 0x8b54: - case 0x8b58: - return setValueV3iArray; - // _VEC3 - - case 0x8b55: - case 0x8b59: - return setValueV4iArray; - // _VEC4 - - case 0x1405: - return setValueV1uiArray; - // UINT - - case 0x8dc6: - return setValueV2uiArray; - // _VEC2 - - case 0x8dc7: - return setValueV3uiArray; - // _VEC3 - - case 0x8dc8: - return setValueV4uiArray; - // _VEC4 - - case 0x8b5e: // SAMPLER_2D - - case 0x8d66: // SAMPLER_EXTERNAL_OES - - case 0x8dca: // INT_SAMPLER_2D - - case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D - - case 0x8b62: - // SAMPLER_2D_SHADOW - return setValueT1Array; - - case 0x8b60: // SAMPLER_CUBE - - case 0x8dcc: // INT_SAMPLER_CUBE - - case 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE - - case 0x8dc5: - // SAMPLER_CUBE_SHADOW - return setValueT6Array; - } - } // --- Uniform Classes --- - - - function SingleUniform(id, activeInfo, addr) { - this.id = id; - this.addr = addr; - this.cache = []; - this.setValue = getSingularSetter(activeInfo.type); // this.path = activeInfo.name; // DEBUG - } - - function PureArrayUniform(id, activeInfo, addr) { - this.id = id; - this.addr = addr; - this.cache = []; - this.size = activeInfo.size; - this.setValue = getPureArraySetter(activeInfo.type); // this.path = activeInfo.name; // DEBUG - } - - PureArrayUniform.prototype.updateCache = function (data) { - const cache = this.cache; - - if (data instanceof Float32Array && cache.length !== data.length) { - this.cache = new Float32Array(data.length); - } - - copyArray(cache, data); - }; - - function StructuredUniform(id) { - this.id = id; - this.seq = []; - this.map = {}; - } - - StructuredUniform.prototype.setValue = function (gl, value, textures) { - const seq = this.seq; - - for (let i = 0, n = seq.length; i !== n; ++i) { - const u = seq[i]; - u.setValue(gl, value[u.id], textures); - } - }; // --- Top-level --- - // Parser - builds up the property tree from the path strings - - - const RePathPart = /(\w+)(\])?(\[|\.)?/g; // extracts - // - the identifier (member name or array index) - // - followed by an optional right bracket (found when array index) - // - followed by an optional left bracket or dot (type of subscript) - // - // Note: These portions can be read in a non-overlapping fashion and - // allow straightforward parsing of the hierarchy that WebGL encodes - // in the uniform names. - - function addUniform(container, uniformObject) { - container.seq.push(uniformObject); - container.map[uniformObject.id] = uniformObject; - } - - function parseUniform(activeInfo, addr, container) { - const path = activeInfo.name, - pathLength = path.length; // reset RegExp object, because of the early exit of a previous run - - RePathPart.lastIndex = 0; - - while (true) { - const match = RePathPart.exec(path), - matchEnd = RePathPart.lastIndex; - let id = match[1]; - const idIsIndex = match[2] === ']', - subscript = match[3]; - if (idIsIndex) id = id | 0; // convert to integer - - if (subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength) { - // bare name or "pure" bottom-level array "[0]" suffix - addUniform(container, subscript === undefined ? new SingleUniform(id, activeInfo, addr) : new PureArrayUniform(id, activeInfo, addr)); - break; - } else { - // step into inner node / create it in case it doesn't exist - const map = container.map; - let next = map[id]; - - if (next === undefined) { - next = new StructuredUniform(id); - addUniform(container, next); - } - - container = next; - } - } - } // Root Container - - - function WebGLUniforms(gl, program) { - this.seq = []; - this.map = {}; - const n = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS); - - for (let i = 0; i < n; ++i) { - const info = gl.getActiveUniform(program, i), - addr = gl.getUniformLocation(program, info.name); - parseUniform(info, addr, this); - } - } - - WebGLUniforms.prototype.setValue = function (gl, name, value, textures) { - const u = this.map[name]; - if (u !== undefined) u.setValue(gl, value, textures); - }; - - WebGLUniforms.prototype.setOptional = function (gl, object, name) { - const v = object[name]; - if (v !== undefined) this.setValue(gl, name, v); - }; // Static interface - - - WebGLUniforms.upload = function (gl, seq, values, textures) { - for (let i = 0, n = seq.length; i !== n; ++i) { - const u = seq[i], - v = values[u.id]; - - if (v.needsUpdate !== false) { - // note: always updating when .needsUpdate is undefined - u.setValue(gl, v.value, textures); - } - } - }; - - WebGLUniforms.seqWithValue = function (seq, values) { - const r = []; - - for (let i = 0, n = seq.length; i !== n; ++i) { - const u = seq[i]; - if (u.id in values) r.push(u); - } - - return r; - }; - - function WebGLShader(gl, type, string) { - const shader = gl.createShader(type); - gl.shaderSource(shader, string); - gl.compileShader(shader); - return shader; - } - - let programIdCount = 0; - - function addLineNumbers(string) { - const lines = string.split('\n'); - - for (let i = 0; i < lines.length; i++) { - lines[i] = i + 1 + ': ' + lines[i]; - } - - return lines.join('\n'); - } - - function getEncodingComponents(encoding) { - switch (encoding) { - case LinearEncoding: - return ['Linear', '( value )']; - - case sRGBEncoding: - return ['sRGB', '( value )']; - - case RGBEEncoding: - return ['RGBE', '( value )']; - - case RGBM7Encoding: - return ['RGBM', '( value, 7.0 )']; - - case RGBM16Encoding: - return ['RGBM', '( value, 16.0 )']; - - case RGBDEncoding: - return ['RGBD', '( value, 256.0 )']; - - case GammaEncoding: - return ['Gamma', '( value, float( GAMMA_FACTOR ) )']; - - case LogLuvEncoding: - return ['LogLuv', '( value )']; - - default: - console.warn('THREE.WebGLProgram: Unsupported encoding:', encoding); - return ['Linear', '( value )']; - } - } - - function getShaderErrors(gl, shader, type) { - const status = gl.getShaderParameter(shader, gl.COMPILE_STATUS); - const log = gl.getShaderInfoLog(shader).trim(); - if (status && log === '') return ''; // --enable-privileged-webgl-extension - // console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) ); - - const source = gl.getShaderSource(shader); - return 'THREE.WebGLShader: gl.getShaderInfoLog() ' + type + '\n' + log + addLineNumbers(source); - } - - function getTexelDecodingFunction(functionName, encoding) { - const components = getEncodingComponents(encoding); - return 'vec4 ' + functionName + '( vec4 value ) { return ' + components[0] + 'ToLinear' + components[1] + '; }'; - } - - function getTexelEncodingFunction(functionName, encoding) { - const components = getEncodingComponents(encoding); - return 'vec4 ' + functionName + '( vec4 value ) { return LinearTo' + components[0] + components[1] + '; }'; - } - - function getToneMappingFunction(functionName, toneMapping) { - let toneMappingName; - - switch (toneMapping) { - case LinearToneMapping: - toneMappingName = 'Linear'; - break; - - case ReinhardToneMapping: - toneMappingName = 'Reinhard'; - break; - - case CineonToneMapping: - toneMappingName = 'OptimizedCineon'; - break; - - case ACESFilmicToneMapping: - toneMappingName = 'ACESFilmic'; - break; - - case CustomToneMapping: - toneMappingName = 'Custom'; - break; - - default: - console.warn('THREE.WebGLProgram: Unsupported toneMapping:', toneMapping); - toneMappingName = 'Linear'; - } - - return 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }'; - } - - function generateExtensions(parameters) { - const chunks = [parameters.extensionDerivatives || parameters.envMapCubeUV || parameters.bumpMap || parameters.tangentSpaceNormalMap || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ? '#extension GL_OES_standard_derivatives : enable' : '', (parameters.extensionFragDepth || parameters.logarithmicDepthBuffer) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '', parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ? '#extension GL_EXT_draw_buffers : require' : '', (parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission > 0.0) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : '']; - return chunks.filter(filterEmptyLine).join('\n'); - } - - function generateDefines(defines) { - const chunks = []; - - for (const name in defines) { - const value = defines[name]; - if (value === false) continue; - chunks.push('#define ' + name + ' ' + value); - } - - return chunks.join('\n'); - } - - function fetchAttributeLocations(gl, program) { - const attributes = {}; - const n = gl.getProgramParameter(program, gl.ACTIVE_ATTRIBUTES); - - for (let i = 0; i < n; i++) { - const info = gl.getActiveAttrib(program, i); - const name = info.name; // console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i ); - - attributes[name] = gl.getAttribLocation(program, name); - } - - return attributes; - } - - function filterEmptyLine(string) { - return string !== ''; - } - - function replaceLightNums(string, parameters) { - return string.replace(/NUM_DIR_LIGHTS/g, parameters.numDirLights).replace(/NUM_SPOT_LIGHTS/g, parameters.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, parameters.numPointLights).replace(/NUM_HEMI_LIGHTS/g, parameters.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows); - } - - function replaceClippingPlaneNums(string, parameters) { - return string.replace(/NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, parameters.numClippingPlanes - parameters.numClipIntersection); - } // Resolve Includes - - - const includePattern = /^[ \t]*#include +<([\w\d./]+)>/gm; - - function resolveIncludes(string) { - return string.replace(includePattern, includeReplacer); - } - - function includeReplacer(match, include) { - const string = ShaderChunk[include]; - - if (string === undefined) { - throw new Error('Can not resolve #include <' + include + '>'); - } - - return resolveIncludes(string); - } // Unroll Loops - - - const deprecatedUnrollLoopPattern = /#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g; - const unrollLoopPattern = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g; - - function unrollLoops(string) { - return string.replace(unrollLoopPattern, loopReplacer).replace(deprecatedUnrollLoopPattern, deprecatedLoopReplacer); - } - - function deprecatedLoopReplacer(match, start, end, snippet) { - console.warn('WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.'); - return loopReplacer(match, start, end, snippet); - } - - function loopReplacer(match, start, end, snippet) { - let string = ''; - - for (let i = parseInt(start); i < parseInt(end); i++) { - string += snippet.replace(/\[\s*i\s*\]/g, '[ ' + i + ' ]').replace(/UNROLLED_LOOP_INDEX/g, i); - } - - return string; - } // - - - function generatePrecision(parameters) { - let precisionstring = 'precision ' + parameters.precision + ' float;\nprecision ' + parameters.precision + ' int;'; - - if (parameters.precision === 'highp') { - precisionstring += '\n#define HIGH_PRECISION'; - } else if (parameters.precision === 'mediump') { - precisionstring += '\n#define MEDIUM_PRECISION'; - } else if (parameters.precision === 'lowp') { - precisionstring += '\n#define LOW_PRECISION'; - } - - return precisionstring; - } - - function generateShadowMapTypeDefine(parameters) { - let shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC'; - - if (parameters.shadowMapType === PCFShadowMap) { - shadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF'; - } else if (parameters.shadowMapType === PCFSoftShadowMap) { - shadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT'; - } else if (parameters.shadowMapType === VSMShadowMap) { - shadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM'; - } - - return shadowMapTypeDefine; - } - - function generateEnvMapTypeDefine(parameters) { - let envMapTypeDefine = 'ENVMAP_TYPE_CUBE'; - - if (parameters.envMap) { - switch (parameters.envMapMode) { - case CubeReflectionMapping: - case CubeRefractionMapping: - envMapTypeDefine = 'ENVMAP_TYPE_CUBE'; - break; - - case CubeUVReflectionMapping: - case CubeUVRefractionMapping: - envMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV'; - break; - } - } - - return envMapTypeDefine; - } - - function generateEnvMapModeDefine(parameters) { - let envMapModeDefine = 'ENVMAP_MODE_REFLECTION'; - - if (parameters.envMap) { - switch (parameters.envMapMode) { - case CubeRefractionMapping: - case CubeUVRefractionMapping: - envMapModeDefine = 'ENVMAP_MODE_REFRACTION'; - break; - } - } - - return envMapModeDefine; - } - - function generateEnvMapBlendingDefine(parameters) { - let envMapBlendingDefine = 'ENVMAP_BLENDING_NONE'; - - if (parameters.envMap) { - switch (parameters.combine) { - case MultiplyOperation: - envMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY'; - break; - - case MixOperation: - envMapBlendingDefine = 'ENVMAP_BLENDING_MIX'; - break; - - case AddOperation: - envMapBlendingDefine = 'ENVMAP_BLENDING_ADD'; - break; - } - } - - return envMapBlendingDefine; - } - - function WebGLProgram(renderer, cacheKey, parameters, bindingStates) { - const gl = renderer.getContext(); - const defines = parameters.defines; - let vertexShader = parameters.vertexShader; - let fragmentShader = parameters.fragmentShader; - const shadowMapTypeDefine = generateShadowMapTypeDefine(parameters); - const envMapTypeDefine = generateEnvMapTypeDefine(parameters); - const envMapModeDefine = generateEnvMapModeDefine(parameters); - const envMapBlendingDefine = generateEnvMapBlendingDefine(parameters); - const gammaFactorDefine = renderer.gammaFactor > 0 ? renderer.gammaFactor : 1.0; - const customExtensions = parameters.isWebGL2 ? '' : generateExtensions(parameters); - const customDefines = generateDefines(defines); - const program = gl.createProgram(); - let prefixVertex, prefixFragment; - let versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\n' : ''; - - if (parameters.isRawShaderMaterial) { - prefixVertex = [customDefines].filter(filterEmptyLine).join('\n'); - - if (prefixVertex.length > 0) { - prefixVertex += '\n'; - } - - prefixFragment = [customExtensions, customDefines].filter(filterEmptyLine).join('\n'); - - if (prefixFragment.length > 0) { - prefixFragment += '\n'; - } - } else { - prefixVertex = [generatePrecision(parameters), '#define SHADER_NAME ' + parameters.shaderName, customDefines, parameters.instancing ? '#define USE_INSTANCING' : '', parameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '', parameters.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '', '#define GAMMA_FACTOR ' + gammaFactorDefine, '#define MAX_BONES ' + parameters.maxBones, parameters.useFog && parameters.fog ? '#define USE_FOG' : '', parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', parameters.map ? '#define USE_MAP' : '', parameters.envMap ? '#define USE_ENVMAP' : '', parameters.envMap ? '#define ' + envMapModeDefine : '', parameters.lightMap ? '#define USE_LIGHTMAP' : '', parameters.aoMap ? '#define USE_AOMAP' : '', parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', parameters.bumpMap ? '#define USE_BUMPMAP' : '', parameters.normalMap ? '#define USE_NORMALMAP' : '', parameters.normalMap && parameters.objectSpaceNormalMap ? '#define OBJECTSPACE_NORMALMAP' : '', parameters.normalMap && parameters.tangentSpaceNormalMap ? '#define TANGENTSPACE_NORMALMAP' : '', parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', parameters.displacementMap && parameters.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '', parameters.specularMap ? '#define USE_SPECULARMAP' : '', parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', parameters.alphaMap ? '#define USE_ALPHAMAP' : '', parameters.transmission ? '#define USE_TRANSMISSION' : '', parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '', parameters.vertexTangents ? '#define USE_TANGENT' : '', parameters.vertexColors ? '#define USE_COLOR' : '', parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', parameters.vertexUvs ? '#define USE_UV' : '', parameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', parameters.flatShading ? '#define FLAT_SHADED' : '', parameters.skinning ? '#define USE_SKINNING' : '', parameters.useVertexTexture ? '#define BONE_TEXTURE' : '', parameters.morphTargets ? '#define USE_MORPHTARGETS' : '', parameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '', parameters.doubleSided ? '#define DOUBLE_SIDED' : '', parameters.flipSided ? '#define FLIP_SIDED' : '', parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', parameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '', parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '', 'uniform mat4 modelMatrix;', 'uniform mat4 modelViewMatrix;', 'uniform mat4 projectionMatrix;', 'uniform mat4 viewMatrix;', 'uniform mat3 normalMatrix;', 'uniform vec3 cameraPosition;', 'uniform bool isOrthographic;', '#ifdef USE_INSTANCING', ' attribute mat4 instanceMatrix;', '#endif', '#ifdef USE_INSTANCING_COLOR', ' attribute vec3 instanceColor;', '#endif', 'attribute vec3 position;', 'attribute vec3 normal;', 'attribute vec2 uv;', '#ifdef USE_TANGENT', ' attribute vec4 tangent;', '#endif', '#if defined( USE_COLOR_ALPHA )', ' attribute vec4 color;', '#elif defined( USE_COLOR )', ' attribute vec3 color;', '#endif', '#ifdef USE_MORPHTARGETS', ' attribute vec3 morphTarget0;', ' attribute vec3 morphTarget1;', ' attribute vec3 morphTarget2;', ' attribute vec3 morphTarget3;', ' #ifdef USE_MORPHNORMALS', ' attribute vec3 morphNormal0;', ' attribute vec3 morphNormal1;', ' attribute vec3 morphNormal2;', ' attribute vec3 morphNormal3;', ' #else', ' attribute vec3 morphTarget4;', ' attribute vec3 morphTarget5;', ' attribute vec3 morphTarget6;', ' attribute vec3 morphTarget7;', ' #endif', '#endif', '#ifdef USE_SKINNING', ' attribute vec4 skinIndex;', ' attribute vec4 skinWeight;', '#endif', '\n'].filter(filterEmptyLine).join('\n'); - prefixFragment = [customExtensions, generatePrecision(parameters), '#define SHADER_NAME ' + parameters.shaderName, customDefines, parameters.alphaTest ? '#define ALPHATEST ' + parameters.alphaTest + (parameters.alphaTest % 1 ? '' : '.0') : '', // add '.0' if integer - '#define GAMMA_FACTOR ' + gammaFactorDefine, parameters.useFog && parameters.fog ? '#define USE_FOG' : '', parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', parameters.map ? '#define USE_MAP' : '', parameters.matcap ? '#define USE_MATCAP' : '', parameters.envMap ? '#define USE_ENVMAP' : '', parameters.envMap ? '#define ' + envMapTypeDefine : '', parameters.envMap ? '#define ' + envMapModeDefine : '', parameters.envMap ? '#define ' + envMapBlendingDefine : '', parameters.lightMap ? '#define USE_LIGHTMAP' : '', parameters.aoMap ? '#define USE_AOMAP' : '', parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', parameters.bumpMap ? '#define USE_BUMPMAP' : '', parameters.normalMap ? '#define USE_NORMALMAP' : '', parameters.normalMap && parameters.objectSpaceNormalMap ? '#define OBJECTSPACE_NORMALMAP' : '', parameters.normalMap && parameters.tangentSpaceNormalMap ? '#define TANGENTSPACE_NORMALMAP' : '', parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', parameters.specularMap ? '#define USE_SPECULARMAP' : '', parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', parameters.alphaMap ? '#define USE_ALPHAMAP' : '', parameters.sheen ? '#define USE_SHEEN' : '', parameters.transmission ? '#define USE_TRANSMISSION' : '', parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '', parameters.vertexTangents ? '#define USE_TANGENT' : '', parameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '', parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', parameters.vertexUvs ? '#define USE_UV' : '', parameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', parameters.gradientMap ? '#define USE_GRADIENTMAP' : '', parameters.flatShading ? '#define FLAT_SHADED' : '', parameters.doubleSided ? '#define DOUBLE_SIDED' : '', parameters.flipSided ? '#define FLIP_SIDED' : '', parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', parameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '', parameters.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '', parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '', (parameters.extensionShaderTextureLOD || parameters.envMap) && parameters.rendererExtensionShaderTextureLod ? '#define TEXTURE_LOD_EXT' : '', 'uniform mat4 viewMatrix;', 'uniform vec3 cameraPosition;', 'uniform bool isOrthographic;', parameters.toneMapping !== NoToneMapping ? '#define TONE_MAPPING' : '', parameters.toneMapping !== NoToneMapping ? ShaderChunk['tonemapping_pars_fragment'] : '', // this code is required here because it is used by the toneMapping() function defined below - parameters.toneMapping !== NoToneMapping ? getToneMappingFunction('toneMapping', parameters.toneMapping) : '', parameters.dithering ? '#define DITHERING' : '', ShaderChunk['encodings_pars_fragment'], // this code is required here because it is used by the various encoding/decoding function defined below - parameters.map ? getTexelDecodingFunction('mapTexelToLinear', parameters.mapEncoding) : '', parameters.matcap ? getTexelDecodingFunction('matcapTexelToLinear', parameters.matcapEncoding) : '', parameters.envMap ? getTexelDecodingFunction('envMapTexelToLinear', parameters.envMapEncoding) : '', parameters.emissiveMap ? getTexelDecodingFunction('emissiveMapTexelToLinear', parameters.emissiveMapEncoding) : '', parameters.lightMap ? getTexelDecodingFunction('lightMapTexelToLinear', parameters.lightMapEncoding) : '', getTexelEncodingFunction('linearToOutputTexel', parameters.outputEncoding), parameters.depthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '', '\n'].filter(filterEmptyLine).join('\n'); - } - - vertexShader = resolveIncludes(vertexShader); - vertexShader = replaceLightNums(vertexShader, parameters); - vertexShader = replaceClippingPlaneNums(vertexShader, parameters); - fragmentShader = resolveIncludes(fragmentShader); - fragmentShader = replaceLightNums(fragmentShader, parameters); - fragmentShader = replaceClippingPlaneNums(fragmentShader, parameters); - vertexShader = unrollLoops(vertexShader); - fragmentShader = unrollLoops(fragmentShader); - - if (parameters.isWebGL2 && parameters.isRawShaderMaterial !== true) { - // GLSL 3.0 conversion for built-in materials and ShaderMaterial - versionString = '#version 300 es\n'; - prefixVertex = ['#define attribute in', '#define varying out', '#define texture2D texture'].join('\n') + '\n' + prefixVertex; - prefixFragment = ['#define varying in', parameters.glslVersion === GLSL3 ? '' : 'out highp vec4 pc_fragColor;', parameters.glslVersion === GLSL3 ? '' : '#define gl_FragColor pc_fragColor', '#define gl_FragDepthEXT gl_FragDepth', '#define texture2D texture', '#define textureCube texture', '#define texture2DProj textureProj', '#define texture2DLodEXT textureLod', '#define texture2DProjLodEXT textureProjLod', '#define textureCubeLodEXT textureLod', '#define texture2DGradEXT textureGrad', '#define texture2DProjGradEXT textureProjGrad', '#define textureCubeGradEXT textureGrad'].join('\n') + '\n' + prefixFragment; - } - - const vertexGlsl = versionString + prefixVertex + vertexShader; - const fragmentGlsl = versionString + prefixFragment + fragmentShader; // console.log( '*VERTEX*', vertexGlsl ); - // console.log( '*FRAGMENT*', fragmentGlsl ); - - const glVertexShader = WebGLShader(gl, gl.VERTEX_SHADER, vertexGlsl); - const glFragmentShader = WebGLShader(gl, gl.FRAGMENT_SHADER, fragmentGlsl); - gl.attachShader(program, glVertexShader); - gl.attachShader(program, glFragmentShader); // Force a particular attribute to index 0. - - if (parameters.index0AttributeName !== undefined) { - gl.bindAttribLocation(program, 0, parameters.index0AttributeName); - } else if (parameters.morphTargets === true) { - // programs with morphTargets displace position out of attribute 0 - gl.bindAttribLocation(program, 0, 'position'); - } - - gl.linkProgram(program); // check for link errors - - if (renderer.debug.checkShaderErrors) { - const programLog = gl.getProgramInfoLog(program).trim(); - const vertexLog = gl.getShaderInfoLog(glVertexShader).trim(); - const fragmentLog = gl.getShaderInfoLog(glFragmentShader).trim(); - let runnable = true; - let haveDiagnostics = true; - - if (gl.getProgramParameter(program, gl.LINK_STATUS) === false) { - runnable = false; - const vertexErrors = getShaderErrors(gl, glVertexShader, 'vertex'); - const fragmentErrors = getShaderErrors(gl, glFragmentShader, 'fragment'); - console.error('THREE.WebGLProgram: shader error: ', gl.getError(), 'gl.VALIDATE_STATUS', gl.getProgramParameter(program, gl.VALIDATE_STATUS), 'gl.getProgramInfoLog', programLog, vertexErrors, fragmentErrors); - } else if (programLog !== '') { - console.warn('THREE.WebGLProgram: gl.getProgramInfoLog()', programLog); - } else if (vertexLog === '' || fragmentLog === '') { - haveDiagnostics = false; - } - - if (haveDiagnostics) { - this.diagnostics = { - runnable: runnable, - programLog: programLog, - vertexShader: { - log: vertexLog, - prefix: prefixVertex - }, - fragmentShader: { - log: fragmentLog, - prefix: prefixFragment - } - }; - } - } // Clean up - // Crashes in iOS9 and iOS10. #18402 - // gl.detachShader( program, glVertexShader ); - // gl.detachShader( program, glFragmentShader ); - - - gl.deleteShader(glVertexShader); - gl.deleteShader(glFragmentShader); // set up caching for uniform locations - - let cachedUniforms; - - this.getUniforms = function () { - if (cachedUniforms === undefined) { - cachedUniforms = new WebGLUniforms(gl, program); - } - - return cachedUniforms; - }; // set up caching for attribute locations - - - let cachedAttributes; - - this.getAttributes = function () { - if (cachedAttributes === undefined) { - cachedAttributes = fetchAttributeLocations(gl, program); - } - - return cachedAttributes; - }; // free resource - - - this.destroy = function () { - bindingStates.releaseStatesOfProgram(this); - gl.deleteProgram(program); - this.program = undefined; - }; // - - - this.name = parameters.shaderName; - this.id = programIdCount++; - this.cacheKey = cacheKey; - this.usedTimes = 1; - this.program = program; - this.vertexShader = glVertexShader; - this.fragmentShader = glFragmentShader; - return this; - } - - function WebGLPrograms(renderer, cubemaps, extensions, capabilities, bindingStates, clipping) { - const programs = []; - const isWebGL2 = capabilities.isWebGL2; - const logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer; - const floatVertexTextures = capabilities.floatVertexTextures; - const maxVertexUniforms = capabilities.maxVertexUniforms; - const vertexTextures = capabilities.vertexTextures; - let precision = capabilities.precision; - const shaderIDs = { - MeshDepthMaterial: 'depth', - MeshDistanceMaterial: 'distanceRGBA', - MeshNormalMaterial: 'normal', - MeshBasicMaterial: 'basic', - MeshLambertMaterial: 'lambert', - MeshPhongMaterial: 'phong', - MeshToonMaterial: 'toon', - MeshStandardMaterial: 'physical', - MeshPhysicalMaterial: 'physical', - MeshMatcapMaterial: 'matcap', - LineBasicMaterial: 'basic', - LineDashedMaterial: 'dashed', - PointsMaterial: 'points', - ShadowMaterial: 'shadow', - SpriteMaterial: 'sprite' - }; - const parameterNames = ['precision', 'isWebGL2', 'supportsVertexTextures', 'outputEncoding', 'instancing', 'instancingColor', 'map', 'mapEncoding', 'matcap', 'matcapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'envMapCubeUV', 'lightMap', 'lightMapEncoding', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap', 'objectSpaceNormalMap', 'tangentSpaceNormalMap', 'clearcoatMap', 'clearcoatRoughnessMap', 'clearcoatNormalMap', 'displacementMap', 'specularMap', 'roughnessMap', 'metalnessMap', 'gradientMap', 'alphaMap', 'combine', 'vertexColors', 'vertexAlphas', 'vertexTangents', 'vertexUvs', 'uvsVertexOnly', 'fog', 'useFog', 'fogExp2', 'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning', 'maxBones', 'useVertexTexture', 'morphTargets', 'morphNormals', 'premultipliedAlpha', 'numDirLights', 'numPointLights', 'numSpotLights', 'numHemiLights', 'numRectAreaLights', 'numDirLightShadows', 'numPointLightShadows', 'numSpotLightShadows', 'shadowMapEnabled', 'shadowMapType', 'toneMapping', 'physicallyCorrectLights', 'alphaTest', 'doubleSided', 'flipSided', 'numClippingPlanes', 'numClipIntersection', 'depthPacking', 'dithering', 'sheen', 'transmission', 'transmissionMap', 'thicknessMap']; - - function getMaxBones(object) { - const skeleton = object.skeleton; - const bones = skeleton.bones; - - if (floatVertexTextures) { - return 1024; - } else { - // default for when object is not specified - // ( for example when prebuilding shader to be used with multiple objects ) - // - // - leave some extra space for other uniforms - // - limit here is ANGLE's 254 max uniform vectors - // (up to 54 should be safe) - const nVertexUniforms = maxVertexUniforms; - const nVertexMatrices = Math.floor((nVertexUniforms - 20) / 4); - const maxBones = Math.min(nVertexMatrices, bones.length); - - if (maxBones < bones.length) { - console.warn('THREE.WebGLRenderer: Skeleton has ' + bones.length + ' bones. This GPU supports ' + maxBones + '.'); - return 0; - } - - return maxBones; - } - } - - function getTextureEncodingFromMap(map) { - let encoding; - - if (map && map.isTexture) { - encoding = map.encoding; - } else if (map && map.isWebGLRenderTarget) { - console.warn('THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead.'); - encoding = map.texture.encoding; - } else { - encoding = LinearEncoding; - } - - return encoding; - } - - function getParameters(material, lights, shadows, scene, object) { - const fog = scene.fog; - const environment = material.isMeshStandardMaterial ? scene.environment : null; - const envMap = cubemaps.get(material.envMap || environment); - const shaderID = shaderIDs[material.type]; // heuristics to create shader parameters according to lights in the scene - // (not to blow over maxLights budget) - - const maxBones = object.isSkinnedMesh ? getMaxBones(object) : 0; - - if (material.precision !== null) { - precision = capabilities.getMaxPrecision(material.precision); - - if (precision !== material.precision) { - console.warn('THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.'); - } - } - - let vertexShader, fragmentShader; - - if (shaderID) { - const shader = ShaderLib[shaderID]; - vertexShader = shader.vertexShader; - fragmentShader = shader.fragmentShader; - } else { - vertexShader = material.vertexShader; - fragmentShader = material.fragmentShader; - } - - const currentRenderTarget = renderer.getRenderTarget(); - const parameters = { - isWebGL2: isWebGL2, - shaderID: shaderID, - shaderName: material.type, - vertexShader: vertexShader, - fragmentShader: fragmentShader, - defines: material.defines, - isRawShaderMaterial: material.isRawShaderMaterial === true, - glslVersion: material.glslVersion, - precision: precision, - instancing: object.isInstancedMesh === true, - instancingColor: object.isInstancedMesh === true && object.instanceColor !== null, - supportsVertexTextures: vertexTextures, - outputEncoding: currentRenderTarget !== null ? getTextureEncodingFromMap(currentRenderTarget.texture) : renderer.outputEncoding, - map: !!material.map, - mapEncoding: getTextureEncodingFromMap(material.map), - matcap: !!material.matcap, - matcapEncoding: getTextureEncodingFromMap(material.matcap), - envMap: !!envMap, - envMapMode: envMap && envMap.mapping, - envMapEncoding: getTextureEncodingFromMap(envMap), - envMapCubeUV: !!envMap && (envMap.mapping === CubeUVReflectionMapping || envMap.mapping === CubeUVRefractionMapping), - lightMap: !!material.lightMap, - lightMapEncoding: getTextureEncodingFromMap(material.lightMap), - aoMap: !!material.aoMap, - emissiveMap: !!material.emissiveMap, - emissiveMapEncoding: getTextureEncodingFromMap(material.emissiveMap), - bumpMap: !!material.bumpMap, - normalMap: !!material.normalMap, - objectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap, - tangentSpaceNormalMap: material.normalMapType === TangentSpaceNormalMap, - clearcoatMap: !!material.clearcoatMap, - clearcoatRoughnessMap: !!material.clearcoatRoughnessMap, - clearcoatNormalMap: !!material.clearcoatNormalMap, - displacementMap: !!material.displacementMap, - roughnessMap: !!material.roughnessMap, - metalnessMap: !!material.metalnessMap, - specularMap: !!material.specularMap, - alphaMap: !!material.alphaMap, - gradientMap: !!material.gradientMap, - sheen: !!material.sheen, - transmission: !!material.transmission, - transmissionMap: !!material.transmissionMap, - thicknessMap: !!material.thicknessMap, - combine: material.combine, - vertexTangents: material.normalMap && material.vertexTangents, - vertexColors: material.vertexColors, - vertexAlphas: material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4, - vertexUvs: !!material.map || !!material.bumpMap || !!material.normalMap || !!material.specularMap || !!material.alphaMap || !!material.emissiveMap || !!material.roughnessMap || !!material.metalnessMap || !!material.clearcoatMap || !!material.clearcoatRoughnessMap || !!material.clearcoatNormalMap || !!material.displacementMap || !!material.transmissionMap || !!material.thicknessMap, - uvsVertexOnly: !(!!material.map || !!material.bumpMap || !!material.normalMap || !!material.specularMap || !!material.alphaMap || !!material.emissiveMap || !!material.roughnessMap || !!material.metalnessMap || !!material.clearcoatNormalMap || !!material.transmission || !!material.transmissionMap || !!material.thicknessMap) && !!material.displacementMap, - fog: !!fog, - useFog: material.fog, - fogExp2: fog && fog.isFogExp2, - flatShading: !!material.flatShading, - sizeAttenuation: material.sizeAttenuation, - logarithmicDepthBuffer: logarithmicDepthBuffer, - skinning: object.isSkinnedMesh === true && maxBones > 0, - maxBones: maxBones, - useVertexTexture: floatVertexTextures, - morphTargets: material.morphTargets, - morphNormals: material.morphNormals, - numDirLights: lights.directional.length, - numPointLights: lights.point.length, - numSpotLights: lights.spot.length, - numRectAreaLights: lights.rectArea.length, - numHemiLights: lights.hemi.length, - numDirLightShadows: lights.directionalShadowMap.length, - numPointLightShadows: lights.pointShadowMap.length, - numSpotLightShadows: lights.spotShadowMap.length, - numClippingPlanes: clipping.numPlanes, - numClipIntersection: clipping.numIntersection, - dithering: material.dithering, - shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0, - shadowMapType: renderer.shadowMap.type, - toneMapping: material.toneMapped ? renderer.toneMapping : NoToneMapping, - physicallyCorrectLights: renderer.physicallyCorrectLights, - premultipliedAlpha: material.premultipliedAlpha, - alphaTest: material.alphaTest, - doubleSided: material.side === DoubleSide, - flipSided: material.side === BackSide, - depthPacking: material.depthPacking !== undefined ? material.depthPacking : false, - index0AttributeName: material.index0AttributeName, - extensionDerivatives: material.extensions && material.extensions.derivatives, - extensionFragDepth: material.extensions && material.extensions.fragDepth, - extensionDrawBuffers: material.extensions && material.extensions.drawBuffers, - extensionShaderTextureLOD: material.extensions && material.extensions.shaderTextureLOD, - rendererExtensionFragDepth: isWebGL2 || extensions.has('EXT_frag_depth'), - rendererExtensionDrawBuffers: isWebGL2 || extensions.has('WEBGL_draw_buffers'), - rendererExtensionShaderTextureLod: isWebGL2 || extensions.has('EXT_shader_texture_lod'), - customProgramCacheKey: material.customProgramCacheKey() - }; - return parameters; - } - - function getProgramCacheKey(parameters) { - const array = []; - - if (parameters.shaderID) { - array.push(parameters.shaderID); - } else { - array.push(parameters.fragmentShader); - array.push(parameters.vertexShader); - } - - if (parameters.defines !== undefined) { - for (const name in parameters.defines) { - array.push(name); - array.push(parameters.defines[name]); - } - } - - if (parameters.isRawShaderMaterial === false) { - for (let i = 0; i < parameterNames.length; i++) { - array.push(parameters[parameterNames[i]]); - } - - array.push(renderer.outputEncoding); - array.push(renderer.gammaFactor); - } - - array.push(parameters.customProgramCacheKey); - return array.join(); - } - - function getUniforms(material) { - const shaderID = shaderIDs[material.type]; - let uniforms; - - if (shaderID) { - const shader = ShaderLib[shaderID]; - uniforms = UniformsUtils.clone(shader.uniforms); - } else { - uniforms = material.uniforms; - } - - return uniforms; - } - - function acquireProgram(parameters, cacheKey) { - let program; // Check if code has been already compiled - - for (let p = 0, pl = programs.length; p < pl; p++) { - const preexistingProgram = programs[p]; - - if (preexistingProgram.cacheKey === cacheKey) { - program = preexistingProgram; - ++program.usedTimes; - break; - } - } - - if (program === undefined) { - program = new WebGLProgram(renderer, cacheKey, parameters, bindingStates); - programs.push(program); - } - - return program; - } - - function releaseProgram(program) { - if (--program.usedTimes === 0) { - // Remove from unordered set - const i = programs.indexOf(program); - programs[i] = programs[programs.length - 1]; - programs.pop(); // Free WebGL resources - - program.destroy(); - } - } - - return { - getParameters: getParameters, - getProgramCacheKey: getProgramCacheKey, - getUniforms: getUniforms, - acquireProgram: acquireProgram, - releaseProgram: releaseProgram, - // Exposed for resource monitoring & error feedback via renderer.info: - programs: programs - }; - } - - function WebGLProperties() { - let properties = new WeakMap(); - - function get(object) { - let map = properties.get(object); - - if (map === undefined) { - map = {}; - properties.set(object, map); - } - - return map; - } - - function remove(object) { - properties.delete(object); - } - - function update(object, key, value) { - properties.get(object)[key] = value; - } - - function dispose() { - properties = new WeakMap(); - } - - return { - get: get, - remove: remove, - update: update, - dispose: dispose - }; - } - - function painterSortStable(a, b) { - if (a.groupOrder !== b.groupOrder) { - return a.groupOrder - b.groupOrder; - } else if (a.renderOrder !== b.renderOrder) { - return a.renderOrder - b.renderOrder; - } else if (a.program !== b.program) { - return a.program.id - b.program.id; - } else if (a.material.id !== b.material.id) { - return a.material.id - b.material.id; - } else if (a.z !== b.z) { - return a.z - b.z; - } else { - return a.id - b.id; - } - } - - function reversePainterSortStable(a, b) { - if (a.groupOrder !== b.groupOrder) { - return a.groupOrder - b.groupOrder; - } else if (a.renderOrder !== b.renderOrder) { - return a.renderOrder - b.renderOrder; - } else if (a.z !== b.z) { - return b.z - a.z; - } else { - return a.id - b.id; - } - } - - function WebGLRenderList(properties) { - const renderItems = []; - let renderItemsIndex = 0; - const opaque = []; - const transmissive = []; - const transparent = []; - const defaultProgram = { - id: -1 - }; - - function init() { - renderItemsIndex = 0; - opaque.length = 0; - transmissive.length = 0; - transparent.length = 0; - } - - function getNextRenderItem(object, geometry, material, groupOrder, z, group) { - let renderItem = renderItems[renderItemsIndex]; - const materialProperties = properties.get(material); - - if (renderItem === undefined) { - renderItem = { - id: object.id, - object: object, - geometry: geometry, - material: material, - program: materialProperties.program || defaultProgram, - groupOrder: groupOrder, - renderOrder: object.renderOrder, - z: z, - group: group - }; - renderItems[renderItemsIndex] = renderItem; - } else { - renderItem.id = object.id; - renderItem.object = object; - renderItem.geometry = geometry; - renderItem.material = material; - renderItem.program = materialProperties.program || defaultProgram; - renderItem.groupOrder = groupOrder; - renderItem.renderOrder = object.renderOrder; - renderItem.z = z; - renderItem.group = group; - } - - renderItemsIndex++; - return renderItem; - } - - function push(object, geometry, material, groupOrder, z, group) { - const renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group); - - if (material.transmission > 0.0) { - transmissive.push(renderItem); - } else if (material.transparent === true) { - transparent.push(renderItem); - } else { - opaque.push(renderItem); - } - } - - function unshift(object, geometry, material, groupOrder, z, group) { - const renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group); - - if (material.transmission > 0.0) { - transmissive.unshift(renderItem); - } else if (material.transparent === true) { - transparent.unshift(renderItem); - } else { - opaque.unshift(renderItem); - } - } - - function sort(customOpaqueSort, customTransparentSort) { - if (opaque.length > 1) opaque.sort(customOpaqueSort || painterSortStable); - if (transmissive.length > 1) transmissive.sort(customTransparentSort || reversePainterSortStable); - if (transparent.length > 1) transparent.sort(customTransparentSort || reversePainterSortStable); - } - - function finish() { - // Clear references from inactive renderItems in the list - for (let i = renderItemsIndex, il = renderItems.length; i < il; i++) { - const renderItem = renderItems[i]; - if (renderItem.id === null) break; - renderItem.id = null; - renderItem.object = null; - renderItem.geometry = null; - renderItem.material = null; - renderItem.program = null; - renderItem.group = null; - } - } - - return { - opaque: opaque, - transmissive: transmissive, - transparent: transparent, - init: init, - push: push, - unshift: unshift, - finish: finish, - sort: sort - }; - } - - function WebGLRenderLists(properties) { - let lists = new WeakMap(); - - function get(scene, renderCallDepth) { - let list; - - if (lists.has(scene) === false) { - list = new WebGLRenderList(properties); - lists.set(scene, [list]); - } else { - if (renderCallDepth >= lists.get(scene).length) { - list = new WebGLRenderList(properties); - lists.get(scene).push(list); - } else { - list = lists.get(scene)[renderCallDepth]; - } - } - - return list; - } - - function dispose() { - lists = new WeakMap(); - } - - return { - get: get, - dispose: dispose - }; - } - - function UniformsCache() { - const lights = {}; - return { - get: function (light) { - if (lights[light.id] !== undefined) { - return lights[light.id]; - } - - let uniforms; - - switch (light.type) { - case 'DirectionalLight': - uniforms = { - direction: new Vector3(), - color: new Color() - }; - break; - - case 'SpotLight': - uniforms = { - position: new Vector3(), - direction: new Vector3(), - color: new Color(), - distance: 0, - coneCos: 0, - penumbraCos: 0, - decay: 0 - }; - break; - - case 'PointLight': - uniforms = { - position: new Vector3(), - color: new Color(), - distance: 0, - decay: 0 - }; - break; - - case 'HemisphereLight': - uniforms = { - direction: new Vector3(), - skyColor: new Color(), - groundColor: new Color() - }; - break; - - case 'RectAreaLight': - uniforms = { - color: new Color(), - position: new Vector3(), - halfWidth: new Vector3(), - halfHeight: new Vector3() - }; - break; - } - - lights[light.id] = uniforms; - return uniforms; - } - }; - } - - function ShadowUniformsCache() { - const lights = {}; - return { - get: function (light) { - if (lights[light.id] !== undefined) { - return lights[light.id]; - } - - let uniforms; - - switch (light.type) { - case 'DirectionalLight': - uniforms = { - shadowBias: 0, - shadowNormalBias: 0, - shadowRadius: 1, - shadowMapSize: new Vector2() - }; - break; - - case 'SpotLight': - uniforms = { - shadowBias: 0, - shadowNormalBias: 0, - shadowRadius: 1, - shadowMapSize: new Vector2() - }; - break; - - case 'PointLight': - uniforms = { - shadowBias: 0, - shadowNormalBias: 0, - shadowRadius: 1, - shadowMapSize: new Vector2(), - shadowCameraNear: 1, - shadowCameraFar: 1000 - }; - break; - // TODO (abelnation): set RectAreaLight shadow uniforms - } - - lights[light.id] = uniforms; - return uniforms; - } - }; - } - - let nextVersion = 0; - - function shadowCastingLightsFirst(lightA, lightB) { - return (lightB.castShadow ? 1 : 0) - (lightA.castShadow ? 1 : 0); - } - - function WebGLLights(extensions, capabilities) { - const cache = new UniformsCache(); - const shadowCache = ShadowUniformsCache(); - const state = { - version: 0, - hash: { - directionalLength: -1, - pointLength: -1, - spotLength: -1, - rectAreaLength: -1, - hemiLength: -1, - numDirectionalShadows: -1, - numPointShadows: -1, - numSpotShadows: -1 - }, - ambient: [0, 0, 0], - probe: [], - directional: [], - directionalShadow: [], - directionalShadowMap: [], - directionalShadowMatrix: [], - spot: [], - spotShadow: [], - spotShadowMap: [], - spotShadowMatrix: [], - rectArea: [], - rectAreaLTC1: null, - rectAreaLTC2: null, - point: [], - pointShadow: [], - pointShadowMap: [], - pointShadowMatrix: [], - hemi: [] - }; - - for (let i = 0; i < 9; i++) state.probe.push(new Vector3()); - - const vector3 = new Vector3(); - const matrix4 = new Matrix4(); - const matrix42 = new Matrix4(); - - function setup(lights) { - let r = 0, - g = 0, - b = 0; - - for (let i = 0; i < 9; i++) state.probe[i].set(0, 0, 0); - - let directionalLength = 0; - let pointLength = 0; - let spotLength = 0; - let rectAreaLength = 0; - let hemiLength = 0; - let numDirectionalShadows = 0; - let numPointShadows = 0; - let numSpotShadows = 0; - lights.sort(shadowCastingLightsFirst); - - for (let i = 0, l = lights.length; i < l; i++) { - const light = lights[i]; - const color = light.color; - const intensity = light.intensity; - const distance = light.distance; - const shadowMap = light.shadow && light.shadow.map ? light.shadow.map.texture : null; - - if (light.isAmbientLight) { - r += color.r * intensity; - g += color.g * intensity; - b += color.b * intensity; - } else if (light.isLightProbe) { - for (let j = 0; j < 9; j++) { - state.probe[j].addScaledVector(light.sh.coefficients[j], intensity); - } - } else if (light.isDirectionalLight) { - const uniforms = cache.get(light); - uniforms.color.copy(light.color).multiplyScalar(light.intensity); - - if (light.castShadow) { - const shadow = light.shadow; - const shadowUniforms = shadowCache.get(light); - shadowUniforms.shadowBias = shadow.bias; - shadowUniforms.shadowNormalBias = shadow.normalBias; - shadowUniforms.shadowRadius = shadow.radius; - shadowUniforms.shadowMapSize = shadow.mapSize; - state.directionalShadow[directionalLength] = shadowUniforms; - state.directionalShadowMap[directionalLength] = shadowMap; - state.directionalShadowMatrix[directionalLength] = light.shadow.matrix; - numDirectionalShadows++; - } - - state.directional[directionalLength] = uniforms; - directionalLength++; - } else if (light.isSpotLight) { - const uniforms = cache.get(light); - uniforms.position.setFromMatrixPosition(light.matrixWorld); - uniforms.color.copy(color).multiplyScalar(intensity); - uniforms.distance = distance; - uniforms.coneCos = Math.cos(light.angle); - uniforms.penumbraCos = Math.cos(light.angle * (1 - light.penumbra)); - uniforms.decay = light.decay; - - if (light.castShadow) { - const shadow = light.shadow; - const shadowUniforms = shadowCache.get(light); - shadowUniforms.shadowBias = shadow.bias; - shadowUniforms.shadowNormalBias = shadow.normalBias; - shadowUniforms.shadowRadius = shadow.radius; - shadowUniforms.shadowMapSize = shadow.mapSize; - state.spotShadow[spotLength] = shadowUniforms; - state.spotShadowMap[spotLength] = shadowMap; - state.spotShadowMatrix[spotLength] = light.shadow.matrix; - numSpotShadows++; - } - - state.spot[spotLength] = uniforms; - spotLength++; - } else if (light.isRectAreaLight) { - const uniforms = cache.get(light); // (a) intensity is the total visible light emitted - //uniforms.color.copy( color ).multiplyScalar( intensity / ( light.width * light.height * Math.PI ) ); - // (b) intensity is the brightness of the light - - uniforms.color.copy(color).multiplyScalar(intensity); - uniforms.halfWidth.set(light.width * 0.5, 0.0, 0.0); - uniforms.halfHeight.set(0.0, light.height * 0.5, 0.0); - state.rectArea[rectAreaLength] = uniforms; - rectAreaLength++; - } else if (light.isPointLight) { - const uniforms = cache.get(light); - uniforms.color.copy(light.color).multiplyScalar(light.intensity); - uniforms.distance = light.distance; - uniforms.decay = light.decay; - - if (light.castShadow) { - const shadow = light.shadow; - const shadowUniforms = shadowCache.get(light); - shadowUniforms.shadowBias = shadow.bias; - shadowUniforms.shadowNormalBias = shadow.normalBias; - shadowUniforms.shadowRadius = shadow.radius; - shadowUniforms.shadowMapSize = shadow.mapSize; - shadowUniforms.shadowCameraNear = shadow.camera.near; - shadowUniforms.shadowCameraFar = shadow.camera.far; - state.pointShadow[pointLength] = shadowUniforms; - state.pointShadowMap[pointLength] = shadowMap; - state.pointShadowMatrix[pointLength] = light.shadow.matrix; - numPointShadows++; - } - - state.point[pointLength] = uniforms; - pointLength++; - } else if (light.isHemisphereLight) { - const uniforms = cache.get(light); - uniforms.skyColor.copy(light.color).multiplyScalar(intensity); - uniforms.groundColor.copy(light.groundColor).multiplyScalar(intensity); - state.hemi[hemiLength] = uniforms; - hemiLength++; - } - } - - if (rectAreaLength > 0) { - if (capabilities.isWebGL2) { - // WebGL 2 - state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1; - state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2; - } else { - // WebGL 1 - if (extensions.has('OES_texture_float_linear') === true) { - state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1; - state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2; - } else if (extensions.has('OES_texture_half_float_linear') === true) { - state.rectAreaLTC1 = UniformsLib.LTC_HALF_1; - state.rectAreaLTC2 = UniformsLib.LTC_HALF_2; - } else { - console.error('THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.'); - } - } - } - - state.ambient[0] = r; - state.ambient[1] = g; - state.ambient[2] = b; - const hash = state.hash; - - if (hash.directionalLength !== directionalLength || hash.pointLength !== pointLength || hash.spotLength !== spotLength || hash.rectAreaLength !== rectAreaLength || hash.hemiLength !== hemiLength || hash.numDirectionalShadows !== numDirectionalShadows || hash.numPointShadows !== numPointShadows || hash.numSpotShadows !== numSpotShadows) { - state.directional.length = directionalLength; - state.spot.length = spotLength; - state.rectArea.length = rectAreaLength; - state.point.length = pointLength; - state.hemi.length = hemiLength; - state.directionalShadow.length = numDirectionalShadows; - state.directionalShadowMap.length = numDirectionalShadows; - state.pointShadow.length = numPointShadows; - state.pointShadowMap.length = numPointShadows; - state.spotShadow.length = numSpotShadows; - state.spotShadowMap.length = numSpotShadows; - state.directionalShadowMatrix.length = numDirectionalShadows; - state.pointShadowMatrix.length = numPointShadows; - state.spotShadowMatrix.length = numSpotShadows; - hash.directionalLength = directionalLength; - hash.pointLength = pointLength; - hash.spotLength = spotLength; - hash.rectAreaLength = rectAreaLength; - hash.hemiLength = hemiLength; - hash.numDirectionalShadows = numDirectionalShadows; - hash.numPointShadows = numPointShadows; - hash.numSpotShadows = numSpotShadows; - state.version = nextVersion++; - } - } - - function setupView(lights, camera) { - let directionalLength = 0; - let pointLength = 0; - let spotLength = 0; - let rectAreaLength = 0; - let hemiLength = 0; - const viewMatrix = camera.matrixWorldInverse; - - for (let i = 0, l = lights.length; i < l; i++) { - const light = lights[i]; - - if (light.isDirectionalLight) { - const uniforms = state.directional[directionalLength]; - uniforms.direction.setFromMatrixPosition(light.matrixWorld); - vector3.setFromMatrixPosition(light.target.matrixWorld); - uniforms.direction.sub(vector3); - uniforms.direction.transformDirection(viewMatrix); - directionalLength++; - } else if (light.isSpotLight) { - const uniforms = state.spot[spotLength]; - uniforms.position.setFromMatrixPosition(light.matrixWorld); - uniforms.position.applyMatrix4(viewMatrix); - uniforms.direction.setFromMatrixPosition(light.matrixWorld); - vector3.setFromMatrixPosition(light.target.matrixWorld); - uniforms.direction.sub(vector3); - uniforms.direction.transformDirection(viewMatrix); - spotLength++; - } else if (light.isRectAreaLight) { - const uniforms = state.rectArea[rectAreaLength]; - uniforms.position.setFromMatrixPosition(light.matrixWorld); - uniforms.position.applyMatrix4(viewMatrix); // extract local rotation of light to derive width/height half vectors - - matrix42.identity(); - matrix4.copy(light.matrixWorld); - matrix4.premultiply(viewMatrix); - matrix42.extractRotation(matrix4); - uniforms.halfWidth.set(light.width * 0.5, 0.0, 0.0); - uniforms.halfHeight.set(0.0, light.height * 0.5, 0.0); - uniforms.halfWidth.applyMatrix4(matrix42); - uniforms.halfHeight.applyMatrix4(matrix42); - rectAreaLength++; - } else if (light.isPointLight) { - const uniforms = state.point[pointLength]; - uniforms.position.setFromMatrixPosition(light.matrixWorld); - uniforms.position.applyMatrix4(viewMatrix); - pointLength++; - } else if (light.isHemisphereLight) { - const uniforms = state.hemi[hemiLength]; - uniforms.direction.setFromMatrixPosition(light.matrixWorld); - uniforms.direction.transformDirection(viewMatrix); - uniforms.direction.normalize(); - hemiLength++; - } - } - } - - return { - setup: setup, - setupView: setupView, - state: state - }; - } - - function WebGLRenderState(extensions, capabilities) { - const lights = new WebGLLights(extensions, capabilities); - const lightsArray = []; - const shadowsArray = []; - - function init() { - lightsArray.length = 0; - shadowsArray.length = 0; - } - - function pushLight(light) { - lightsArray.push(light); - } - - function pushShadow(shadowLight) { - shadowsArray.push(shadowLight); - } - - function setupLights() { - lights.setup(lightsArray); - } - - function setupLightsView(camera) { - lights.setupView(lightsArray, camera); - } - - const state = { - lightsArray: lightsArray, - shadowsArray: shadowsArray, - lights: lights - }; - return { - init: init, - state: state, - setupLights: setupLights, - setupLightsView: setupLightsView, - pushLight: pushLight, - pushShadow: pushShadow - }; - } - - function WebGLRenderStates(extensions, capabilities) { - let renderStates = new WeakMap(); - - function get(scene, renderCallDepth = 0) { - let renderState; - - if (renderStates.has(scene) === false) { - renderState = new WebGLRenderState(extensions, capabilities); - renderStates.set(scene, [renderState]); - } else { - if (renderCallDepth >= renderStates.get(scene).length) { - renderState = new WebGLRenderState(extensions, capabilities); - renderStates.get(scene).push(renderState); - } else { - renderState = renderStates.get(scene)[renderCallDepth]; - } - } - - return renderState; - } - - function dispose() { - renderStates = new WeakMap(); - } - - return { - get: get, - dispose: dispose - }; - } - - /** - * parameters = { - * - * opacity: , - * - * map: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * wireframe: , - * wireframeLinewidth: - * } - */ - - class MeshDepthMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'MeshDepthMaterial'; - this.depthPacking = BasicDepthPacking; - this.morphTargets = false; - this.map = null; - this.alphaMap = null; - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - this.wireframe = false; - this.wireframeLinewidth = 1; - this.fog = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.depthPacking = source.depthPacking; - this.morphTargets = source.morphTargets; - this.map = source.map; - this.alphaMap = source.alphaMap; - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - return this; - } - - } - - MeshDepthMaterial.prototype.isMeshDepthMaterial = true; - - /** - * parameters = { - * - * referencePosition: , - * nearDistance: , - * farDistance: , - * - * morphTargets: , - * - * map: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: - * - * } - */ - - class MeshDistanceMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'MeshDistanceMaterial'; - this.referencePosition = new Vector3(); - this.nearDistance = 1; - this.farDistance = 1000; - this.morphTargets = false; - this.map = null; - this.alphaMap = null; - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - this.fog = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.referencePosition.copy(source.referencePosition); - this.nearDistance = source.nearDistance; - this.farDistance = source.farDistance; - this.morphTargets = source.morphTargets; - this.map = source.map; - this.alphaMap = source.alphaMap; - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - return this; - } - - } - - MeshDistanceMaterial.prototype.isMeshDistanceMaterial = true; - - var vsm_frag = "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"; - - var vsm_vert = "void main() {\n\tgl_Position = vec4( position, 1.0 );\n}"; - - function WebGLShadowMap(_renderer, _objects, _capabilities) { - let _frustum = new Frustum(); - - const _shadowMapSize = new Vector2(), - _viewportSize = new Vector2(), - _viewport = new Vector4(), - _depthMaterials = [], - _distanceMaterials = [], - _materialCache = {}, - _maxTextureSize = _capabilities.maxTextureSize; - - const shadowSide = { - 0: BackSide, - 1: FrontSide, - 2: DoubleSide - }; - const shadowMaterialVertical = new ShaderMaterial({ - defines: { - SAMPLE_RATE: 2.0 / 8.0, - HALF_SAMPLE_RATE: 1.0 / 8.0 - }, - uniforms: { - shadow_pass: { - value: null - }, - resolution: { - value: new Vector2() - }, - radius: { - value: 4.0 - } - }, - vertexShader: vsm_vert, - fragmentShader: vsm_frag - }); - const shadowMaterialHorizontal = shadowMaterialVertical.clone(); - shadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1; - const fullScreenTri = new BufferGeometry(); - fullScreenTri.setAttribute('position', new BufferAttribute(new Float32Array([-1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5]), 3)); - const fullScreenMesh = new Mesh(fullScreenTri, shadowMaterialVertical); - const scope = this; - this.enabled = false; - this.autoUpdate = true; - this.needsUpdate = false; - this.type = PCFShadowMap; - - this.render = function (lights, scene, camera) { - if (scope.enabled === false) return; - if (scope.autoUpdate === false && scope.needsUpdate === false) return; - if (lights.length === 0) return; - - const currentRenderTarget = _renderer.getRenderTarget(); - - const activeCubeFace = _renderer.getActiveCubeFace(); - - const activeMipmapLevel = _renderer.getActiveMipmapLevel(); - - const _state = _renderer.state; // Set GL state for depth map. - - _state.setBlending(NoBlending); - - _state.buffers.color.setClear(1, 1, 1, 1); - - _state.buffers.depth.setTest(true); - - _state.setScissorTest(false); // render depth map - - - for (let i = 0, il = lights.length; i < il; i++) { - const light = lights[i]; - const shadow = light.shadow; - - if (shadow === undefined) { - console.warn('THREE.WebGLShadowMap:', light, 'has no shadow.'); - continue; - } - - if (shadow.autoUpdate === false && shadow.needsUpdate === false) continue; - - _shadowMapSize.copy(shadow.mapSize); - - const shadowFrameExtents = shadow.getFrameExtents(); - - _shadowMapSize.multiply(shadowFrameExtents); - - _viewportSize.copy(shadow.mapSize); - - if (_shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize) { - if (_shadowMapSize.x > _maxTextureSize) { - _viewportSize.x = Math.floor(_maxTextureSize / shadowFrameExtents.x); - _shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x; - shadow.mapSize.x = _viewportSize.x; - } - - if (_shadowMapSize.y > _maxTextureSize) { - _viewportSize.y = Math.floor(_maxTextureSize / shadowFrameExtents.y); - _shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y; - shadow.mapSize.y = _viewportSize.y; - } - } - - if (shadow.map === null && !shadow.isPointLightShadow && this.type === VSMShadowMap) { - const pars = { - minFilter: LinearFilter, - magFilter: LinearFilter, - format: RGBAFormat - }; - shadow.map = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, pars); - shadow.map.texture.name = light.name + '.shadowMap'; - shadow.mapPass = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, pars); - shadow.camera.updateProjectionMatrix(); - } - - if (shadow.map === null) { - const pars = { - minFilter: NearestFilter, - magFilter: NearestFilter, - format: RGBAFormat - }; - shadow.map = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, pars); - shadow.map.texture.name = light.name + '.shadowMap'; - shadow.camera.updateProjectionMatrix(); - } - - _renderer.setRenderTarget(shadow.map); - - _renderer.clear(); - - const viewportCount = shadow.getViewportCount(); - - for (let vp = 0; vp < viewportCount; vp++) { - const viewport = shadow.getViewport(vp); - - _viewport.set(_viewportSize.x * viewport.x, _viewportSize.y * viewport.y, _viewportSize.x * viewport.z, _viewportSize.y * viewport.w); - - _state.viewport(_viewport); - - shadow.updateMatrices(light, vp); - _frustum = shadow.getFrustum(); - renderObject(scene, camera, shadow.camera, light, this.type); - } // do blur pass for VSM - - - if (!shadow.isPointLightShadow && this.type === VSMShadowMap) { - VSMPass(shadow, camera); - } - - shadow.needsUpdate = false; - } - - scope.needsUpdate = false; - - _renderer.setRenderTarget(currentRenderTarget, activeCubeFace, activeMipmapLevel); - }; - - function VSMPass(shadow, camera) { - const geometry = _objects.update(fullScreenMesh); // vertical pass - - - shadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture; - shadowMaterialVertical.uniforms.resolution.value = shadow.mapSize; - shadowMaterialVertical.uniforms.radius.value = shadow.radius; - - _renderer.setRenderTarget(shadow.mapPass); - - _renderer.clear(); - - _renderer.renderBufferDirect(camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null); // horizontal pass - - - shadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture; - shadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize; - shadowMaterialHorizontal.uniforms.radius.value = shadow.radius; - - _renderer.setRenderTarget(shadow.map); - - _renderer.clear(); - - _renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null); - } - - function getDepthMaterialVariant(useMorphing) { - const index = useMorphing << 0; - let material = _depthMaterials[index]; - - if (material === undefined) { - material = new MeshDepthMaterial({ - depthPacking: RGBADepthPacking, - morphTargets: useMorphing - }); - _depthMaterials[index] = material; - } - - return material; - } - - function getDistanceMaterialVariant(useMorphing) { - const index = useMorphing << 0; - let material = _distanceMaterials[index]; - - if (material === undefined) { - material = new MeshDistanceMaterial({ - morphTargets: useMorphing - }); - _distanceMaterials[index] = material; - } - - return material; - } - - function getDepthMaterial(object, geometry, material, light, shadowCameraNear, shadowCameraFar, type) { - let result = null; - let getMaterialVariant = getDepthMaterialVariant; - let customMaterial = object.customDepthMaterial; - - if (light.isPointLight === true) { - getMaterialVariant = getDistanceMaterialVariant; - customMaterial = object.customDistanceMaterial; - } - - if (customMaterial === undefined) { - let useMorphing = false; - - if (material.morphTargets === true) { - useMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0; - } - - result = getMaterialVariant(useMorphing); - } else { - result = customMaterial; - } - - if (_renderer.localClippingEnabled && material.clipShadows === true && material.clippingPlanes.length !== 0) { - // in this case we need a unique material instance reflecting the - // appropriate state - const keyA = result.uuid, - keyB = material.uuid; - let materialsForVariant = _materialCache[keyA]; - - if (materialsForVariant === undefined) { - materialsForVariant = {}; - _materialCache[keyA] = materialsForVariant; - } - - let cachedMaterial = materialsForVariant[keyB]; - - if (cachedMaterial === undefined) { - cachedMaterial = result.clone(); - materialsForVariant[keyB] = cachedMaterial; - } - - result = cachedMaterial; - } - - result.visible = material.visible; - result.wireframe = material.wireframe; - - if (type === VSMShadowMap) { - result.side = material.shadowSide !== null ? material.shadowSide : material.side; - } else { - result.side = material.shadowSide !== null ? material.shadowSide : shadowSide[material.side]; - } - - result.clipShadows = material.clipShadows; - result.clippingPlanes = material.clippingPlanes; - result.clipIntersection = material.clipIntersection; - result.wireframeLinewidth = material.wireframeLinewidth; - result.linewidth = material.linewidth; - - if (light.isPointLight === true && result.isMeshDistanceMaterial === true) { - result.referencePosition.setFromMatrixPosition(light.matrixWorld); - result.nearDistance = shadowCameraNear; - result.farDistance = shadowCameraFar; - } - - return result; - } - - function renderObject(object, camera, shadowCamera, light, type) { - if (object.visible === false) return; - const visible = object.layers.test(camera.layers); - - if (visible && (object.isMesh || object.isLine || object.isPoints)) { - if ((object.castShadow || object.receiveShadow && type === VSMShadowMap) && (!object.frustumCulled || _frustum.intersectsObject(object))) { - object.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse, object.matrixWorld); - - const geometry = _objects.update(object); - - const material = object.material; - - if (Array.isArray(material)) { - const groups = geometry.groups; - - for (let k = 0, kl = groups.length; k < kl; k++) { - const group = groups[k]; - const groupMaterial = material[group.materialIndex]; - - if (groupMaterial && groupMaterial.visible) { - const depthMaterial = getDepthMaterial(object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type); - - _renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group); - } - } - } else if (material.visible) { - const depthMaterial = getDepthMaterial(object, geometry, material, light, shadowCamera.near, shadowCamera.far, type); - - _renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null); - } - } - } - - const children = object.children; - - for (let i = 0, l = children.length; i < l; i++) { - renderObject(children[i], camera, shadowCamera, light, type); - } - } - } - - function WebGLState(gl, extensions, capabilities) { - const isWebGL2 = capabilities.isWebGL2; - - function ColorBuffer() { - let locked = false; - const color = new Vector4(); - let currentColorMask = null; - const currentColorClear = new Vector4(0, 0, 0, 0); - return { - setMask: function (colorMask) { - if (currentColorMask !== colorMask && !locked) { - gl.colorMask(colorMask, colorMask, colorMask, colorMask); - currentColorMask = colorMask; - } - }, - setLocked: function (lock) { - locked = lock; - }, - setClear: function (r, g, b, a, premultipliedAlpha) { - if (premultipliedAlpha === true) { - r *= a; - g *= a; - b *= a; - } - - color.set(r, g, b, a); - - if (currentColorClear.equals(color) === false) { - gl.clearColor(r, g, b, a); - currentColorClear.copy(color); - } - }, - reset: function () { - locked = false; - currentColorMask = null; - currentColorClear.set(-1, 0, 0, 0); // set to invalid state - } - }; - } - - function DepthBuffer() { - let locked = false; - let currentDepthMask = null; - let currentDepthFunc = null; - let currentDepthClear = null; - return { - setTest: function (depthTest) { - if (depthTest) { - enable(gl.DEPTH_TEST); - } else { - disable(gl.DEPTH_TEST); - } - }, - setMask: function (depthMask) { - if (currentDepthMask !== depthMask && !locked) { - gl.depthMask(depthMask); - currentDepthMask = depthMask; - } - }, - setFunc: function (depthFunc) { - if (currentDepthFunc !== depthFunc) { - if (depthFunc) { - switch (depthFunc) { - case NeverDepth: - gl.depthFunc(gl.NEVER); - break; - - case AlwaysDepth: - gl.depthFunc(gl.ALWAYS); - break; - - case LessDepth: - gl.depthFunc(gl.LESS); - break; - - case LessEqualDepth: - gl.depthFunc(gl.LEQUAL); - break; - - case EqualDepth: - gl.depthFunc(gl.EQUAL); - break; - - case GreaterEqualDepth: - gl.depthFunc(gl.GEQUAL); - break; - - case GreaterDepth: - gl.depthFunc(gl.GREATER); - break; - - case NotEqualDepth: - gl.depthFunc(gl.NOTEQUAL); - break; - - default: - gl.depthFunc(gl.LEQUAL); - } - } else { - gl.depthFunc(gl.LEQUAL); - } - - currentDepthFunc = depthFunc; - } - }, - setLocked: function (lock) { - locked = lock; - }, - setClear: function (depth) { - if (currentDepthClear !== depth) { - gl.clearDepth(depth); - currentDepthClear = depth; - } - }, - reset: function () { - locked = false; - currentDepthMask = null; - currentDepthFunc = null; - currentDepthClear = null; - } - }; - } - - function StencilBuffer() { - let locked = false; - let currentStencilMask = null; - let currentStencilFunc = null; - let currentStencilRef = null; - let currentStencilFuncMask = null; - let currentStencilFail = null; - let currentStencilZFail = null; - let currentStencilZPass = null; - let currentStencilClear = null; - return { - setTest: function (stencilTest) { - if (!locked) { - if (stencilTest) { - enable(gl.STENCIL_TEST); - } else { - disable(gl.STENCIL_TEST); - } - } - }, - setMask: function (stencilMask) { - if (currentStencilMask !== stencilMask && !locked) { - gl.stencilMask(stencilMask); - currentStencilMask = stencilMask; - } - }, - setFunc: function (stencilFunc, stencilRef, stencilMask) { - if (currentStencilFunc !== stencilFunc || currentStencilRef !== stencilRef || currentStencilFuncMask !== stencilMask) { - gl.stencilFunc(stencilFunc, stencilRef, stencilMask); - currentStencilFunc = stencilFunc; - currentStencilRef = stencilRef; - currentStencilFuncMask = stencilMask; - } - }, - setOp: function (stencilFail, stencilZFail, stencilZPass) { - if (currentStencilFail !== stencilFail || currentStencilZFail !== stencilZFail || currentStencilZPass !== stencilZPass) { - gl.stencilOp(stencilFail, stencilZFail, stencilZPass); - currentStencilFail = stencilFail; - currentStencilZFail = stencilZFail; - currentStencilZPass = stencilZPass; - } - }, - setLocked: function (lock) { - locked = lock; - }, - setClear: function (stencil) { - if (currentStencilClear !== stencil) { - gl.clearStencil(stencil); - currentStencilClear = stencil; - } - }, - reset: function () { - locked = false; - currentStencilMask = null; - currentStencilFunc = null; - currentStencilRef = null; - currentStencilFuncMask = null; - currentStencilFail = null; - currentStencilZFail = null; - currentStencilZPass = null; - currentStencilClear = null; - } - }; - } // - - - const colorBuffer = new ColorBuffer(); - const depthBuffer = new DepthBuffer(); - const stencilBuffer = new StencilBuffer(); - let enabledCapabilities = {}; - let xrFramebuffer = null; - let currentBoundFramebuffers = {}; - let currentProgram = null; - let currentBlendingEnabled = false; - let currentBlending = null; - let currentBlendEquation = null; - let currentBlendSrc = null; - let currentBlendDst = null; - let currentBlendEquationAlpha = null; - let currentBlendSrcAlpha = null; - let currentBlendDstAlpha = null; - let currentPremultipledAlpha = false; - let currentFlipSided = null; - let currentCullFace = null; - let currentLineWidth = null; - let currentPolygonOffsetFactor = null; - let currentPolygonOffsetUnits = null; - const maxTextures = gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS); - let lineWidthAvailable = false; - let version = 0; - const glVersion = gl.getParameter(gl.VERSION); - - if (glVersion.indexOf('WebGL') !== -1) { - version = parseFloat(/^WebGL (\d)/.exec(glVersion)[1]); - lineWidthAvailable = version >= 1.0; - } else if (glVersion.indexOf('OpenGL ES') !== -1) { - version = parseFloat(/^OpenGL ES (\d)/.exec(glVersion)[1]); - lineWidthAvailable = version >= 2.0; - } - - let currentTextureSlot = null; - let currentBoundTextures = {}; - const scissorParam = gl.getParameter(gl.SCISSOR_BOX); - const viewportParam = gl.getParameter(gl.VIEWPORT); - const currentScissor = new Vector4().fromArray(scissorParam); - const currentViewport = new Vector4().fromArray(viewportParam); - - function createTexture(type, target, count) { - const data = new Uint8Array(4); // 4 is required to match default unpack alignment of 4. - - const texture = gl.createTexture(); - gl.bindTexture(type, texture); - gl.texParameteri(type, gl.TEXTURE_MIN_FILTER, gl.NEAREST); - gl.texParameteri(type, gl.TEXTURE_MAG_FILTER, gl.NEAREST); - - for (let i = 0; i < count; i++) { - gl.texImage2D(target + i, 0, gl.RGBA, 1, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, data); - } - - return texture; - } - - const emptyTextures = {}; - emptyTextures[gl.TEXTURE_2D] = createTexture(gl.TEXTURE_2D, gl.TEXTURE_2D, 1); - emptyTextures[gl.TEXTURE_CUBE_MAP] = createTexture(gl.TEXTURE_CUBE_MAP, gl.TEXTURE_CUBE_MAP_POSITIVE_X, 6); // init - - colorBuffer.setClear(0, 0, 0, 1); - depthBuffer.setClear(1); - stencilBuffer.setClear(0); - enable(gl.DEPTH_TEST); - depthBuffer.setFunc(LessEqualDepth); - setFlipSided(false); - setCullFace(CullFaceBack); - enable(gl.CULL_FACE); - setBlending(NoBlending); // - - function enable(id) { - if (enabledCapabilities[id] !== true) { - gl.enable(id); - enabledCapabilities[id] = true; - } - } - - function disable(id) { - if (enabledCapabilities[id] !== false) { - gl.disable(id); - enabledCapabilities[id] = false; - } - } - - function bindXRFramebuffer(framebuffer) { - if (framebuffer !== xrFramebuffer) { - gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer); - xrFramebuffer = framebuffer; - } - } - - function bindFramebuffer(target, framebuffer) { - if (framebuffer === null && xrFramebuffer !== null) framebuffer = xrFramebuffer; // use active XR framebuffer if available - - if (currentBoundFramebuffers[target] !== framebuffer) { - gl.bindFramebuffer(target, framebuffer); - currentBoundFramebuffers[target] = framebuffer; - - if (isWebGL2) { - // gl.DRAW_FRAMEBUFFER is equivalent to gl.FRAMEBUFFER - if (target === gl.DRAW_FRAMEBUFFER) { - currentBoundFramebuffers[gl.FRAMEBUFFER] = framebuffer; - } - - if (target === gl.FRAMEBUFFER) { - currentBoundFramebuffers[gl.DRAW_FRAMEBUFFER] = framebuffer; - } - } - - return true; - } - - return false; - } - - function useProgram(program) { - if (currentProgram !== program) { - gl.useProgram(program); - currentProgram = program; - return true; - } - - return false; - } - - const equationToGL = { - [AddEquation]: gl.FUNC_ADD, - [SubtractEquation]: gl.FUNC_SUBTRACT, - [ReverseSubtractEquation]: gl.FUNC_REVERSE_SUBTRACT - }; - - if (isWebGL2) { - equationToGL[MinEquation] = gl.MIN; - equationToGL[MaxEquation] = gl.MAX; - } else { - const extension = extensions.get('EXT_blend_minmax'); - - if (extension !== null) { - equationToGL[MinEquation] = extension.MIN_EXT; - equationToGL[MaxEquation] = extension.MAX_EXT; - } - } - - const factorToGL = { - [ZeroFactor]: gl.ZERO, - [OneFactor]: gl.ONE, - [SrcColorFactor]: gl.SRC_COLOR, - [SrcAlphaFactor]: gl.SRC_ALPHA, - [SrcAlphaSaturateFactor]: gl.SRC_ALPHA_SATURATE, - [DstColorFactor]: gl.DST_COLOR, - [DstAlphaFactor]: gl.DST_ALPHA, - [OneMinusSrcColorFactor]: gl.ONE_MINUS_SRC_COLOR, - [OneMinusSrcAlphaFactor]: gl.ONE_MINUS_SRC_ALPHA, - [OneMinusDstColorFactor]: gl.ONE_MINUS_DST_COLOR, - [OneMinusDstAlphaFactor]: gl.ONE_MINUS_DST_ALPHA - }; - - function setBlending(blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha) { - if (blending === NoBlending) { - if (currentBlendingEnabled === true) { - disable(gl.BLEND); - currentBlendingEnabled = false; - } - - return; - } - - if (currentBlendingEnabled === false) { - enable(gl.BLEND); - currentBlendingEnabled = true; - } - - if (blending !== CustomBlending) { - if (blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha) { - if (currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation) { - gl.blendEquation(gl.FUNC_ADD); - currentBlendEquation = AddEquation; - currentBlendEquationAlpha = AddEquation; - } - - if (premultipliedAlpha) { - switch (blending) { - case NormalBlending: - gl.blendFuncSeparate(gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA); - break; - - case AdditiveBlending: - gl.blendFunc(gl.ONE, gl.ONE); - break; - - case SubtractiveBlending: - gl.blendFuncSeparate(gl.ZERO, gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ONE_MINUS_SRC_ALPHA); - break; - - case MultiplyBlending: - gl.blendFuncSeparate(gl.ZERO, gl.SRC_COLOR, gl.ZERO, gl.SRC_ALPHA); - break; - - default: - console.error('THREE.WebGLState: Invalid blending: ', blending); - break; - } - } else { - switch (blending) { - case NormalBlending: - gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA); - break; - - case AdditiveBlending: - gl.blendFunc(gl.SRC_ALPHA, gl.ONE); - break; - - case SubtractiveBlending: - gl.blendFunc(gl.ZERO, gl.ONE_MINUS_SRC_COLOR); - break; - - case MultiplyBlending: - gl.blendFunc(gl.ZERO, gl.SRC_COLOR); - break; - - default: - console.error('THREE.WebGLState: Invalid blending: ', blending); - break; - } - } - - currentBlendSrc = null; - currentBlendDst = null; - currentBlendSrcAlpha = null; - currentBlendDstAlpha = null; - currentBlending = blending; - currentPremultipledAlpha = premultipliedAlpha; - } - - return; - } // custom blending - - - blendEquationAlpha = blendEquationAlpha || blendEquation; - blendSrcAlpha = blendSrcAlpha || blendSrc; - blendDstAlpha = blendDstAlpha || blendDst; - - if (blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha) { - gl.blendEquationSeparate(equationToGL[blendEquation], equationToGL[blendEquationAlpha]); - currentBlendEquation = blendEquation; - currentBlendEquationAlpha = blendEquationAlpha; - } - - if (blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha) { - gl.blendFuncSeparate(factorToGL[blendSrc], factorToGL[blendDst], factorToGL[blendSrcAlpha], factorToGL[blendDstAlpha]); - currentBlendSrc = blendSrc; - currentBlendDst = blendDst; - currentBlendSrcAlpha = blendSrcAlpha; - currentBlendDstAlpha = blendDstAlpha; - } - - currentBlending = blending; - currentPremultipledAlpha = null; - } - - function setMaterial(material, frontFaceCW) { - material.side === DoubleSide ? disable(gl.CULL_FACE) : enable(gl.CULL_FACE); - let flipSided = material.side === BackSide; - if (frontFaceCW) flipSided = !flipSided; - setFlipSided(flipSided); - material.blending === NormalBlending && material.transparent === false ? setBlending(NoBlending) : setBlending(material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha); - depthBuffer.setFunc(material.depthFunc); - depthBuffer.setTest(material.depthTest); - depthBuffer.setMask(material.depthWrite); - colorBuffer.setMask(material.colorWrite); - const stencilWrite = material.stencilWrite; - stencilBuffer.setTest(stencilWrite); - - if (stencilWrite) { - stencilBuffer.setMask(material.stencilWriteMask); - stencilBuffer.setFunc(material.stencilFunc, material.stencilRef, material.stencilFuncMask); - stencilBuffer.setOp(material.stencilFail, material.stencilZFail, material.stencilZPass); - } - - setPolygonOffset(material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits); - material.alphaToCoverage === true ? enable(gl.SAMPLE_ALPHA_TO_COVERAGE) : disable(gl.SAMPLE_ALPHA_TO_COVERAGE); - } // - - - function setFlipSided(flipSided) { - if (currentFlipSided !== flipSided) { - if (flipSided) { - gl.frontFace(gl.CW); - } else { - gl.frontFace(gl.CCW); - } - - currentFlipSided = flipSided; - } - } - - function setCullFace(cullFace) { - if (cullFace !== CullFaceNone) { - enable(gl.CULL_FACE); - - if (cullFace !== currentCullFace) { - if (cullFace === CullFaceBack) { - gl.cullFace(gl.BACK); - } else if (cullFace === CullFaceFront) { - gl.cullFace(gl.FRONT); - } else { - gl.cullFace(gl.FRONT_AND_BACK); - } - } - } else { - disable(gl.CULL_FACE); - } - - currentCullFace = cullFace; - } - - function setLineWidth(width) { - if (width !== currentLineWidth) { - if (lineWidthAvailable) gl.lineWidth(width); - currentLineWidth = width; - } - } - - function setPolygonOffset(polygonOffset, factor, units) { - if (polygonOffset) { - enable(gl.POLYGON_OFFSET_FILL); - - if (currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units) { - gl.polygonOffset(factor, units); - currentPolygonOffsetFactor = factor; - currentPolygonOffsetUnits = units; - } - } else { - disable(gl.POLYGON_OFFSET_FILL); - } - } - - function setScissorTest(scissorTest) { - if (scissorTest) { - enable(gl.SCISSOR_TEST); - } else { - disable(gl.SCISSOR_TEST); - } - } // texture - - - function activeTexture(webglSlot) { - if (webglSlot === undefined) webglSlot = gl.TEXTURE0 + maxTextures - 1; - - if (currentTextureSlot !== webglSlot) { - gl.activeTexture(webglSlot); - currentTextureSlot = webglSlot; - } - } - - function bindTexture(webglType, webglTexture) { - if (currentTextureSlot === null) { - activeTexture(); - } - - let boundTexture = currentBoundTextures[currentTextureSlot]; - - if (boundTexture === undefined) { - boundTexture = { - type: undefined, - texture: undefined - }; - currentBoundTextures[currentTextureSlot] = boundTexture; - } - - if (boundTexture.type !== webglType || boundTexture.texture !== webglTexture) { - gl.bindTexture(webglType, webglTexture || emptyTextures[webglType]); - boundTexture.type = webglType; - boundTexture.texture = webglTexture; - } - } - - function unbindTexture() { - const boundTexture = currentBoundTextures[currentTextureSlot]; - - if (boundTexture !== undefined && boundTexture.type !== undefined) { - gl.bindTexture(boundTexture.type, null); - boundTexture.type = undefined; - boundTexture.texture = undefined; - } - } - - function compressedTexImage2D() { - try { - gl.compressedTexImage2D.apply(gl, arguments); - } catch (error) { - console.error('THREE.WebGLState:', error); - } - } - - function texImage2D() { - try { - gl.texImage2D.apply(gl, arguments); - } catch (error) { - console.error('THREE.WebGLState:', error); - } - } - - function texImage3D() { - try { - gl.texImage3D.apply(gl, arguments); - } catch (error) { - console.error('THREE.WebGLState:', error); - } - } // - - - function scissor(scissor) { - if (currentScissor.equals(scissor) === false) { - gl.scissor(scissor.x, scissor.y, scissor.z, scissor.w); - currentScissor.copy(scissor); - } - } - - function viewport(viewport) { - if (currentViewport.equals(viewport) === false) { - gl.viewport(viewport.x, viewport.y, viewport.z, viewport.w); - currentViewport.copy(viewport); - } - } // - - - function reset() { - // reset state - gl.disable(gl.BLEND); - gl.disable(gl.CULL_FACE); - gl.disable(gl.DEPTH_TEST); - gl.disable(gl.POLYGON_OFFSET_FILL); - gl.disable(gl.SCISSOR_TEST); - gl.disable(gl.STENCIL_TEST); - gl.disable(gl.SAMPLE_ALPHA_TO_COVERAGE); - gl.blendEquation(gl.FUNC_ADD); - gl.blendFunc(gl.ONE, gl.ZERO); - gl.blendFuncSeparate(gl.ONE, gl.ZERO, gl.ONE, gl.ZERO); - gl.colorMask(true, true, true, true); - gl.clearColor(0, 0, 0, 0); - gl.depthMask(true); - gl.depthFunc(gl.LESS); - gl.clearDepth(1); - gl.stencilMask(0xffffffff); - gl.stencilFunc(gl.ALWAYS, 0, 0xffffffff); - gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP); - gl.clearStencil(0); - gl.cullFace(gl.BACK); - gl.frontFace(gl.CCW); - gl.polygonOffset(0, 0); - gl.activeTexture(gl.TEXTURE0); - gl.bindFramebuffer(gl.FRAMEBUFFER, null); - - if (isWebGL2 === true) { - gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, null); - gl.bindFramebuffer(gl.READ_FRAMEBUFFER, null); - } - - gl.useProgram(null); - gl.lineWidth(1); - gl.scissor(0, 0, gl.canvas.width, gl.canvas.height); - gl.viewport(0, 0, gl.canvas.width, gl.canvas.height); // reset internals - - enabledCapabilities = {}; - currentTextureSlot = null; - currentBoundTextures = {}; - xrFramebuffer = null; - currentBoundFramebuffers = {}; - currentProgram = null; - currentBlendingEnabled = false; - currentBlending = null; - currentBlendEquation = null; - currentBlendSrc = null; - currentBlendDst = null; - currentBlendEquationAlpha = null; - currentBlendSrcAlpha = null; - currentBlendDstAlpha = null; - currentPremultipledAlpha = false; - currentFlipSided = null; - currentCullFace = null; - currentLineWidth = null; - currentPolygonOffsetFactor = null; - currentPolygonOffsetUnits = null; - currentScissor.set(0, 0, gl.canvas.width, gl.canvas.height); - currentViewport.set(0, 0, gl.canvas.width, gl.canvas.height); - colorBuffer.reset(); - depthBuffer.reset(); - stencilBuffer.reset(); - } - - return { - buffers: { - color: colorBuffer, - depth: depthBuffer, - stencil: stencilBuffer - }, - enable: enable, - disable: disable, - bindFramebuffer: bindFramebuffer, - bindXRFramebuffer: bindXRFramebuffer, - useProgram: useProgram, - setBlending: setBlending, - setMaterial: setMaterial, - setFlipSided: setFlipSided, - setCullFace: setCullFace, - setLineWidth: setLineWidth, - setPolygonOffset: setPolygonOffset, - setScissorTest: setScissorTest, - activeTexture: activeTexture, - bindTexture: bindTexture, - unbindTexture: unbindTexture, - compressedTexImage2D: compressedTexImage2D, - texImage2D: texImage2D, - texImage3D: texImage3D, - scissor: scissor, - viewport: viewport, - reset: reset - }; - } - - function WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info) { - const isWebGL2 = capabilities.isWebGL2; - const maxTextures = capabilities.maxTextures; - const maxCubemapSize = capabilities.maxCubemapSize; - const maxTextureSize = capabilities.maxTextureSize; - const maxSamples = capabilities.maxSamples; - - const _videoTextures = new WeakMap(); - - let _canvas; // cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas, - // also OffscreenCanvas.getContext("webgl"), but not OffscreenCanvas.getContext("2d")! - // Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d). - - - let useOffscreenCanvas = false; - - try { - useOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' && new OffscreenCanvas(1, 1).getContext('2d') !== null; - } catch (err) {// Ignore any errors - } - - function createCanvas(width, height) { - // Use OffscreenCanvas when available. Specially needed in web workers - return useOffscreenCanvas ? new OffscreenCanvas(width, height) : document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); - } - - function resizeImage(image, needsPowerOfTwo, needsNewCanvas, maxSize) { - let scale = 1; // handle case if texture exceeds max size - - if (image.width > maxSize || image.height > maxSize) { - scale = maxSize / Math.max(image.width, image.height); - } // only perform resize if necessary - - - if (scale < 1 || needsPowerOfTwo === true) { - // only perform resize for certain image types - if (typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement || typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap) { - const floor = needsPowerOfTwo ? floorPowerOfTwo : Math.floor; - const width = floor(scale * image.width); - const height = floor(scale * image.height); - if (_canvas === undefined) _canvas = createCanvas(width, height); // cube textures can't reuse the same canvas - - const canvas = needsNewCanvas ? createCanvas(width, height) : _canvas; - canvas.width = width; - canvas.height = height; - const context = canvas.getContext('2d'); - context.drawImage(image, 0, 0, width, height); - console.warn('THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').'); - return canvas; - } else { - if ('data' in image) { - console.warn('THREE.WebGLRenderer: Image in DataTexture is too big (' + image.width + 'x' + image.height + ').'); - } - - return image; - } - } - - return image; - } - - function isPowerOfTwo$1(image) { - return isPowerOfTwo(image.width) && isPowerOfTwo(image.height); - } - - function textureNeedsPowerOfTwo(texture) { - if (isWebGL2) return false; - return texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping || texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter; - } - - function textureNeedsGenerateMipmaps(texture, supportsMips) { - return texture.generateMipmaps && supportsMips && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter; - } - - function generateMipmap(target, texture, width, height, depth = 1) { - _gl.generateMipmap(target); - - const textureProperties = properties.get(texture); - textureProperties.__maxMipLevel = Math.log2(Math.max(width, height, depth)); - } - - function getInternalFormat(internalFormatName, glFormat, glType) { - if (isWebGL2 === false) return glFormat; - - if (internalFormatName !== null) { - if (_gl[internalFormatName] !== undefined) return _gl[internalFormatName]; - console.warn('THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \'' + internalFormatName + '\''); - } - - let internalFormat = glFormat; - - if (glFormat === _gl.RED) { - if (glType === _gl.FLOAT) internalFormat = _gl.R32F; - if (glType === _gl.HALF_FLOAT) internalFormat = _gl.R16F; - if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.R8; - } - - if (glFormat === _gl.RGB) { - if (glType === _gl.FLOAT) internalFormat = _gl.RGB32F; - if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RGB16F; - if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.RGB8; - } - - if (glFormat === _gl.RGBA) { - if (glType === _gl.FLOAT) internalFormat = _gl.RGBA32F; - if (glType === _gl.HALF_FLOAT) internalFormat = _gl.RGBA16F; - if (glType === _gl.UNSIGNED_BYTE) internalFormat = _gl.RGBA8; - } - - if (internalFormat === _gl.R16F || internalFormat === _gl.R32F || internalFormat === _gl.RGBA16F || internalFormat === _gl.RGBA32F) { - extensions.get('EXT_color_buffer_float'); - } - - return internalFormat; - } // Fallback filters for non-power-of-2 textures - - - function filterFallback(f) { - if (f === NearestFilter || f === NearestMipmapNearestFilter || f === NearestMipmapLinearFilter) { - return _gl.NEAREST; - } - - return _gl.LINEAR; - } // - - - function onTextureDispose(event) { - const texture = event.target; - texture.removeEventListener('dispose', onTextureDispose); - deallocateTexture(texture); - - if (texture.isVideoTexture) { - _videoTextures.delete(texture); - } - - info.memory.textures--; - } - - function onRenderTargetDispose(event) { - const renderTarget = event.target; - renderTarget.removeEventListener('dispose', onRenderTargetDispose); - deallocateRenderTarget(renderTarget); - } // - - - function deallocateTexture(texture) { - const textureProperties = properties.get(texture); - if (textureProperties.__webglInit === undefined) return; - - _gl.deleteTexture(textureProperties.__webglTexture); - - properties.remove(texture); - } - - function deallocateRenderTarget(renderTarget) { - const texture = renderTarget.texture; - const renderTargetProperties = properties.get(renderTarget); - const textureProperties = properties.get(texture); - if (!renderTarget) return; - - if (textureProperties.__webglTexture !== undefined) { - _gl.deleteTexture(textureProperties.__webglTexture); - - info.memory.textures--; - } - - if (renderTarget.depthTexture) { - renderTarget.depthTexture.dispose(); - } - - if (renderTarget.isWebGLCubeRenderTarget) { - for (let i = 0; i < 6; i++) { - _gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i]); - - if (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer[i]); - } - } else { - _gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer); - - if (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer); - if (renderTargetProperties.__webglMultisampledFramebuffer) _gl.deleteFramebuffer(renderTargetProperties.__webglMultisampledFramebuffer); - if (renderTargetProperties.__webglColorRenderbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglColorRenderbuffer); - if (renderTargetProperties.__webglDepthRenderbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthRenderbuffer); - } - - if (renderTarget.isWebGLMultipleRenderTargets) { - for (let i = 0, il = texture.length; i < il; i++) { - const attachmentProperties = properties.get(texture[i]); - - if (attachmentProperties.__webglTexture) { - _gl.deleteTexture(attachmentProperties.__webglTexture); - - info.memory.textures--; - } - - properties.remove(texture[i]); - } - } - - properties.remove(texture); - properties.remove(renderTarget); - } // - - - let textureUnits = 0; - - function resetTextureUnits() { - textureUnits = 0; - } - - function allocateTextureUnit() { - const textureUnit = textureUnits; - - if (textureUnit >= maxTextures) { - console.warn('THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + maxTextures); - } - - textureUnits += 1; - return textureUnit; - } // - - - function setTexture2D(texture, slot) { - const textureProperties = properties.get(texture); - if (texture.isVideoTexture) updateVideoTexture(texture); - - if (texture.version > 0 && textureProperties.__version !== texture.version) { - const image = texture.image; - - if (image === undefined) { - console.warn('THREE.WebGLRenderer: Texture marked for update but image is undefined'); - } else if (image.complete === false) { - console.warn('THREE.WebGLRenderer: Texture marked for update but image is incomplete'); - } else { - uploadTexture(textureProperties, texture, slot); - return; - } - } - - state.activeTexture(_gl.TEXTURE0 + slot); - state.bindTexture(_gl.TEXTURE_2D, textureProperties.__webglTexture); - } - - function setTexture2DArray(texture, slot) { - const textureProperties = properties.get(texture); - - if (texture.version > 0 && textureProperties.__version !== texture.version) { - uploadTexture(textureProperties, texture, slot); - return; - } - - state.activeTexture(_gl.TEXTURE0 + slot); - state.bindTexture(_gl.TEXTURE_2D_ARRAY, textureProperties.__webglTexture); - } - - function setTexture3D(texture, slot) { - const textureProperties = properties.get(texture); - - if (texture.version > 0 && textureProperties.__version !== texture.version) { - uploadTexture(textureProperties, texture, slot); - return; - } - - state.activeTexture(_gl.TEXTURE0 + slot); - state.bindTexture(_gl.TEXTURE_3D, textureProperties.__webglTexture); - } - - function setTextureCube(texture, slot) { - const textureProperties = properties.get(texture); - - if (texture.version > 0 && textureProperties.__version !== texture.version) { - uploadCubeTexture(textureProperties, texture, slot); - return; - } - - state.activeTexture(_gl.TEXTURE0 + slot); - state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture); - } - - const wrappingToGL = { - [RepeatWrapping]: _gl.REPEAT, - [ClampToEdgeWrapping]: _gl.CLAMP_TO_EDGE, - [MirroredRepeatWrapping]: _gl.MIRRORED_REPEAT - }; - const filterToGL = { - [NearestFilter]: _gl.NEAREST, - [NearestMipmapNearestFilter]: _gl.NEAREST_MIPMAP_NEAREST, - [NearestMipmapLinearFilter]: _gl.NEAREST_MIPMAP_LINEAR, - [LinearFilter]: _gl.LINEAR, - [LinearMipmapNearestFilter]: _gl.LINEAR_MIPMAP_NEAREST, - [LinearMipmapLinearFilter]: _gl.LINEAR_MIPMAP_LINEAR - }; - - function setTextureParameters(textureType, texture, supportsMips) { - if (supportsMips) { - _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, wrappingToGL[texture.wrapS]); - - _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, wrappingToGL[texture.wrapT]); - - if (textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY) { - _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_R, wrappingToGL[texture.wrapR]); - } - - _gl.texParameteri(textureType, _gl.TEXTURE_MAG_FILTER, filterToGL[texture.magFilter]); - - _gl.texParameteri(textureType, _gl.TEXTURE_MIN_FILTER, filterToGL[texture.minFilter]); - } else { - _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE); - - _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE); - - if (textureType === _gl.TEXTURE_3D || textureType === _gl.TEXTURE_2D_ARRAY) { - _gl.texParameteri(textureType, _gl.TEXTURE_WRAP_R, _gl.CLAMP_TO_EDGE); - } - - if (texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping) { - console.warn('THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.'); - } - - _gl.texParameteri(textureType, _gl.TEXTURE_MAG_FILTER, filterFallback(texture.magFilter)); - - _gl.texParameteri(textureType, _gl.TEXTURE_MIN_FILTER, filterFallback(texture.minFilter)); - - if (texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter) { - console.warn('THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.'); - } - } - - if (extensions.has('EXT_texture_filter_anisotropic') === true) { - const extension = extensions.get('EXT_texture_filter_anisotropic'); - if (texture.type === FloatType && extensions.has('OES_texture_float_linear') === false) return; // verify extension for WebGL 1 and WebGL 2 - - if (isWebGL2 === false && texture.type === HalfFloatType && extensions.has('OES_texture_half_float_linear') === false) return; // verify extension for WebGL 1 only - - if (texture.anisotropy > 1 || properties.get(texture).__currentAnisotropy) { - _gl.texParameterf(textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(texture.anisotropy, capabilities.getMaxAnisotropy())); - - properties.get(texture).__currentAnisotropy = texture.anisotropy; - } - } - } - - function initTexture(textureProperties, texture) { - if (textureProperties.__webglInit === undefined) { - textureProperties.__webglInit = true; - texture.addEventListener('dispose', onTextureDispose); - textureProperties.__webglTexture = _gl.createTexture(); - info.memory.textures++; - } - } - - function uploadTexture(textureProperties, texture, slot) { - let textureType = _gl.TEXTURE_2D; - if (texture.isDataTexture2DArray) textureType = _gl.TEXTURE_2D_ARRAY; - if (texture.isDataTexture3D) textureType = _gl.TEXTURE_3D; - initTexture(textureProperties, texture); - state.activeTexture(_gl.TEXTURE0 + slot); - state.bindTexture(textureType, textureProperties.__webglTexture); - - _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, texture.flipY); - - _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha); - - _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.unpackAlignment); - - _gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE); - - const needsPowerOfTwo = textureNeedsPowerOfTwo(texture) && isPowerOfTwo$1(texture.image) === false; - const image = resizeImage(texture.image, needsPowerOfTwo, false, maxTextureSize); - const supportsMips = isPowerOfTwo$1(image) || isWebGL2, - glFormat = utils.convert(texture.format); - let glType = utils.convert(texture.type), - glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType); - setTextureParameters(textureType, texture, supportsMips); - let mipmap; - const mipmaps = texture.mipmaps; - - if (texture.isDepthTexture) { - // populate depth texture with dummy data - glInternalFormat = _gl.DEPTH_COMPONENT; - - if (isWebGL2) { - if (texture.type === FloatType) { - glInternalFormat = _gl.DEPTH_COMPONENT32F; - } else if (texture.type === UnsignedIntType) { - glInternalFormat = _gl.DEPTH_COMPONENT24; - } else if (texture.type === UnsignedInt248Type) { - glInternalFormat = _gl.DEPTH24_STENCIL8; - } else { - glInternalFormat = _gl.DEPTH_COMPONENT16; // WebGL2 requires sized internalformat for glTexImage2D - } - } else { - if (texture.type === FloatType) { - console.error('WebGLRenderer: Floating point depth texture requires WebGL2.'); - } - } // validation checks for WebGL 1 - - - if (texture.format === DepthFormat && glInternalFormat === _gl.DEPTH_COMPONENT) { - // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are - // DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT - // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/) - if (texture.type !== UnsignedShortType && texture.type !== UnsignedIntType) { - console.warn('THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.'); - texture.type = UnsignedShortType; - glType = utils.convert(texture.type); - } - } - - if (texture.format === DepthStencilFormat && glInternalFormat === _gl.DEPTH_COMPONENT) { - // Depth stencil textures need the DEPTH_STENCIL internal format - // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/) - glInternalFormat = _gl.DEPTH_STENCIL; // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are - // DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL. - // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/) - - if (texture.type !== UnsignedInt248Type) { - console.warn('THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.'); - texture.type = UnsignedInt248Type; - glType = utils.convert(texture.type); - } - } // - - - state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null); - } else if (texture.isDataTexture) { - // use manually created mipmaps if available - // if there are no manual mipmaps - // set 0 level mipmap and then use GL to generate other mipmap levels - if (mipmaps.length > 0 && supportsMips) { - for (let i = 0, il = mipmaps.length; i < il; i++) { - mipmap = mipmaps[i]; - state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data); - } - - texture.generateMipmaps = false; - textureProperties.__maxMipLevel = mipmaps.length - 1; - } else { - state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data); - textureProperties.__maxMipLevel = 0; - } - } else if (texture.isCompressedTexture) { - for (let i = 0, il = mipmaps.length; i < il; i++) { - mipmap = mipmaps[i]; - - if (texture.format !== RGBAFormat && texture.format !== RGBFormat) { - if (glFormat !== null) { - state.compressedTexImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data); - } else { - console.warn('THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()'); - } - } else { - state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data); - } - } - - textureProperties.__maxMipLevel = mipmaps.length - 1; - } else if (texture.isDataTexture2DArray) { - state.texImage3D(_gl.TEXTURE_2D_ARRAY, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data); - textureProperties.__maxMipLevel = 0; - } else if (texture.isDataTexture3D) { - state.texImage3D(_gl.TEXTURE_3D, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data); - textureProperties.__maxMipLevel = 0; - } else { - // regular Texture (image, video, canvas) - // use manually created mipmaps if available - // if there are no manual mipmaps - // set 0 level mipmap and then use GL to generate other mipmap levels - if (mipmaps.length > 0 && supportsMips) { - for (let i = 0, il = mipmaps.length; i < il; i++) { - mipmap = mipmaps[i]; - state.texImage2D(_gl.TEXTURE_2D, i, glInternalFormat, glFormat, glType, mipmap); - } - - texture.generateMipmaps = false; - textureProperties.__maxMipLevel = mipmaps.length - 1; - } else { - state.texImage2D(_gl.TEXTURE_2D, 0, glInternalFormat, glFormat, glType, image); - textureProperties.__maxMipLevel = 0; - } - } - - if (textureNeedsGenerateMipmaps(texture, supportsMips)) { - generateMipmap(textureType, texture, image.width, image.height); - } - - textureProperties.__version = texture.version; - if (texture.onUpdate) texture.onUpdate(texture); - } - - function uploadCubeTexture(textureProperties, texture, slot) { - if (texture.image.length !== 6) return; - initTexture(textureProperties, texture); - state.activeTexture(_gl.TEXTURE0 + slot); - state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture); - - _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, texture.flipY); - - _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, texture.premultiplyAlpha); - - _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, texture.unpackAlignment); - - _gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE); - - const isCompressed = texture && (texture.isCompressedTexture || texture.image[0].isCompressedTexture); - const isDataTexture = texture.image[0] && texture.image[0].isDataTexture; - const cubeImage = []; - - for (let i = 0; i < 6; i++) { - if (!isCompressed && !isDataTexture) { - cubeImage[i] = resizeImage(texture.image[i], false, true, maxCubemapSize); - } else { - cubeImage[i] = isDataTexture ? texture.image[i].image : texture.image[i]; - } - } - - const image = cubeImage[0], - supportsMips = isPowerOfTwo$1(image) || isWebGL2, - glFormat = utils.convert(texture.format), - glType = utils.convert(texture.type), - glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType); - setTextureParameters(_gl.TEXTURE_CUBE_MAP, texture, supportsMips); - let mipmaps; - - if (isCompressed) { - for (let i = 0; i < 6; i++) { - mipmaps = cubeImage[i].mipmaps; - - for (let j = 0; j < mipmaps.length; j++) { - const mipmap = mipmaps[j]; - - if (texture.format !== RGBAFormat && texture.format !== RGBFormat) { - if (glFormat !== null) { - state.compressedTexImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data); - } else { - console.warn('THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()'); - } - } else { - state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data); - } - } - } - - textureProperties.__maxMipLevel = mipmaps.length - 1; - } else { - mipmaps = texture.mipmaps; - - for (let i = 0; i < 6; i++) { - if (isDataTexture) { - state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, cubeImage[i].width, cubeImage[i].height, 0, glFormat, glType, cubeImage[i].data); - - for (let j = 0; j < mipmaps.length; j++) { - const mipmap = mipmaps[j]; - const mipmapImage = mipmap.image[i].image; - state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data); - } - } else { - state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, glInternalFormat, glFormat, glType, cubeImage[i]); - - for (let j = 0; j < mipmaps.length; j++) { - const mipmap = mipmaps[j]; - state.texImage2D(_gl.TEXTURE_CUBE_MAP_POSITIVE_X + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[i]); - } - } - } - - textureProperties.__maxMipLevel = mipmaps.length; - } - - if (textureNeedsGenerateMipmaps(texture, supportsMips)) { - // We assume images for cube map have the same size. - generateMipmap(_gl.TEXTURE_CUBE_MAP, texture, image.width, image.height); - } - - textureProperties.__version = texture.version; - if (texture.onUpdate) texture.onUpdate(texture); - } // Render targets - // Setup storage for target texture and bind it to correct framebuffer - - - function setupFrameBufferTexture(framebuffer, renderTarget, texture, attachment, textureTarget) { - const glFormat = utils.convert(texture.format); - const glType = utils.convert(texture.type); - const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType); - - if (textureTarget === _gl.TEXTURE_3D || textureTarget === _gl.TEXTURE_2D_ARRAY) { - state.texImage3D(textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, renderTarget.depth, 0, glFormat, glType, null); - } else { - state.texImage2D(textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null); - } - - state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer); - - _gl.framebufferTexture2D(_gl.FRAMEBUFFER, attachment, textureTarget, properties.get(texture).__webglTexture, 0); - - state.bindFramebuffer(_gl.FRAMEBUFFER, null); - } // Setup storage for internal depth/stencil buffers and bind to correct framebuffer - - - function setupRenderBufferStorage(renderbuffer, renderTarget, isMultisample) { - _gl.bindRenderbuffer(_gl.RENDERBUFFER, renderbuffer); - - if (renderTarget.depthBuffer && !renderTarget.stencilBuffer) { - let glInternalFormat = _gl.DEPTH_COMPONENT16; - - if (isMultisample) { - const depthTexture = renderTarget.depthTexture; - - if (depthTexture && depthTexture.isDepthTexture) { - if (depthTexture.type === FloatType) { - glInternalFormat = _gl.DEPTH_COMPONENT32F; - } else if (depthTexture.type === UnsignedIntType) { - glInternalFormat = _gl.DEPTH_COMPONENT24; - } - } - - const samples = getRenderTargetSamples(renderTarget); - - _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height); - } else { - _gl.renderbufferStorage(_gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height); - } - - _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer); - } else if (renderTarget.depthBuffer && renderTarget.stencilBuffer) { - if (isMultisample) { - const samples = getRenderTargetSamples(renderTarget); - - _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, _gl.DEPTH24_STENCIL8, renderTarget.width, renderTarget.height); - } else { - _gl.renderbufferStorage(_gl.RENDERBUFFER, _gl.DEPTH_STENCIL, renderTarget.width, renderTarget.height); - } - - _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer); - } else { - // Use the first texture for MRT so far - const texture = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture[0] : renderTarget.texture; - const glFormat = utils.convert(texture.format); - const glType = utils.convert(texture.type); - const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType); - - if (isMultisample) { - const samples = getRenderTargetSamples(renderTarget); - - _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height); - } else { - _gl.renderbufferStorage(_gl.RENDERBUFFER, glInternalFormat, renderTarget.width, renderTarget.height); - } - } - - _gl.bindRenderbuffer(_gl.RENDERBUFFER, null); - } // Setup resources for a Depth Texture for a FBO (needs an extension) - - - function setupDepthTexture(framebuffer, renderTarget) { - const isCube = renderTarget && renderTarget.isWebGLCubeRenderTarget; - if (isCube) throw new Error('Depth Texture with cube render targets is not supported'); - state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer); - - if (!(renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture)) { - throw new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture'); - } // upload an empty depth texture with framebuffer size - - - if (!properties.get(renderTarget.depthTexture).__webglTexture || renderTarget.depthTexture.image.width !== renderTarget.width || renderTarget.depthTexture.image.height !== renderTarget.height) { - renderTarget.depthTexture.image.width = renderTarget.width; - renderTarget.depthTexture.image.height = renderTarget.height; - renderTarget.depthTexture.needsUpdate = true; - } - - setTexture2D(renderTarget.depthTexture, 0); - - const webglDepthTexture = properties.get(renderTarget.depthTexture).__webglTexture; - - if (renderTarget.depthTexture.format === DepthFormat) { - _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0); - } else if (renderTarget.depthTexture.format === DepthStencilFormat) { - _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.TEXTURE_2D, webglDepthTexture, 0); - } else { - throw new Error('Unknown depthTexture format'); - } - } // Setup GL resources for a non-texture depth buffer - - - function setupDepthRenderbuffer(renderTarget) { - const renderTargetProperties = properties.get(renderTarget); - const isCube = renderTarget.isWebGLCubeRenderTarget === true; - - if (renderTarget.depthTexture) { - if (isCube) throw new Error('target.depthTexture not supported in Cube render targets'); - setupDepthTexture(renderTargetProperties.__webglFramebuffer, renderTarget); - } else { - if (isCube) { - renderTargetProperties.__webglDepthbuffer = []; - - for (let i = 0; i < 6; i++) { - state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer[i]); - renderTargetProperties.__webglDepthbuffer[i] = _gl.createRenderbuffer(); - setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i], renderTarget, false); - } - } else { - state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglFramebuffer); - renderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer(); - setupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer, renderTarget, false); - } - } - - state.bindFramebuffer(_gl.FRAMEBUFFER, null); - } // Set up GL resources for the render target - - - function setupRenderTarget(renderTarget) { - const texture = renderTarget.texture; - const renderTargetProperties = properties.get(renderTarget); - const textureProperties = properties.get(texture); - renderTarget.addEventListener('dispose', onRenderTargetDispose); - - if (renderTarget.isWebGLMultipleRenderTargets !== true) { - textureProperties.__webglTexture = _gl.createTexture(); - textureProperties.__version = texture.version; - info.memory.textures++; - } - - const isCube = renderTarget.isWebGLCubeRenderTarget === true; - const isMultipleRenderTargets = renderTarget.isWebGLMultipleRenderTargets === true; - const isMultisample = renderTarget.isWebGLMultisampleRenderTarget === true; - const isRenderTarget3D = texture.isDataTexture3D || texture.isDataTexture2DArray; - const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2; // Handles WebGL2 RGBFormat fallback - #18858 - - if (isWebGL2 && texture.format === RGBFormat && (texture.type === FloatType || texture.type === HalfFloatType)) { - texture.format = RGBAFormat; - console.warn('THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.'); - } // Setup framebuffer - - - if (isCube) { - renderTargetProperties.__webglFramebuffer = []; - - for (let i = 0; i < 6; i++) { - renderTargetProperties.__webglFramebuffer[i] = _gl.createFramebuffer(); - } - } else { - renderTargetProperties.__webglFramebuffer = _gl.createFramebuffer(); - - if (isMultipleRenderTargets) { - if (capabilities.drawBuffers) { - const textures = renderTarget.texture; - - for (let i = 0, il = textures.length; i < il; i++) { - const attachmentProperties = properties.get(textures[i]); - - if (attachmentProperties.__webglTexture === undefined) { - attachmentProperties.__webglTexture = _gl.createTexture(); - info.memory.textures++; - } - } - } else { - console.warn('THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.'); - } - } else if (isMultisample) { - if (isWebGL2) { - renderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer(); - renderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer(); - - _gl.bindRenderbuffer(_gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer); - - const glFormat = utils.convert(texture.format); - const glType = utils.convert(texture.type); - const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType); - const samples = getRenderTargetSamples(renderTarget); - - _gl.renderbufferStorageMultisample(_gl.RENDERBUFFER, samples, glInternalFormat, renderTarget.width, renderTarget.height); - - state.bindFramebuffer(_gl.FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer); - - _gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.RENDERBUFFER, renderTargetProperties.__webglColorRenderbuffer); - - _gl.bindRenderbuffer(_gl.RENDERBUFFER, null); - - if (renderTarget.depthBuffer) { - renderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer(); - setupRenderBufferStorage(renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true); - } - - state.bindFramebuffer(_gl.FRAMEBUFFER, null); - } else { - console.warn('THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.'); - } - } - } // Setup color buffer - - - if (isCube) { - state.bindTexture(_gl.TEXTURE_CUBE_MAP, textureProperties.__webglTexture); - setTextureParameters(_gl.TEXTURE_CUBE_MAP, texture, supportsMips); - - for (let i = 0; i < 6; i++) { - setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[i], renderTarget, texture, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + i); - } - - if (textureNeedsGenerateMipmaps(texture, supportsMips)) { - generateMipmap(_gl.TEXTURE_CUBE_MAP, texture, renderTarget.width, renderTarget.height); - } - - state.bindTexture(_gl.TEXTURE_CUBE_MAP, null); - } else if (isMultipleRenderTargets) { - const textures = renderTarget.texture; - - for (let i = 0, il = textures.length; i < il; i++) { - const attachment = textures[i]; - const attachmentProperties = properties.get(attachment); - state.bindTexture(_gl.TEXTURE_2D, attachmentProperties.__webglTexture); - setTextureParameters(_gl.TEXTURE_2D, attachment, supportsMips); - setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, attachment, _gl.COLOR_ATTACHMENT0 + i, _gl.TEXTURE_2D); - - if (textureNeedsGenerateMipmaps(attachment, supportsMips)) { - generateMipmap(_gl.TEXTURE_2D, attachment, renderTarget.width, renderTarget.height); - } - } - - state.bindTexture(_gl.TEXTURE_2D, null); - } else { - let glTextureType = _gl.TEXTURE_2D; - - if (isRenderTarget3D) { - // Render targets containing layers, i.e: Texture 3D and 2d arrays - if (isWebGL2) { - const isTexture3D = texture.isDataTexture3D; - glTextureType = isTexture3D ? _gl.TEXTURE_3D : _gl.TEXTURE_2D_ARRAY; - } else { - console.warn('THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.'); - } - } - - state.bindTexture(glTextureType, textureProperties.__webglTexture); - setTextureParameters(glTextureType, texture, supportsMips); - setupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, texture, _gl.COLOR_ATTACHMENT0, glTextureType); - - if (textureNeedsGenerateMipmaps(texture, supportsMips)) { - generateMipmap(glTextureType, texture, renderTarget.width, renderTarget.height, renderTarget.depth); - } - - state.bindTexture(glTextureType, null); - } // Setup depth and stencil buffers - - - if (renderTarget.depthBuffer) { - setupDepthRenderbuffer(renderTarget); - } - } - - function updateRenderTargetMipmap(renderTarget) { - const supportsMips = isPowerOfTwo$1(renderTarget) || isWebGL2; - const textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [renderTarget.texture]; - - for (let i = 0, il = textures.length; i < il; i++) { - const texture = textures[i]; - - if (textureNeedsGenerateMipmaps(texture, supportsMips)) { - const target = renderTarget.isWebGLCubeRenderTarget ? _gl.TEXTURE_CUBE_MAP : _gl.TEXTURE_2D; - - const webglTexture = properties.get(texture).__webglTexture; - - state.bindTexture(target, webglTexture); - generateMipmap(target, texture, renderTarget.width, renderTarget.height); - state.bindTexture(target, null); - } - } - } - - function updateMultisampleRenderTarget(renderTarget) { - if (renderTarget.isWebGLMultisampleRenderTarget) { - if (isWebGL2) { - const width = renderTarget.width; - const height = renderTarget.height; - let mask = _gl.COLOR_BUFFER_BIT; - if (renderTarget.depthBuffer) mask |= _gl.DEPTH_BUFFER_BIT; - if (renderTarget.stencilBuffer) mask |= _gl.STENCIL_BUFFER_BIT; - const renderTargetProperties = properties.get(renderTarget); - state.bindFramebuffer(_gl.READ_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer); - state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglFramebuffer); - - _gl.blitFramebuffer(0, 0, width, height, 0, 0, width, height, mask, _gl.NEAREST); - - state.bindFramebuffer(_gl.READ_FRAMEBUFFER, null); - state.bindFramebuffer(_gl.DRAW_FRAMEBUFFER, renderTargetProperties.__webglMultisampledFramebuffer); - } else { - console.warn('THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.'); - } - } - } - - function getRenderTargetSamples(renderTarget) { - return isWebGL2 && renderTarget.isWebGLMultisampleRenderTarget ? Math.min(maxSamples, renderTarget.samples) : 0; - } - - function updateVideoTexture(texture) { - const frame = info.render.frame; // Check the last frame we updated the VideoTexture - - if (_videoTextures.get(texture) !== frame) { - _videoTextures.set(texture, frame); - - texture.update(); - } - } // backwards compatibility - - - let warnedTexture2D = false; - let warnedTextureCube = false; - - function safeSetTexture2D(texture, slot) { - if (texture && texture.isWebGLRenderTarget) { - if (warnedTexture2D === false) { - console.warn('THREE.WebGLTextures.safeSetTexture2D: don\'t use render targets as textures. Use their .texture property instead.'); - warnedTexture2D = true; - } - - texture = texture.texture; - } - - setTexture2D(texture, slot); - } - - function safeSetTextureCube(texture, slot) { - if (texture && texture.isWebGLCubeRenderTarget) { - if (warnedTextureCube === false) { - console.warn('THREE.WebGLTextures.safeSetTextureCube: don\'t use cube render targets as textures. Use their .texture property instead.'); - warnedTextureCube = true; - } - - texture = texture.texture; - } - - setTextureCube(texture, slot); - } // - - - this.allocateTextureUnit = allocateTextureUnit; - this.resetTextureUnits = resetTextureUnits; - this.setTexture2D = setTexture2D; - this.setTexture2DArray = setTexture2DArray; - this.setTexture3D = setTexture3D; - this.setTextureCube = setTextureCube; - this.setupRenderTarget = setupRenderTarget; - this.updateRenderTargetMipmap = updateRenderTargetMipmap; - this.updateMultisampleRenderTarget = updateMultisampleRenderTarget; - this.safeSetTexture2D = safeSetTexture2D; - this.safeSetTextureCube = safeSetTextureCube; - } - - function WebGLUtils(gl, extensions, capabilities) { - const isWebGL2 = capabilities.isWebGL2; - - function convert(p) { - let extension; - if (p === UnsignedByteType) return gl.UNSIGNED_BYTE; - if (p === UnsignedShort4444Type) return gl.UNSIGNED_SHORT_4_4_4_4; - if (p === UnsignedShort5551Type) return gl.UNSIGNED_SHORT_5_5_5_1; - if (p === UnsignedShort565Type) return gl.UNSIGNED_SHORT_5_6_5; - if (p === ByteType) return gl.BYTE; - if (p === ShortType) return gl.SHORT; - if (p === UnsignedShortType) return gl.UNSIGNED_SHORT; - if (p === IntType) return gl.INT; - if (p === UnsignedIntType) return gl.UNSIGNED_INT; - if (p === FloatType) return gl.FLOAT; - - if (p === HalfFloatType) { - if (isWebGL2) return gl.HALF_FLOAT; - extension = extensions.get('OES_texture_half_float'); - - if (extension !== null) { - return extension.HALF_FLOAT_OES; - } else { - return null; - } - } - - if (p === AlphaFormat) return gl.ALPHA; - if (p === RGBFormat) return gl.RGB; - if (p === RGBAFormat) return gl.RGBA; - if (p === LuminanceFormat) return gl.LUMINANCE; - if (p === LuminanceAlphaFormat) return gl.LUMINANCE_ALPHA; - if (p === DepthFormat) return gl.DEPTH_COMPONENT; - if (p === DepthStencilFormat) return gl.DEPTH_STENCIL; - if (p === RedFormat) return gl.RED; // WebGL2 formats. - - if (p === RedIntegerFormat) return gl.RED_INTEGER; - if (p === RGFormat) return gl.RG; - if (p === RGIntegerFormat) return gl.RG_INTEGER; - if (p === RGBIntegerFormat) return gl.RGB_INTEGER; - if (p === RGBAIntegerFormat) return gl.RGBA_INTEGER; - - if (p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format) { - extension = extensions.get('WEBGL_compressed_texture_s3tc'); - - if (extension !== null) { - if (p === RGB_S3TC_DXT1_Format) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT; - if (p === RGBA_S3TC_DXT1_Format) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT; - if (p === RGBA_S3TC_DXT3_Format) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT; - if (p === RGBA_S3TC_DXT5_Format) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT; - } else { - return null; - } - } - - if (p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format) { - extension = extensions.get('WEBGL_compressed_texture_pvrtc'); - - if (extension !== null) { - if (p === RGB_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; - if (p === RGB_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG; - if (p === RGBA_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; - if (p === RGBA_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; - } else { - return null; - } - } - - if (p === RGB_ETC1_Format) { - extension = extensions.get('WEBGL_compressed_texture_etc1'); - - if (extension !== null) { - return extension.COMPRESSED_RGB_ETC1_WEBGL; - } else { - return null; - } - } - - if (p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format) { - extension = extensions.get('WEBGL_compressed_texture_etc'); - - if (extension !== null) { - if (p === RGB_ETC2_Format) return extension.COMPRESSED_RGB8_ETC2; - if (p === RGBA_ETC2_EAC_Format) return extension.COMPRESSED_RGBA8_ETC2_EAC; - } - } - - if (p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format || p === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format || p === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format || p === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format || p === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format || p === SRGB8_ALPHA8_ASTC_4x4_Format || p === SRGB8_ALPHA8_ASTC_5x4_Format || p === SRGB8_ALPHA8_ASTC_5x5_Format || p === SRGB8_ALPHA8_ASTC_6x5_Format || p === SRGB8_ALPHA8_ASTC_6x6_Format || p === SRGB8_ALPHA8_ASTC_8x5_Format || p === SRGB8_ALPHA8_ASTC_8x6_Format || p === SRGB8_ALPHA8_ASTC_8x8_Format || p === SRGB8_ALPHA8_ASTC_10x5_Format || p === SRGB8_ALPHA8_ASTC_10x6_Format || p === SRGB8_ALPHA8_ASTC_10x8_Format || p === SRGB8_ALPHA8_ASTC_10x10_Format || p === SRGB8_ALPHA8_ASTC_12x10_Format || p === SRGB8_ALPHA8_ASTC_12x12_Format) { - extension = extensions.get('WEBGL_compressed_texture_astc'); - - if (extension !== null) { - // TODO Complete? - return p; - } else { - return null; - } - } - - if (p === RGBA_BPTC_Format) { - extension = extensions.get('EXT_texture_compression_bptc'); - - if (extension !== null) { - // TODO Complete? - return p; - } else { - return null; - } - } - - if (p === UnsignedInt248Type) { - if (isWebGL2) return gl.UNSIGNED_INT_24_8; - extension = extensions.get('WEBGL_depth_texture'); - - if (extension !== null) { - return extension.UNSIGNED_INT_24_8_WEBGL; - } else { - return null; - } - } - } - - return { - convert: convert - }; - } - - class ArrayCamera extends PerspectiveCamera { - constructor(array = []) { - super(); - this.cameras = array; - } - - } - - ArrayCamera.prototype.isArrayCamera = true; - - class Group extends Object3D { - constructor() { - super(); - this.type = 'Group'; - } - - } - - Group.prototype.isGroup = true; - - const _moveEvent = { - type: 'move' - }; - - class WebXRController { - constructor() { - this._targetRay = null; - this._grip = null; - this._hand = null; - } - - getHandSpace() { - if (this._hand === null) { - this._hand = new Group(); - this._hand.matrixAutoUpdate = false; - this._hand.visible = false; - this._hand.joints = {}; - this._hand.inputState = { - pinching: false - }; - } - - return this._hand; - } - - getTargetRaySpace() { - if (this._targetRay === null) { - this._targetRay = new Group(); - this._targetRay.matrixAutoUpdate = false; - this._targetRay.visible = false; - this._targetRay.hasLinearVelocity = false; - this._targetRay.linearVelocity = new Vector3(); - this._targetRay.hasAngularVelocity = false; - this._targetRay.angularVelocity = new Vector3(); - } - - return this._targetRay; - } - - getGripSpace() { - if (this._grip === null) { - this._grip = new Group(); - this._grip.matrixAutoUpdate = false; - this._grip.visible = false; - this._grip.hasLinearVelocity = false; - this._grip.linearVelocity = new Vector3(); - this._grip.hasAngularVelocity = false; - this._grip.angularVelocity = new Vector3(); - } - - return this._grip; - } - - dispatchEvent(event) { - if (this._targetRay !== null) { - this._targetRay.dispatchEvent(event); - } - - if (this._grip !== null) { - this._grip.dispatchEvent(event); - } - - if (this._hand !== null) { - this._hand.dispatchEvent(event); - } - - return this; - } - - disconnect(inputSource) { - this.dispatchEvent({ - type: 'disconnected', - data: inputSource - }); - - if (this._targetRay !== null) { - this._targetRay.visible = false; - } - - if (this._grip !== null) { - this._grip.visible = false; - } - - if (this._hand !== null) { - this._hand.visible = false; - } - - return this; - } - - update(inputSource, frame, referenceSpace) { - let inputPose = null; - let gripPose = null; - let handPose = null; - const targetRay = this._targetRay; - const grip = this._grip; - const hand = this._hand; - - if (inputSource && frame.session.visibilityState !== 'visible-blurred') { - if (targetRay !== null) { - inputPose = frame.getPose(inputSource.targetRaySpace, referenceSpace); - - if (inputPose !== null) { - targetRay.matrix.fromArray(inputPose.transform.matrix); - targetRay.matrix.decompose(targetRay.position, targetRay.rotation, targetRay.scale); - - if (inputPose.linearVelocity) { - targetRay.hasLinearVelocity = true; - targetRay.linearVelocity.copy(inputPose.linearVelocity); - } else { - targetRay.hasLinearVelocity = false; - } - - if (inputPose.angularVelocity) { - targetRay.hasAngularVelocity = true; - targetRay.angularVelocity.copy(inputPose.angularVelocity); - } else { - targetRay.hasAngularVelocity = false; - } - - this.dispatchEvent(_moveEvent); - } - } - - if (hand && inputSource.hand) { - handPose = true; - - for (const inputjoint of inputSource.hand.values()) { - // Update the joints groups with the XRJoint poses - const jointPose = frame.getJointPose(inputjoint, referenceSpace); - - if (hand.joints[inputjoint.jointName] === undefined) { - // The transform of this joint will be updated with the joint pose on each frame - const joint = new Group(); - joint.matrixAutoUpdate = false; - joint.visible = false; - hand.joints[inputjoint.jointName] = joint; // ?? - - hand.add(joint); - } - - const joint = hand.joints[inputjoint.jointName]; - - if (jointPose !== null) { - joint.matrix.fromArray(jointPose.transform.matrix); - joint.matrix.decompose(joint.position, joint.rotation, joint.scale); - joint.jointRadius = jointPose.radius; - } - - joint.visible = jointPose !== null; - } // Custom events - // Check pinchz - - - const indexTip = hand.joints['index-finger-tip']; - const thumbTip = hand.joints['thumb-tip']; - const distance = indexTip.position.distanceTo(thumbTip.position); - const distanceToPinch = 0.02; - const threshold = 0.005; - - if (hand.inputState.pinching && distance > distanceToPinch + threshold) { - hand.inputState.pinching = false; - this.dispatchEvent({ - type: 'pinchend', - handedness: inputSource.handedness, - target: this - }); - } else if (!hand.inputState.pinching && distance <= distanceToPinch - threshold) { - hand.inputState.pinching = true; - this.dispatchEvent({ - type: 'pinchstart', - handedness: inputSource.handedness, - target: this - }); - } - } else { - if (grip !== null && inputSource.gripSpace) { - gripPose = frame.getPose(inputSource.gripSpace, referenceSpace); - - if (gripPose !== null) { - grip.matrix.fromArray(gripPose.transform.matrix); - grip.matrix.decompose(grip.position, grip.rotation, grip.scale); - - if (gripPose.linearVelocity) { - grip.hasLinearVelocity = true; - grip.linearVelocity.copy(gripPose.linearVelocity); - } else { - grip.hasLinearVelocity = false; - } - - if (gripPose.angularVelocity) { - grip.hasAngularVelocity = true; - grip.angularVelocity.copy(gripPose.angularVelocity); - } else { - grip.hasAngularVelocity = false; - } - } - } - } - } - - if (targetRay !== null) { - targetRay.visible = inputPose !== null; - } - - if (grip !== null) { - grip.visible = gripPose !== null; - } - - if (hand !== null) { - hand.visible = handPose !== null; - } - - return this; - } - - } - - class WebXRManager extends EventDispatcher { - constructor(renderer, gl) { - super(); - const scope = this; - const state = renderer.state; - let session = null; - let framebufferScaleFactor = 1.0; - let referenceSpace = null; - let referenceSpaceType = 'local-floor'; - let pose = null; - let glBinding = null; - let glFramebuffer = null; - let glProjLayer = null; - const controllers = []; - const inputSourcesMap = new Map(); // - - const cameraL = new PerspectiveCamera(); - cameraL.layers.enable(1); - cameraL.viewport = new Vector4(); - const cameraR = new PerspectiveCamera(); - cameraR.layers.enable(2); - cameraR.viewport = new Vector4(); - const cameras = [cameraL, cameraR]; - const cameraVR = new ArrayCamera(); - cameraVR.layers.enable(1); - cameraVR.layers.enable(2); - let _currentDepthNear = null; - let _currentDepthFar = null; // - - this.cameraAutoUpdate = true; - this.enabled = false; - this.isPresenting = false; - - this.getController = function (index) { - let controller = controllers[index]; - - if (controller === undefined) { - controller = new WebXRController(); - controllers[index] = controller; - } - - return controller.getTargetRaySpace(); - }; - - this.getControllerGrip = function (index) { - let controller = controllers[index]; - - if (controller === undefined) { - controller = new WebXRController(); - controllers[index] = controller; - } - - return controller.getGripSpace(); - }; - - this.getHand = function (index) { - let controller = controllers[index]; - - if (controller === undefined) { - controller = new WebXRController(); - controllers[index] = controller; - } - - return controller.getHandSpace(); - }; // - - - function onSessionEvent(event) { - const controller = inputSourcesMap.get(event.inputSource); - - if (controller) { - controller.dispatchEvent({ - type: event.type, - data: event.inputSource - }); - } - } - - function onSessionEnd() { - inputSourcesMap.forEach(function (controller, inputSource) { - controller.disconnect(inputSource); - }); - inputSourcesMap.clear(); - _currentDepthNear = null; - _currentDepthFar = null; // restore framebuffer/rendering state - - state.bindXRFramebuffer(null); - renderer.setRenderTarget(renderer.getRenderTarget()); // - - animation.stop(); - scope.isPresenting = false; - scope.dispatchEvent({ - type: 'sessionend' - }); - } - - this.setFramebufferScaleFactor = function (value) { - framebufferScaleFactor = value; - - if (scope.isPresenting === true) { - console.warn('THREE.WebXRManager: Cannot change framebuffer scale while presenting.'); - } - }; - - this.setReferenceSpaceType = function (value) { - referenceSpaceType = value; - - if (scope.isPresenting === true) { - console.warn('THREE.WebXRManager: Cannot change reference space type while presenting.'); - } - }; - - this.getReferenceSpace = function () { - return referenceSpace; - }; - - this.getSession = function () { - return session; - }; - - this.setSession = async function (value) { - session = value; - - if (session !== null) { - session.addEventListener('select', onSessionEvent); - session.addEventListener('selectstart', onSessionEvent); - session.addEventListener('selectend', onSessionEvent); - session.addEventListener('squeeze', onSessionEvent); - session.addEventListener('squeezestart', onSessionEvent); - session.addEventListener('squeezeend', onSessionEvent); - session.addEventListener('end', onSessionEnd); - session.addEventListener('inputsourceschange', onInputSourcesChange); - const attributes = gl.getContextAttributes(); - - if (attributes.xrCompatible !== true) { - await gl.makeXRCompatible(); - } - - if (session.renderState.layers === undefined) { - const layerInit = { - antialias: attributes.antialias, - alpha: attributes.alpha, - depth: attributes.depth, - stencil: attributes.stencil, - framebufferScaleFactor: framebufferScaleFactor - }; // eslint-disable-next-line no-undef - - const baseLayer = new XRWebGLLayer(session, gl, layerInit); - session.updateRenderState({ - baseLayer: baseLayer - }); - } else { - let depthFormat = 0; - - if (attributes.depth) { - depthFormat = attributes.stencil ? gl.DEPTH_STENCIL : gl.DEPTH_COMPONENT; - } - - const projectionlayerInit = { - colorFormat: attributes.alpha ? gl.RGBA : gl.RGB, - depthFormat: depthFormat, - scaleFactor: framebufferScaleFactor - }; // eslint-disable-next-line no-undef - - glBinding = new XRWebGLBinding(session, gl); - glProjLayer = glBinding.createProjectionLayer(projectionlayerInit); - glFramebuffer = gl.createFramebuffer(); - session.updateRenderState({ - layers: [glProjLayer] - }); - } - - referenceSpace = await session.requestReferenceSpace(referenceSpaceType); - animation.setContext(session); - animation.start(); - scope.isPresenting = true; - scope.dispatchEvent({ - type: 'sessionstart' - }); - } - }; - - function onInputSourcesChange(event) { - const inputSources = session.inputSources; // Assign inputSources to available controllers - - for (let i = 0; i < controllers.length; i++) { - inputSourcesMap.set(inputSources[i], controllers[i]); - } // Notify disconnected - - - for (let i = 0; i < event.removed.length; i++) { - const inputSource = event.removed[i]; - const controller = inputSourcesMap.get(inputSource); - - if (controller) { - controller.dispatchEvent({ - type: 'disconnected', - data: inputSource - }); - inputSourcesMap.delete(inputSource); - } - } // Notify connected - - - for (let i = 0; i < event.added.length; i++) { - const inputSource = event.added[i]; - const controller = inputSourcesMap.get(inputSource); - - if (controller) { - controller.dispatchEvent({ - type: 'connected', - data: inputSource - }); - } - } - } // - - - const cameraLPos = new Vector3(); - const cameraRPos = new Vector3(); - /** - * Assumes 2 cameras that are parallel and share an X-axis, and that - * the cameras' projection and world matrices have already been set. - * And that near and far planes are identical for both cameras. - * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765 - */ - - function setProjectionFromUnion(camera, cameraL, cameraR) { - cameraLPos.setFromMatrixPosition(cameraL.matrixWorld); - cameraRPos.setFromMatrixPosition(cameraR.matrixWorld); - const ipd = cameraLPos.distanceTo(cameraRPos); - const projL = cameraL.projectionMatrix.elements; - const projR = cameraR.projectionMatrix.elements; // VR systems will have identical far and near planes, and - // most likely identical top and bottom frustum extents. - // Use the left camera for these values. - - const near = projL[14] / (projL[10] - 1); - const far = projL[14] / (projL[10] + 1); - const topFov = (projL[9] + 1) / projL[5]; - const bottomFov = (projL[9] - 1) / projL[5]; - const leftFov = (projL[8] - 1) / projL[0]; - const rightFov = (projR[8] + 1) / projR[0]; - const left = near * leftFov; - const right = near * rightFov; // Calculate the new camera's position offset from the - // left camera. xOffset should be roughly half `ipd`. - - const zOffset = ipd / (-leftFov + rightFov); - const xOffset = zOffset * -leftFov; // TODO: Better way to apply this offset? - - cameraL.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale); - camera.translateX(xOffset); - camera.translateZ(zOffset); - camera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale); - camera.matrixWorldInverse.copy(camera.matrixWorld).invert(); // Find the union of the frustum values of the cameras and scale - // the values so that the near plane's position does not change in world space, - // although must now be relative to the new union camera. - - const near2 = near + zOffset; - const far2 = far + zOffset; - const left2 = left - xOffset; - const right2 = right + (ipd - xOffset); - const top2 = topFov * far / far2 * near2; - const bottom2 = bottomFov * far / far2 * near2; - camera.projectionMatrix.makePerspective(left2, right2, top2, bottom2, near2, far2); - } - - function updateCamera(camera, parent) { - if (parent === null) { - camera.matrixWorld.copy(camera.matrix); - } else { - camera.matrixWorld.multiplyMatrices(parent.matrixWorld, camera.matrix); - } - - camera.matrixWorldInverse.copy(camera.matrixWorld).invert(); - } - - this.updateCamera = function (camera) { - if (session === null) return; - cameraVR.near = cameraR.near = cameraL.near = camera.near; - cameraVR.far = cameraR.far = cameraL.far = camera.far; - - if (_currentDepthNear !== cameraVR.near || _currentDepthFar !== cameraVR.far) { - // Note that the new renderState won't apply until the next frame. See #18320 - session.updateRenderState({ - depthNear: cameraVR.near, - depthFar: cameraVR.far - }); - _currentDepthNear = cameraVR.near; - _currentDepthFar = cameraVR.far; - } - - const parent = camera.parent; - const cameras = cameraVR.cameras; - updateCamera(cameraVR, parent); - - for (let i = 0; i < cameras.length; i++) { - updateCamera(cameras[i], parent); - } - - cameraVR.matrixWorld.decompose(cameraVR.position, cameraVR.quaternion, cameraVR.scale); // update user camera and its children - - camera.position.copy(cameraVR.position); - camera.quaternion.copy(cameraVR.quaternion); - camera.scale.copy(cameraVR.scale); - camera.matrix.copy(cameraVR.matrix); - camera.matrixWorld.copy(cameraVR.matrixWorld); - const children = camera.children; - - for (let i = 0, l = children.length; i < l; i++) { - children[i].updateMatrixWorld(true); - } // update projection matrix for proper view frustum culling - - - if (cameras.length === 2) { - setProjectionFromUnion(cameraVR, cameraL, cameraR); - } else { - // assume single camera setup (AR) - cameraVR.projectionMatrix.copy(cameraL.projectionMatrix); - } - }; - - this.getCamera = function () { - return cameraVR; - }; // Animation Loop - - - let onAnimationFrameCallback = null; - - function onAnimationFrame(time, frame) { - pose = frame.getViewerPose(referenceSpace); - - if (pose !== null) { - const views = pose.views; - const baseLayer = session.renderState.baseLayer; - - if (session.renderState.layers === undefined) { - state.bindXRFramebuffer(baseLayer.framebuffer); - } - - let cameraVRNeedsUpdate = false; // check if it's necessary to rebuild cameraVR's camera list - - if (views.length !== cameraVR.cameras.length) { - cameraVR.cameras.length = 0; - cameraVRNeedsUpdate = true; - } - - for (let i = 0; i < views.length; i++) { - const view = views[i]; - let viewport = null; - - if (session.renderState.layers === undefined) { - viewport = baseLayer.getViewport(view); - } else { - const glSubImage = glBinding.getViewSubImage(glProjLayer, view); - state.bindXRFramebuffer(glFramebuffer); - gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, glSubImage.colorTexture, 0); - - if (glSubImage.depthStencilTexture !== undefined) { - gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.TEXTURE_2D, glSubImage.depthStencilTexture, 0); - } - - viewport = glSubImage.viewport; - } - - const camera = cameras[i]; - camera.matrix.fromArray(view.transform.matrix); - camera.projectionMatrix.fromArray(view.projectionMatrix); - camera.viewport.set(viewport.x, viewport.y, viewport.width, viewport.height); - - if (i === 0) { - cameraVR.matrix.copy(camera.matrix); - } - - if (cameraVRNeedsUpdate === true) { - cameraVR.cameras.push(camera); - } - } - } // - - - const inputSources = session.inputSources; - - for (let i = 0; i < controllers.length; i++) { - const controller = controllers[i]; - const inputSource = inputSources[i]; - controller.update(inputSource, frame, referenceSpace); - } - - if (onAnimationFrameCallback) onAnimationFrameCallback(time, frame); - } - - const animation = new WebGLAnimation(); - animation.setAnimationLoop(onAnimationFrame); - - this.setAnimationLoop = function (callback) { - onAnimationFrameCallback = callback; - }; - - this.dispose = function () {}; - } - - } - - function WebGLMaterials(properties) { - function refreshFogUniforms(uniforms, fog) { - uniforms.fogColor.value.copy(fog.color); - - if (fog.isFog) { - uniforms.fogNear.value = fog.near; - uniforms.fogFar.value = fog.far; - } else if (fog.isFogExp2) { - uniforms.fogDensity.value = fog.density; - } - } - - function refreshMaterialUniforms(uniforms, material, pixelRatio, height, transmissionRenderTarget) { - if (material.isMeshBasicMaterial) { - refreshUniformsCommon(uniforms, material); - } else if (material.isMeshLambertMaterial) { - refreshUniformsCommon(uniforms, material); - refreshUniformsLambert(uniforms, material); - } else if (material.isMeshToonMaterial) { - refreshUniformsCommon(uniforms, material); - refreshUniformsToon(uniforms, material); - } else if (material.isMeshPhongMaterial) { - refreshUniformsCommon(uniforms, material); - refreshUniformsPhong(uniforms, material); - } else if (material.isMeshStandardMaterial) { - refreshUniformsCommon(uniforms, material); - - if (material.isMeshPhysicalMaterial) { - refreshUniformsPhysical(uniforms, material, transmissionRenderTarget); - } else { - refreshUniformsStandard(uniforms, material); - } - } else if (material.isMeshMatcapMaterial) { - refreshUniformsCommon(uniforms, material); - refreshUniformsMatcap(uniforms, material); - } else if (material.isMeshDepthMaterial) { - refreshUniformsCommon(uniforms, material); - refreshUniformsDepth(uniforms, material); - } else if (material.isMeshDistanceMaterial) { - refreshUniformsCommon(uniforms, material); - refreshUniformsDistance(uniforms, material); - } else if (material.isMeshNormalMaterial) { - refreshUniformsCommon(uniforms, material); - refreshUniformsNormal(uniforms, material); - } else if (material.isLineBasicMaterial) { - refreshUniformsLine(uniforms, material); - - if (material.isLineDashedMaterial) { - refreshUniformsDash(uniforms, material); - } - } else if (material.isPointsMaterial) { - refreshUniformsPoints(uniforms, material, pixelRatio, height); - } else if (material.isSpriteMaterial) { - refreshUniformsSprites(uniforms, material); - } else if (material.isShadowMaterial) { - uniforms.color.value.copy(material.color); - uniforms.opacity.value = material.opacity; - } else if (material.isShaderMaterial) { - material.uniformsNeedUpdate = false; // #15581 - } - } - - function refreshUniformsCommon(uniforms, material) { - uniforms.opacity.value = material.opacity; - - if (material.color) { - uniforms.diffuse.value.copy(material.color); - } - - if (material.emissive) { - uniforms.emissive.value.copy(material.emissive).multiplyScalar(material.emissiveIntensity); - } - - if (material.map) { - uniforms.map.value = material.map; - } - - if (material.alphaMap) { - uniforms.alphaMap.value = material.alphaMap; - } - - if (material.specularMap) { - uniforms.specularMap.value = material.specularMap; - } - - const envMap = properties.get(material).envMap; - - if (envMap) { - uniforms.envMap.value = envMap; - uniforms.flipEnvMap.value = envMap.isCubeTexture && envMap._needsFlipEnvMap ? -1 : 1; - uniforms.reflectivity.value = material.reflectivity; - uniforms.refractionRatio.value = material.refractionRatio; - - const maxMipLevel = properties.get(envMap).__maxMipLevel; - - if (maxMipLevel !== undefined) { - uniforms.maxMipLevel.value = maxMipLevel; - } - } - - if (material.lightMap) { - uniforms.lightMap.value = material.lightMap; - uniforms.lightMapIntensity.value = material.lightMapIntensity; - } - - if (material.aoMap) { - uniforms.aoMap.value = material.aoMap; - uniforms.aoMapIntensity.value = material.aoMapIntensity; - } // uv repeat and offset setting priorities - // 1. color map - // 2. specular map - // 3. displacementMap map - // 4. normal map - // 5. bump map - // 6. roughnessMap map - // 7. metalnessMap map - // 8. alphaMap map - // 9. emissiveMap map - // 10. clearcoat map - // 11. clearcoat normal map - // 12. clearcoat roughnessMap map - - - let uvScaleMap; - - if (material.map) { - uvScaleMap = material.map; - } else if (material.specularMap) { - uvScaleMap = material.specularMap; - } else if (material.displacementMap) { - uvScaleMap = material.displacementMap; - } else if (material.normalMap) { - uvScaleMap = material.normalMap; - } else if (material.bumpMap) { - uvScaleMap = material.bumpMap; - } else if (material.roughnessMap) { - uvScaleMap = material.roughnessMap; - } else if (material.metalnessMap) { - uvScaleMap = material.metalnessMap; - } else if (material.alphaMap) { - uvScaleMap = material.alphaMap; - } else if (material.emissiveMap) { - uvScaleMap = material.emissiveMap; - } else if (material.clearcoatMap) { - uvScaleMap = material.clearcoatMap; - } else if (material.clearcoatNormalMap) { - uvScaleMap = material.clearcoatNormalMap; - } else if (material.clearcoatRoughnessMap) { - uvScaleMap = material.clearcoatRoughnessMap; - } - - if (uvScaleMap !== undefined) { - // backwards compatibility - if (uvScaleMap.isWebGLRenderTarget) { - uvScaleMap = uvScaleMap.texture; - } - - if (uvScaleMap.matrixAutoUpdate === true) { - uvScaleMap.updateMatrix(); - } - - uniforms.uvTransform.value.copy(uvScaleMap.matrix); - } // uv repeat and offset setting priorities for uv2 - // 1. ao map - // 2. light map - - - let uv2ScaleMap; - - if (material.aoMap) { - uv2ScaleMap = material.aoMap; - } else if (material.lightMap) { - uv2ScaleMap = material.lightMap; - } - - if (uv2ScaleMap !== undefined) { - // backwards compatibility - if (uv2ScaleMap.isWebGLRenderTarget) { - uv2ScaleMap = uv2ScaleMap.texture; - } - - if (uv2ScaleMap.matrixAutoUpdate === true) { - uv2ScaleMap.updateMatrix(); - } - - uniforms.uv2Transform.value.copy(uv2ScaleMap.matrix); - } - } - - function refreshUniformsLine(uniforms, material) { - uniforms.diffuse.value.copy(material.color); - uniforms.opacity.value = material.opacity; - } - - function refreshUniformsDash(uniforms, material) { - uniforms.dashSize.value = material.dashSize; - uniforms.totalSize.value = material.dashSize + material.gapSize; - uniforms.scale.value = material.scale; - } - - function refreshUniformsPoints(uniforms, material, pixelRatio, height) { - uniforms.diffuse.value.copy(material.color); - uniforms.opacity.value = material.opacity; - uniforms.size.value = material.size * pixelRatio; - uniforms.scale.value = height * 0.5; - - if (material.map) { - uniforms.map.value = material.map; - } - - if (material.alphaMap) { - uniforms.alphaMap.value = material.alphaMap; - } // uv repeat and offset setting priorities - // 1. color map - // 2. alpha map - - - let uvScaleMap; - - if (material.map) { - uvScaleMap = material.map; - } else if (material.alphaMap) { - uvScaleMap = material.alphaMap; - } - - if (uvScaleMap !== undefined) { - if (uvScaleMap.matrixAutoUpdate === true) { - uvScaleMap.updateMatrix(); - } - - uniforms.uvTransform.value.copy(uvScaleMap.matrix); - } - } - - function refreshUniformsSprites(uniforms, material) { - uniforms.diffuse.value.copy(material.color); - uniforms.opacity.value = material.opacity; - uniforms.rotation.value = material.rotation; - - if (material.map) { - uniforms.map.value = material.map; - } - - if (material.alphaMap) { - uniforms.alphaMap.value = material.alphaMap; - } // uv repeat and offset setting priorities - // 1. color map - // 2. alpha map - - - let uvScaleMap; - - if (material.map) { - uvScaleMap = material.map; - } else if (material.alphaMap) { - uvScaleMap = material.alphaMap; - } - - if (uvScaleMap !== undefined) { - if (uvScaleMap.matrixAutoUpdate === true) { - uvScaleMap.updateMatrix(); - } - - uniforms.uvTransform.value.copy(uvScaleMap.matrix); - } - } - - function refreshUniformsLambert(uniforms, material) { - if (material.emissiveMap) { - uniforms.emissiveMap.value = material.emissiveMap; - } - } - - function refreshUniformsPhong(uniforms, material) { - uniforms.specular.value.copy(material.specular); - uniforms.shininess.value = Math.max(material.shininess, 1e-4); // to prevent pow( 0.0, 0.0 ) - - if (material.emissiveMap) { - uniforms.emissiveMap.value = material.emissiveMap; - } - - if (material.bumpMap) { - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if (material.side === BackSide) uniforms.bumpScale.value *= -1; - } - - if (material.normalMap) { - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy(material.normalScale); - if (material.side === BackSide) uniforms.normalScale.value.negate(); - } - - if (material.displacementMap) { - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - } - } - - function refreshUniformsToon(uniforms, material) { - if (material.gradientMap) { - uniforms.gradientMap.value = material.gradientMap; - } - - if (material.emissiveMap) { - uniforms.emissiveMap.value = material.emissiveMap; - } - - if (material.bumpMap) { - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if (material.side === BackSide) uniforms.bumpScale.value *= -1; - } - - if (material.normalMap) { - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy(material.normalScale); - if (material.side === BackSide) uniforms.normalScale.value.negate(); - } - - if (material.displacementMap) { - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - } - } - - function refreshUniformsStandard(uniforms, material) { - uniforms.roughness.value = material.roughness; - uniforms.metalness.value = material.metalness; - - if (material.roughnessMap) { - uniforms.roughnessMap.value = material.roughnessMap; - } - - if (material.metalnessMap) { - uniforms.metalnessMap.value = material.metalnessMap; - } - - if (material.emissiveMap) { - uniforms.emissiveMap.value = material.emissiveMap; - } - - if (material.bumpMap) { - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if (material.side === BackSide) uniforms.bumpScale.value *= -1; - } - - if (material.normalMap) { - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy(material.normalScale); - if (material.side === BackSide) uniforms.normalScale.value.negate(); - } - - if (material.displacementMap) { - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - } - - const envMap = properties.get(material).envMap; - - if (envMap) { - //uniforms.envMap.value = material.envMap; // part of uniforms common - uniforms.envMapIntensity.value = material.envMapIntensity; - } - } - - function refreshUniformsPhysical(uniforms, material, transmissionRenderTarget) { - refreshUniformsStandard(uniforms, material); - uniforms.reflectivity.value = material.reflectivity; // also part of uniforms common - - uniforms.clearcoat.value = material.clearcoat; - uniforms.clearcoatRoughness.value = material.clearcoatRoughness; - if (material.sheen) uniforms.sheen.value.copy(material.sheen); - - if (material.clearcoatMap) { - uniforms.clearcoatMap.value = material.clearcoatMap; - } - - if (material.clearcoatRoughnessMap) { - uniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap; - } - - if (material.clearcoatNormalMap) { - uniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale); - uniforms.clearcoatNormalMap.value = material.clearcoatNormalMap; - - if (material.side === BackSide) { - uniforms.clearcoatNormalScale.value.negate(); - } - } - - uniforms.transmission.value = material.transmission; - - if (material.transmissionMap) { - uniforms.transmissionMap.value = material.transmissionMap; - } - - if (material.transmission > 0.0) { - uniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture; - uniforms.transmissionSamplerSize.value.set(transmissionRenderTarget.width, transmissionRenderTarget.height); - } - - uniforms.thickness.value = material.thickness; - - if (material.thicknessMap) { - uniforms.thicknessMap.value = material.thicknessMap; - } - - uniforms.attenuationDistance.value = material.attenuationDistance; - uniforms.attenuationColor.value.copy(material.attenuationColor); - } - - function refreshUniformsMatcap(uniforms, material) { - if (material.matcap) { - uniforms.matcap.value = material.matcap; - } - - if (material.bumpMap) { - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if (material.side === BackSide) uniforms.bumpScale.value *= -1; - } - - if (material.normalMap) { - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy(material.normalScale); - if (material.side === BackSide) uniforms.normalScale.value.negate(); - } - - if (material.displacementMap) { - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - } - } - - function refreshUniformsDepth(uniforms, material) { - if (material.displacementMap) { - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - } - } - - function refreshUniformsDistance(uniforms, material) { - if (material.displacementMap) { - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - } - - uniforms.referencePosition.value.copy(material.referencePosition); - uniforms.nearDistance.value = material.nearDistance; - uniforms.farDistance.value = material.farDistance; - } - - function refreshUniformsNormal(uniforms, material) { - if (material.bumpMap) { - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if (material.side === BackSide) uniforms.bumpScale.value *= -1; - } - - if (material.normalMap) { - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy(material.normalScale); - if (material.side === BackSide) uniforms.normalScale.value.negate(); - } - - if (material.displacementMap) { - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - } - } - - return { - refreshFogUniforms: refreshFogUniforms, - refreshMaterialUniforms: refreshMaterialUniforms - }; - } - - function createCanvasElement() { - const canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas'); - canvas.style.display = 'block'; - return canvas; - } - - function WebGLRenderer(parameters = {}) { - const _canvas = parameters.canvas !== undefined ? parameters.canvas : createCanvasElement(), - _context = parameters.context !== undefined ? parameters.context : null, - _alpha = parameters.alpha !== undefined ? parameters.alpha : false, - _depth = parameters.depth !== undefined ? parameters.depth : true, - _stencil = parameters.stencil !== undefined ? parameters.stencil : true, - _antialias = parameters.antialias !== undefined ? parameters.antialias : false, - _premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true, - _preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false, - _powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default', - _failIfMajorPerformanceCaveat = parameters.failIfMajorPerformanceCaveat !== undefined ? parameters.failIfMajorPerformanceCaveat : false; - - let currentRenderList = null; - let currentRenderState = null; // render() can be called from within a callback triggered by another render. - // We track this so that the nested render call gets its list and state isolated from the parent render call. - - const renderListStack = []; - const renderStateStack = []; // public properties - - this.domElement = _canvas; // Debug configuration container - - this.debug = { - /** - * Enables error checking and reporting when shader programs are being compiled - * @type {boolean} - */ - checkShaderErrors: true - }; // clearing - - this.autoClear = true; - this.autoClearColor = true; - this.autoClearDepth = true; - this.autoClearStencil = true; // scene graph - - this.sortObjects = true; // user-defined clipping - - this.clippingPlanes = []; - this.localClippingEnabled = false; // physically based shading - - this.gammaFactor = 2.0; // for backwards compatibility - - this.outputEncoding = LinearEncoding; // physical lights - - this.physicallyCorrectLights = false; // tone mapping - - this.toneMapping = NoToneMapping; - this.toneMappingExposure = 1.0; // internal properties - - const _this = this; - - let _isContextLost = false; // internal state cache - - let _currentActiveCubeFace = 0; - let _currentActiveMipmapLevel = 0; - let _currentRenderTarget = null; - - let _currentMaterialId = -1; - - let _currentCamera = null; - - const _currentViewport = new Vector4(); - - const _currentScissor = new Vector4(); - - let _currentScissorTest = null; // - - let _width = _canvas.width; - let _height = _canvas.height; - let _pixelRatio = 1; - let _opaqueSort = null; - let _transparentSort = null; - - const _viewport = new Vector4(0, 0, _width, _height); - - const _scissor = new Vector4(0, 0, _width, _height); - - let _scissorTest = false; // - - const _currentDrawBuffers = []; // frustum - - const _frustum = new Frustum(); // clipping - - - let _clippingEnabled = false; - let _localClippingEnabled = false; // transmission - - let _transmissionRenderTarget = null; // camera matrices cache - - const _projScreenMatrix = new Matrix4(); - - const _vector3 = new Vector3(); - - const _emptyScene = { - background: null, - fog: null, - environment: null, - overrideMaterial: null, - isScene: true - }; - - function getTargetPixelRatio() { - return _currentRenderTarget === null ? _pixelRatio : 1; - } // initialize - - - let _gl = _context; - - function getContext(contextNames, contextAttributes) { - for (let i = 0; i < contextNames.length; i++) { - const contextName = contextNames[i]; - - const context = _canvas.getContext(contextName, contextAttributes); - - if (context !== null) return context; - } - - return null; - } - - try { - const contextAttributes = { - alpha: _alpha, - depth: _depth, - stencil: _stencil, - antialias: _antialias, - premultipliedAlpha: _premultipliedAlpha, - preserveDrawingBuffer: _preserveDrawingBuffer, - powerPreference: _powerPreference, - failIfMajorPerformanceCaveat: _failIfMajorPerformanceCaveat - }; // event listeners must be registered before WebGL context is created, see #12753 - - _canvas.addEventListener('webglcontextlost', onContextLost, false); - - _canvas.addEventListener('webglcontextrestored', onContextRestore, false); - - if (_gl === null) { - const contextNames = ['webgl2', 'webgl', 'experimental-webgl']; - - if (_this.isWebGL1Renderer === true) { - contextNames.shift(); - } - - _gl = getContext(contextNames, contextAttributes); - - if (_gl === null) { - if (getContext(contextNames)) { - throw new Error('Error creating WebGL context with your selected attributes.'); - } else { - throw new Error('Error creating WebGL context.'); - } - } - } // Some experimental-webgl implementations do not have getShaderPrecisionFormat - - - if (_gl.getShaderPrecisionFormat === undefined) { - _gl.getShaderPrecisionFormat = function () { - return { - 'rangeMin': 1, - 'rangeMax': 1, - 'precision': 1 - }; - }; - } - } catch (error) { - console.error('THREE.WebGLRenderer: ' + error.message); - throw error; - } - - let extensions, capabilities, state, info; - let properties, textures, cubemaps, attributes, geometries, objects; - let programCache, materials, renderLists, renderStates, clipping, shadowMap; - let background, morphtargets, bufferRenderer, indexedBufferRenderer; - let utils, bindingStates; - - function initGLContext() { - extensions = new WebGLExtensions(_gl); - capabilities = new WebGLCapabilities(_gl, extensions, parameters); - extensions.init(capabilities); - utils = new WebGLUtils(_gl, extensions, capabilities); - state = new WebGLState(_gl, extensions, capabilities); - _currentDrawBuffers[0] = _gl.BACK; - info = new WebGLInfo(_gl); - properties = new WebGLProperties(); - textures = new WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info); - cubemaps = new WebGLCubeMaps(_this); - attributes = new WebGLAttributes(_gl, capabilities); - bindingStates = new WebGLBindingStates(_gl, extensions, attributes, capabilities); - geometries = new WebGLGeometries(_gl, attributes, info, bindingStates); - objects = new WebGLObjects(_gl, geometries, attributes, info); - morphtargets = new WebGLMorphtargets(_gl); - clipping = new WebGLClipping(properties); - programCache = new WebGLPrograms(_this, cubemaps, extensions, capabilities, bindingStates, clipping); - materials = new WebGLMaterials(properties); - renderLists = new WebGLRenderLists(properties); - renderStates = new WebGLRenderStates(extensions, capabilities); - background = new WebGLBackground(_this, cubemaps, state, objects, _premultipliedAlpha); - shadowMap = new WebGLShadowMap(_this, objects, capabilities); - bufferRenderer = new WebGLBufferRenderer(_gl, extensions, info, capabilities); - indexedBufferRenderer = new WebGLIndexedBufferRenderer(_gl, extensions, info, capabilities); - info.programs = programCache.programs; - _this.capabilities = capabilities; - _this.extensions = extensions; - _this.properties = properties; - _this.renderLists = renderLists; - _this.shadowMap = shadowMap; - _this.state = state; - _this.info = info; - } - - initGLContext(); // xr - - const xr = new WebXRManager(_this, _gl); - this.xr = xr; // API - - this.getContext = function () { - return _gl; - }; - - this.getContextAttributes = function () { - return _gl.getContextAttributes(); - }; - - this.forceContextLoss = function () { - const extension = extensions.get('WEBGL_lose_context'); - if (extension) extension.loseContext(); - }; - - this.forceContextRestore = function () { - const extension = extensions.get('WEBGL_lose_context'); - if (extension) extension.restoreContext(); - }; - - this.getPixelRatio = function () { - return _pixelRatio; - }; - - this.setPixelRatio = function (value) { - if (value === undefined) return; - _pixelRatio = value; - this.setSize(_width, _height, false); - }; - - this.getSize = function (target) { - return target.set(_width, _height); - }; - - this.setSize = function (width, height, updateStyle) { - if (xr.isPresenting) { - console.warn('THREE.WebGLRenderer: Can\'t change size while VR device is presenting.'); - return; - } - - _width = width; - _height = height; - _canvas.width = Math.floor(width * _pixelRatio); - _canvas.height = Math.floor(height * _pixelRatio); - - if (updateStyle !== false) { - _canvas.style.width = width + 'px'; - _canvas.style.height = height + 'px'; - } - - this.setViewport(0, 0, width, height); - }; - - this.getDrawingBufferSize = function (target) { - return target.set(_width * _pixelRatio, _height * _pixelRatio).floor(); - }; - - this.setDrawingBufferSize = function (width, height, pixelRatio) { - _width = width; - _height = height; - _pixelRatio = pixelRatio; - _canvas.width = Math.floor(width * pixelRatio); - _canvas.height = Math.floor(height * pixelRatio); - this.setViewport(0, 0, width, height); - }; - - this.getCurrentViewport = function (target) { - return target.copy(_currentViewport); - }; - - this.getViewport = function (target) { - return target.copy(_viewport); - }; - - this.setViewport = function (x, y, width, height) { - if (x.isVector4) { - _viewport.set(x.x, x.y, x.z, x.w); - } else { - _viewport.set(x, y, width, height); - } - - state.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor()); - }; - - this.getScissor = function (target) { - return target.copy(_scissor); - }; - - this.setScissor = function (x, y, width, height) { - if (x.isVector4) { - _scissor.set(x.x, x.y, x.z, x.w); - } else { - _scissor.set(x, y, width, height); - } - - state.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor()); - }; - - this.getScissorTest = function () { - return _scissorTest; - }; - - this.setScissorTest = function (boolean) { - state.setScissorTest(_scissorTest = boolean); - }; - - this.setOpaqueSort = function (method) { - _opaqueSort = method; - }; - - this.setTransparentSort = function (method) { - _transparentSort = method; - }; // Clearing - - - this.getClearColor = function (target) { - return target.copy(background.getClearColor()); - }; - - this.setClearColor = function () { - background.setClearColor.apply(background, arguments); - }; - - this.getClearAlpha = function () { - return background.getClearAlpha(); - }; - - this.setClearAlpha = function () { - background.setClearAlpha.apply(background, arguments); - }; - - this.clear = function (color, depth, stencil) { - let bits = 0; - if (color === undefined || color) bits |= _gl.COLOR_BUFFER_BIT; - if (depth === undefined || depth) bits |= _gl.DEPTH_BUFFER_BIT; - if (stencil === undefined || stencil) bits |= _gl.STENCIL_BUFFER_BIT; - - _gl.clear(bits); - }; - - this.clearColor = function () { - this.clear(true, false, false); - }; - - this.clearDepth = function () { - this.clear(false, true, false); - }; - - this.clearStencil = function () { - this.clear(false, false, true); - }; // - - - this.dispose = function () { - _canvas.removeEventListener('webglcontextlost', onContextLost, false); - - _canvas.removeEventListener('webglcontextrestored', onContextRestore, false); - - renderLists.dispose(); - renderStates.dispose(); - properties.dispose(); - cubemaps.dispose(); - objects.dispose(); - bindingStates.dispose(); - xr.dispose(); - xr.removeEventListener('sessionstart', onXRSessionStart); - xr.removeEventListener('sessionend', onXRSessionEnd); - - if (_transmissionRenderTarget) { - _transmissionRenderTarget.dispose(); - - _transmissionRenderTarget = null; - } - - animation.stop(); - }; // Events - - - function onContextLost(event) { - event.preventDefault(); - console.log('THREE.WebGLRenderer: Context Lost.'); - _isContextLost = true; - } - - function onContextRestore() - /* event */ - { - console.log('THREE.WebGLRenderer: Context Restored.'); - _isContextLost = false; - const infoAutoReset = info.autoReset; - const shadowMapEnabled = shadowMap.enabled; - const shadowMapAutoUpdate = shadowMap.autoUpdate; - const shadowMapNeedsUpdate = shadowMap.needsUpdate; - const shadowMapType = shadowMap.type; - initGLContext(); - info.autoReset = infoAutoReset; - shadowMap.enabled = shadowMapEnabled; - shadowMap.autoUpdate = shadowMapAutoUpdate; - shadowMap.needsUpdate = shadowMapNeedsUpdate; - shadowMap.type = shadowMapType; - } - - function onMaterialDispose(event) { - const material = event.target; - material.removeEventListener('dispose', onMaterialDispose); - deallocateMaterial(material); - } // Buffer deallocation - - - function deallocateMaterial(material) { - releaseMaterialProgramReferences(material); - properties.remove(material); - } - - function releaseMaterialProgramReferences(material) { - const programs = properties.get(material).programs; - - if (programs !== undefined) { - programs.forEach(function (program) { - programCache.releaseProgram(program); - }); - } - } // Buffer rendering - - - function renderObjectImmediate(object, program) { - object.render(function (object) { - _this.renderBufferImmediate(object, program); - }); - } - - this.renderBufferImmediate = function (object, program) { - bindingStates.initAttributes(); - const buffers = properties.get(object); - if (object.hasPositions && !buffers.position) buffers.position = _gl.createBuffer(); - if (object.hasNormals && !buffers.normal) buffers.normal = _gl.createBuffer(); - if (object.hasUvs && !buffers.uv) buffers.uv = _gl.createBuffer(); - if (object.hasColors && !buffers.color) buffers.color = _gl.createBuffer(); - const programAttributes = program.getAttributes(); - - if (object.hasPositions) { - _gl.bindBuffer(_gl.ARRAY_BUFFER, buffers.position); - - _gl.bufferData(_gl.ARRAY_BUFFER, object.positionArray, _gl.DYNAMIC_DRAW); - - bindingStates.enableAttribute(programAttributes.position); - - _gl.vertexAttribPointer(programAttributes.position, 3, _gl.FLOAT, false, 0, 0); - } - - if (object.hasNormals) { - _gl.bindBuffer(_gl.ARRAY_BUFFER, buffers.normal); - - _gl.bufferData(_gl.ARRAY_BUFFER, object.normalArray, _gl.DYNAMIC_DRAW); - - bindingStates.enableAttribute(programAttributes.normal); - - _gl.vertexAttribPointer(programAttributes.normal, 3, _gl.FLOAT, false, 0, 0); - } - - if (object.hasUvs) { - _gl.bindBuffer(_gl.ARRAY_BUFFER, buffers.uv); - - _gl.bufferData(_gl.ARRAY_BUFFER, object.uvArray, _gl.DYNAMIC_DRAW); - - bindingStates.enableAttribute(programAttributes.uv); - - _gl.vertexAttribPointer(programAttributes.uv, 2, _gl.FLOAT, false, 0, 0); - } - - if (object.hasColors) { - _gl.bindBuffer(_gl.ARRAY_BUFFER, buffers.color); - - _gl.bufferData(_gl.ARRAY_BUFFER, object.colorArray, _gl.DYNAMIC_DRAW); - - bindingStates.enableAttribute(programAttributes.color); - - _gl.vertexAttribPointer(programAttributes.color, 3, _gl.FLOAT, false, 0, 0); - } - - bindingStates.disableUnusedAttributes(); - - _gl.drawArrays(_gl.TRIANGLES, 0, object.count); - - object.count = 0; - }; - - this.renderBufferDirect = function (camera, scene, geometry, material, object, group) { - if (scene === null) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null) - - const frontFaceCW = object.isMesh && object.matrixWorld.determinant() < 0; - const program = setProgram(camera, scene, material, object); - state.setMaterial(material, frontFaceCW); // - - let index = geometry.index; - const position = geometry.attributes.position; // - - if (index === null) { - if (position === undefined || position.count === 0) return; - } else if (index.count === 0) { - return; - } // - - - let rangeFactor = 1; - - if (material.wireframe === true) { - index = geometries.getWireframeAttribute(geometry); - rangeFactor = 2; - } - - if (material.morphTargets || material.morphNormals) { - morphtargets.update(object, geometry, material, program); - } - - bindingStates.setup(object, material, program, geometry, index); - let attribute; - let renderer = bufferRenderer; - - if (index !== null) { - attribute = attributes.get(index); - renderer = indexedBufferRenderer; - renderer.setIndex(attribute); - } // - - - const dataCount = index !== null ? index.count : position.count; - const rangeStart = geometry.drawRange.start * rangeFactor; - const rangeCount = geometry.drawRange.count * rangeFactor; - const groupStart = group !== null ? group.start * rangeFactor : 0; - const groupCount = group !== null ? group.count * rangeFactor : Infinity; - const drawStart = Math.max(rangeStart, groupStart); - const drawEnd = Math.min(dataCount, rangeStart + rangeCount, groupStart + groupCount) - 1; - const drawCount = Math.max(0, drawEnd - drawStart + 1); - if (drawCount === 0) return; // - - if (object.isMesh) { - if (material.wireframe === true) { - state.setLineWidth(material.wireframeLinewidth * getTargetPixelRatio()); - renderer.setMode(_gl.LINES); - } else { - renderer.setMode(_gl.TRIANGLES); - } - } else if (object.isLine) { - let lineWidth = material.linewidth; - if (lineWidth === undefined) lineWidth = 1; // Not using Line*Material - - state.setLineWidth(lineWidth * getTargetPixelRatio()); - - if (object.isLineSegments) { - renderer.setMode(_gl.LINES); - } else if (object.isLineLoop) { - renderer.setMode(_gl.LINE_LOOP); - } else { - renderer.setMode(_gl.LINE_STRIP); - } - } else if (object.isPoints) { - renderer.setMode(_gl.POINTS); - } else if (object.isSprite) { - renderer.setMode(_gl.TRIANGLES); - } - - if (object.isInstancedMesh) { - renderer.renderInstances(drawStart, drawCount, object.count); - } else if (geometry.isInstancedBufferGeometry) { - const instanceCount = Math.min(geometry.instanceCount, geometry._maxInstanceCount); - renderer.renderInstances(drawStart, drawCount, instanceCount); - } else { - renderer.render(drawStart, drawCount); - } - }; // Compile - - - this.compile = function (scene, camera) { - currentRenderState = renderStates.get(scene); - currentRenderState.init(); - scene.traverseVisible(function (object) { - if (object.isLight && object.layers.test(camera.layers)) { - currentRenderState.pushLight(object); - - if (object.castShadow) { - currentRenderState.pushShadow(object); - } - } - }); - currentRenderState.setupLights(); - scene.traverse(function (object) { - const material = object.material; - - if (material) { - if (Array.isArray(material)) { - for (let i = 0; i < material.length; i++) { - const material2 = material[i]; - getProgram(material2, scene, object); - } - } else { - getProgram(material, scene, object); - } - } - }); - }; // Animation Loop - - - let onAnimationFrameCallback = null; - - function onAnimationFrame(time) { - if (onAnimationFrameCallback) onAnimationFrameCallback(time); - } - - function onXRSessionStart() { - animation.stop(); - } - - function onXRSessionEnd() { - animation.start(); - } - - const animation = new WebGLAnimation(); - animation.setAnimationLoop(onAnimationFrame); - if (typeof window !== 'undefined') animation.setContext(window); - - this.setAnimationLoop = function (callback) { - onAnimationFrameCallback = callback; - xr.setAnimationLoop(callback); - callback === null ? animation.stop() : animation.start(); - }; - - xr.addEventListener('sessionstart', onXRSessionStart); - xr.addEventListener('sessionend', onXRSessionEnd); // Rendering - - this.render = function (scene, camera) { - if (camera !== undefined && camera.isCamera !== true) { - console.error('THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.'); - return; - } - - if (_isContextLost === true) return; // update scene graph - - if (scene.autoUpdate === true) scene.updateMatrixWorld(); // update camera matrices and frustum - - if (camera.parent === null) camera.updateMatrixWorld(); - - if (xr.enabled === true && xr.isPresenting === true) { - if (xr.cameraAutoUpdate === true) xr.updateCamera(camera); - camera = xr.getCamera(); // use XR camera for rendering - } // - - - if (scene.isScene === true) scene.onBeforeRender(_this, scene, camera, _currentRenderTarget); - currentRenderState = renderStates.get(scene, renderStateStack.length); - currentRenderState.init(); - renderStateStack.push(currentRenderState); - - _projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse); - - _frustum.setFromProjectionMatrix(_projScreenMatrix); - - _localClippingEnabled = this.localClippingEnabled; - _clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled, camera); - currentRenderList = renderLists.get(scene, renderListStack.length); - currentRenderList.init(); - renderListStack.push(currentRenderList); - projectObject(scene, camera, 0, _this.sortObjects); - currentRenderList.finish(); - - if (_this.sortObjects === true) { - currentRenderList.sort(_opaqueSort, _transparentSort); - } // - - - if (_clippingEnabled === true) clipping.beginShadows(); - const shadowsArray = currentRenderState.state.shadowsArray; - shadowMap.render(shadowsArray, scene, camera); - currentRenderState.setupLights(); - currentRenderState.setupLightsView(camera); - if (_clippingEnabled === true) clipping.endShadows(); // - - if (this.info.autoReset === true) this.info.reset(); // - - background.render(currentRenderList, scene); // render scene - - const opaqueObjects = currentRenderList.opaque; - const transmissiveObjects = currentRenderList.transmissive; - const transparentObjects = currentRenderList.transparent; - if (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene, camera); - if (transmissiveObjects.length > 0) renderTransmissiveObjects(opaqueObjects, transmissiveObjects, scene, camera); - if (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera); // - - if (_currentRenderTarget !== null) { - // resolve multisample renderbuffers to a single-sample texture if necessary - textures.updateMultisampleRenderTarget(_currentRenderTarget); // Generate mipmap if we're using any kind of mipmap filtering - - textures.updateRenderTargetMipmap(_currentRenderTarget); - } // - - - if (scene.isScene === true) scene.onAfterRender(_this, scene, camera); // Ensure depth buffer writing is enabled so it can be cleared on next render - - state.buffers.depth.setTest(true); - state.buffers.depth.setMask(true); - state.buffers.color.setMask(true); - state.setPolygonOffset(false); // _gl.finish(); - - bindingStates.resetDefaultState(); - _currentMaterialId = -1; - _currentCamera = null; - renderStateStack.pop(); - - if (renderStateStack.length > 0) { - currentRenderState = renderStateStack[renderStateStack.length - 1]; - } else { - currentRenderState = null; - } - - renderListStack.pop(); - - if (renderListStack.length > 0) { - currentRenderList = renderListStack[renderListStack.length - 1]; - } else { - currentRenderList = null; - } - }; - - function projectObject(object, camera, groupOrder, sortObjects) { - if (object.visible === false) return; - const visible = object.layers.test(camera.layers); - - if (visible) { - if (object.isGroup) { - groupOrder = object.renderOrder; - } else if (object.isLOD) { - if (object.autoUpdate === true) object.update(camera); - } else if (object.isLight) { - currentRenderState.pushLight(object); - - if (object.castShadow) { - currentRenderState.pushShadow(object); - } - } else if (object.isSprite) { - if (!object.frustumCulled || _frustum.intersectsSprite(object)) { - if (sortObjects) { - _vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix); - } - - const geometry = objects.update(object); - const material = object.material; - - if (material.visible) { - currentRenderList.push(object, geometry, material, groupOrder, _vector3.z, null); - } - } - } else if (object.isImmediateRenderObject) { - if (sortObjects) { - _vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix); - } - - currentRenderList.push(object, null, object.material, groupOrder, _vector3.z, null); - } else if (object.isMesh || object.isLine || object.isPoints) { - if (object.isSkinnedMesh) { - // update skeleton only once in a frame - if (object.skeleton.frame !== info.render.frame) { - object.skeleton.update(); - object.skeleton.frame = info.render.frame; - } - } - - if (!object.frustumCulled || _frustum.intersectsObject(object)) { - if (sortObjects) { - _vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix); - } - - const geometry = objects.update(object); - const material = object.material; - - if (Array.isArray(material)) { - const groups = geometry.groups; - - for (let i = 0, l = groups.length; i < l; i++) { - const group = groups[i]; - const groupMaterial = material[group.materialIndex]; - - if (groupMaterial && groupMaterial.visible) { - currentRenderList.push(object, geometry, groupMaterial, groupOrder, _vector3.z, group); - } - } - } else if (material.visible) { - currentRenderList.push(object, geometry, material, groupOrder, _vector3.z, null); - } - } - } - } - - const children = object.children; - - for (let i = 0, l = children.length; i < l; i++) { - projectObject(children[i], camera, groupOrder, sortObjects); - } - } - - function renderTransmissiveObjects(opaqueObjects, transmissiveObjects, scene, camera) { - if (_transmissionRenderTarget === null) { - const needsAntialias = _antialias === true && capabilities.isWebGL2 === true; - const renderTargetType = needsAntialias ? WebGLMultisampleRenderTarget : WebGLRenderTarget; - _transmissionRenderTarget = new renderTargetType(1024, 1024, { - generateMipmaps: true, - type: utils.convert(HalfFloatType) !== null ? HalfFloatType : UnsignedByteType, - minFilter: LinearMipmapLinearFilter, - magFilter: NearestFilter, - wrapS: ClampToEdgeWrapping, - wrapT: ClampToEdgeWrapping - }); - } - - const currentRenderTarget = _this.getRenderTarget(); - - _this.setRenderTarget(_transmissionRenderTarget); - - _this.clear(); // Turn off the features which can affect the frag color for opaque objects pass. - // Otherwise they are applied twice in opaque objects pass and transmission objects pass. - - - const currentToneMapping = _this.toneMapping; - _this.toneMapping = NoToneMapping; - renderObjects(opaqueObjects, scene, camera); - _this.toneMapping = currentToneMapping; - textures.updateMultisampleRenderTarget(_transmissionRenderTarget); - textures.updateRenderTargetMipmap(_transmissionRenderTarget); - - _this.setRenderTarget(currentRenderTarget); - - renderObjects(transmissiveObjects, scene, camera); - } - - function renderObjects(renderList, scene, camera) { - const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null; - - for (let i = 0, l = renderList.length; i < l; i++) { - const renderItem = renderList[i]; - const object = renderItem.object; - const geometry = renderItem.geometry; - const material = overrideMaterial === null ? renderItem.material : overrideMaterial; - const group = renderItem.group; - - if (camera.isArrayCamera) { - const cameras = camera.cameras; - - for (let j = 0, jl = cameras.length; j < jl; j++) { - const camera2 = cameras[j]; - - if (object.layers.test(camera2.layers)) { - state.viewport(_currentViewport.copy(camera2.viewport)); - currentRenderState.setupLightsView(camera2); - renderObject(object, scene, camera2, geometry, material, group); - } - } - } else { - renderObject(object, scene, camera, geometry, material, group); - } - } - } - - function renderObject(object, scene, camera, geometry, material, group) { - object.onBeforeRender(_this, scene, camera, geometry, material, group); - object.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse, object.matrixWorld); - object.normalMatrix.getNormalMatrix(object.modelViewMatrix); - - if (object.isImmediateRenderObject) { - const program = setProgram(camera, scene, material, object); - state.setMaterial(material); - bindingStates.reset(); - renderObjectImmediate(object, program); - } else { - if (material.transparent === true && material.side === DoubleSide) { - material.side = BackSide; - material.needsUpdate = true; - - _this.renderBufferDirect(camera, scene, geometry, material, object, group); - - material.side = FrontSide; - material.needsUpdate = true; - - _this.renderBufferDirect(camera, scene, geometry, material, object, group); - - material.side = DoubleSide; - } else { - _this.renderBufferDirect(camera, scene, geometry, material, object, group); - } - } - - object.onAfterRender(_this, scene, camera, geometry, material, group); - } - - function getProgram(material, scene, object) { - if (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ... - - const materialProperties = properties.get(material); - const lights = currentRenderState.state.lights; - const shadowsArray = currentRenderState.state.shadowsArray; - const lightsStateVersion = lights.state.version; - const parameters = programCache.getParameters(material, lights.state, shadowsArray, scene, object); - const programCacheKey = programCache.getProgramCacheKey(parameters); - let programs = materialProperties.programs; // always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change - - materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null; - materialProperties.fog = scene.fog; - materialProperties.envMap = cubemaps.get(material.envMap || materialProperties.environment); - - if (programs === undefined) { - // new material - material.addEventListener('dispose', onMaterialDispose); - programs = new Map(); - materialProperties.programs = programs; - } - - let program = programs.get(programCacheKey); - - if (program !== undefined) { - // early out if program and light state is identical - if (materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion) { - updateCommonMaterialProperties(material, parameters); - return program; - } - } else { - parameters.uniforms = programCache.getUniforms(material); - material.onBuild(parameters, _this); - material.onBeforeCompile(parameters, _this); - program = programCache.acquireProgram(parameters, programCacheKey); - programs.set(programCacheKey, program); - materialProperties.uniforms = parameters.uniforms; - } - - const uniforms = materialProperties.uniforms; - - if (!material.isShaderMaterial && !material.isRawShaderMaterial || material.clipping === true) { - uniforms.clippingPlanes = clipping.uniform; - } - - updateCommonMaterialProperties(material, parameters); // store the light setup it was created for - - materialProperties.needsLights = materialNeedsLights(material); - materialProperties.lightsStateVersion = lightsStateVersion; - - if (materialProperties.needsLights) { - // wire up the material to this renderer's lighting state - uniforms.ambientLightColor.value = lights.state.ambient; - uniforms.lightProbe.value = lights.state.probe; - uniforms.directionalLights.value = lights.state.directional; - uniforms.directionalLightShadows.value = lights.state.directionalShadow; - uniforms.spotLights.value = lights.state.spot; - uniforms.spotLightShadows.value = lights.state.spotShadow; - uniforms.rectAreaLights.value = lights.state.rectArea; - uniforms.ltc_1.value = lights.state.rectAreaLTC1; - uniforms.ltc_2.value = lights.state.rectAreaLTC2; - uniforms.pointLights.value = lights.state.point; - uniforms.pointLightShadows.value = lights.state.pointShadow; - uniforms.hemisphereLights.value = lights.state.hemi; - uniforms.directionalShadowMap.value = lights.state.directionalShadowMap; - uniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix; - uniforms.spotShadowMap.value = lights.state.spotShadowMap; - uniforms.spotShadowMatrix.value = lights.state.spotShadowMatrix; - uniforms.pointShadowMap.value = lights.state.pointShadowMap; - uniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix; // TODO (abelnation): add area lights shadow info to uniforms - } - - const progUniforms = program.getUniforms(); - const uniformsList = WebGLUniforms.seqWithValue(progUniforms.seq, uniforms); - materialProperties.currentProgram = program; - materialProperties.uniformsList = uniformsList; - return program; - } - - function updateCommonMaterialProperties(material, parameters) { - const materialProperties = properties.get(material); - materialProperties.outputEncoding = parameters.outputEncoding; - materialProperties.instancing = parameters.instancing; - materialProperties.skinning = parameters.skinning; - materialProperties.numClippingPlanes = parameters.numClippingPlanes; - materialProperties.numIntersection = parameters.numClipIntersection; - materialProperties.vertexAlphas = parameters.vertexAlphas; - } - - function setProgram(camera, scene, material, object) { - if (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ... - - textures.resetTextureUnits(); - const fog = scene.fog; - const environment = material.isMeshStandardMaterial ? scene.environment : null; - const encoding = _currentRenderTarget === null ? _this.outputEncoding : _currentRenderTarget.texture.encoding; - const envMap = cubemaps.get(material.envMap || environment); - const vertexAlphas = material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4; - const materialProperties = properties.get(material); - const lights = currentRenderState.state.lights; - - if (_clippingEnabled === true) { - if (_localClippingEnabled === true || camera !== _currentCamera) { - const useCache = camera === _currentCamera && material.id === _currentMaterialId; // we might want to call this function with some ClippingGroup - // object instead of the material, once it becomes feasible - // (#8465, #8379) - - clipping.setState(material, camera, useCache); - } - } // - - - let needsProgramChange = false; - - if (material.version === materialProperties.__version) { - if (materialProperties.needsLights && materialProperties.lightsStateVersion !== lights.state.version) { - needsProgramChange = true; - } else if (materialProperties.outputEncoding !== encoding) { - needsProgramChange = true; - } else if (object.isInstancedMesh && materialProperties.instancing === false) { - needsProgramChange = true; - } else if (!object.isInstancedMesh && materialProperties.instancing === true) { - needsProgramChange = true; - } else if (object.isSkinnedMesh && materialProperties.skinning === false) { - needsProgramChange = true; - } else if (!object.isSkinnedMesh && materialProperties.skinning === true) { - needsProgramChange = true; - } else if (materialProperties.envMap !== envMap) { - needsProgramChange = true; - } else if (material.fog && materialProperties.fog !== fog) { - needsProgramChange = true; - } else if (materialProperties.numClippingPlanes !== undefined && (materialProperties.numClippingPlanes !== clipping.numPlanes || materialProperties.numIntersection !== clipping.numIntersection)) { - needsProgramChange = true; - } else if (materialProperties.vertexAlphas !== vertexAlphas) { - needsProgramChange = true; - } - } else { - needsProgramChange = true; - materialProperties.__version = material.version; - } // - - - let program = materialProperties.currentProgram; - - if (needsProgramChange === true) { - program = getProgram(material, scene, object); - } - - let refreshProgram = false; - let refreshMaterial = false; - let refreshLights = false; - const p_uniforms = program.getUniforms(), - m_uniforms = materialProperties.uniforms; - - if (state.useProgram(program.program)) { - refreshProgram = true; - refreshMaterial = true; - refreshLights = true; - } - - if (material.id !== _currentMaterialId) { - _currentMaterialId = material.id; - refreshMaterial = true; - } - - if (refreshProgram || _currentCamera !== camera) { - p_uniforms.setValue(_gl, 'projectionMatrix', camera.projectionMatrix); - - if (capabilities.logarithmicDepthBuffer) { - p_uniforms.setValue(_gl, 'logDepthBufFC', 2.0 / (Math.log(camera.far + 1.0) / Math.LN2)); - } - - if (_currentCamera !== camera) { - _currentCamera = camera; // lighting uniforms depend on the camera so enforce an update - // now, in case this material supports lights - or later, when - // the next material that does gets activated: - - refreshMaterial = true; // set to true on material change - - refreshLights = true; // remains set until update done - } // load material specific uniforms - // (shader material also gets them for the sake of genericity) - - - if (material.isShaderMaterial || material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshStandardMaterial || material.envMap) { - const uCamPos = p_uniforms.map.cameraPosition; - - if (uCamPos !== undefined) { - uCamPos.setValue(_gl, _vector3.setFromMatrixPosition(camera.matrixWorld)); - } - } - - if (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial) { - p_uniforms.setValue(_gl, 'isOrthographic', camera.isOrthographicCamera === true); - } - - if (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial || material.isShadowMaterial || object.isSkinnedMesh) { - p_uniforms.setValue(_gl, 'viewMatrix', camera.matrixWorldInverse); - } - } // skinning uniforms must be set even if material didn't change - // auto-setting of texture unit for bone texture must go before other textures - // otherwise textures used for skinning can take over texture units reserved for other material textures - - - if (object.isSkinnedMesh) { - p_uniforms.setOptional(_gl, object, 'bindMatrix'); - p_uniforms.setOptional(_gl, object, 'bindMatrixInverse'); - const skeleton = object.skeleton; - - if (skeleton) { - if (capabilities.floatVertexTextures) { - if (skeleton.boneTexture === null) skeleton.computeBoneTexture(); - p_uniforms.setValue(_gl, 'boneTexture', skeleton.boneTexture, textures); - p_uniforms.setValue(_gl, 'boneTextureSize', skeleton.boneTextureSize); - } else { - p_uniforms.setOptional(_gl, skeleton, 'boneMatrices'); - } - } - } - - if (refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow) { - materialProperties.receiveShadow = object.receiveShadow; - p_uniforms.setValue(_gl, 'receiveShadow', object.receiveShadow); - } - - if (refreshMaterial) { - p_uniforms.setValue(_gl, 'toneMappingExposure', _this.toneMappingExposure); - - if (materialProperties.needsLights) { - // the current material requires lighting info - // note: all lighting uniforms are always set correctly - // they simply reference the renderer's state for their - // values - // - // use the current material's .needsUpdate flags to set - // the GL state when required - markUniformsLightsNeedsUpdate(m_uniforms, refreshLights); - } // refresh uniforms common to several materials - - - if (fog && material.fog) { - materials.refreshFogUniforms(m_uniforms, fog); - } - - materials.refreshMaterialUniforms(m_uniforms, material, _pixelRatio, _height, _transmissionRenderTarget); - WebGLUniforms.upload(_gl, materialProperties.uniformsList, m_uniforms, textures); - } - - if (material.isShaderMaterial && material.uniformsNeedUpdate === true) { - WebGLUniforms.upload(_gl, materialProperties.uniformsList, m_uniforms, textures); - material.uniformsNeedUpdate = false; - } - - if (material.isSpriteMaterial) { - p_uniforms.setValue(_gl, 'center', object.center); - } // common matrices - - - p_uniforms.setValue(_gl, 'modelViewMatrix', object.modelViewMatrix); - p_uniforms.setValue(_gl, 'normalMatrix', object.normalMatrix); - p_uniforms.setValue(_gl, 'modelMatrix', object.matrixWorld); - return program; - } // If uniforms are marked as clean, they don't need to be loaded to the GPU. - - - function markUniformsLightsNeedsUpdate(uniforms, value) { - uniforms.ambientLightColor.needsUpdate = value; - uniforms.lightProbe.needsUpdate = value; - uniforms.directionalLights.needsUpdate = value; - uniforms.directionalLightShadows.needsUpdate = value; - uniforms.pointLights.needsUpdate = value; - uniforms.pointLightShadows.needsUpdate = value; - uniforms.spotLights.needsUpdate = value; - uniforms.spotLightShadows.needsUpdate = value; - uniforms.rectAreaLights.needsUpdate = value; - uniforms.hemisphereLights.needsUpdate = value; - } - - function materialNeedsLights(material) { - return material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial || material.isMeshStandardMaterial || material.isShadowMaterial || material.isShaderMaterial && material.lights === true; - } - - this.getActiveCubeFace = function () { - return _currentActiveCubeFace; - }; - - this.getActiveMipmapLevel = function () { - return _currentActiveMipmapLevel; - }; - - this.getRenderTarget = function () { - return _currentRenderTarget; - }; - - this.setRenderTarget = function (renderTarget, activeCubeFace = 0, activeMipmapLevel = 0) { - _currentRenderTarget = renderTarget; - _currentActiveCubeFace = activeCubeFace; - _currentActiveMipmapLevel = activeMipmapLevel; - - if (renderTarget && properties.get(renderTarget).__webglFramebuffer === undefined) { - textures.setupRenderTarget(renderTarget); - } - - let framebuffer = null; - let isCube = false; - let isRenderTarget3D = false; - - if (renderTarget) { - const texture = renderTarget.texture; - - if (texture.isDataTexture3D || texture.isDataTexture2DArray) { - isRenderTarget3D = true; - } - - const __webglFramebuffer = properties.get(renderTarget).__webglFramebuffer; - - if (renderTarget.isWebGLCubeRenderTarget) { - framebuffer = __webglFramebuffer[activeCubeFace]; - isCube = true; - } else if (renderTarget.isWebGLMultisampleRenderTarget) { - framebuffer = properties.get(renderTarget).__webglMultisampledFramebuffer; - } else { - framebuffer = __webglFramebuffer; - } - - _currentViewport.copy(renderTarget.viewport); - - _currentScissor.copy(renderTarget.scissor); - - _currentScissorTest = renderTarget.scissorTest; - } else { - _currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor(); - - _currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor(); - - _currentScissorTest = _scissorTest; - } - - const framebufferBound = state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer); - - if (framebufferBound && capabilities.drawBuffers) { - let needsUpdate = false; - - if (renderTarget) { - if (renderTarget.isWebGLMultipleRenderTargets) { - const textures = renderTarget.texture; - - if (_currentDrawBuffers.length !== textures.length || _currentDrawBuffers[0] !== _gl.COLOR_ATTACHMENT0) { - for (let i = 0, il = textures.length; i < il; i++) { - _currentDrawBuffers[i] = _gl.COLOR_ATTACHMENT0 + i; - } - - _currentDrawBuffers.length = textures.length; - needsUpdate = true; - } - } else { - if (_currentDrawBuffers.length !== 1 || _currentDrawBuffers[0] !== _gl.COLOR_ATTACHMENT0) { - _currentDrawBuffers[0] = _gl.COLOR_ATTACHMENT0; - _currentDrawBuffers.length = 1; - needsUpdate = true; - } - } - } else { - if (_currentDrawBuffers.length !== 1 || _currentDrawBuffers[0] !== _gl.BACK) { - _currentDrawBuffers[0] = _gl.BACK; - _currentDrawBuffers.length = 1; - needsUpdate = true; - } - } - - if (needsUpdate) { - if (capabilities.isWebGL2) { - _gl.drawBuffers(_currentDrawBuffers); - } else { - extensions.get('WEBGL_draw_buffers').drawBuffersWEBGL(_currentDrawBuffers); - } - } - } - - state.viewport(_currentViewport); - state.scissor(_currentScissor); - state.setScissorTest(_currentScissorTest); - - if (isCube) { - const textureProperties = properties.get(renderTarget.texture); - - _gl.framebufferTexture2D(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, _gl.TEXTURE_CUBE_MAP_POSITIVE_X + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel); - } else if (isRenderTarget3D) { - const textureProperties = properties.get(renderTarget.texture); - const layer = activeCubeFace || 0; - - _gl.framebufferTextureLayer(_gl.FRAMEBUFFER, _gl.COLOR_ATTACHMENT0, textureProperties.__webglTexture, activeMipmapLevel || 0, layer); - } - }; - - this.readRenderTargetPixels = function (renderTarget, x, y, width, height, buffer, activeCubeFaceIndex) { - if (!(renderTarget && renderTarget.isWebGLRenderTarget)) { - console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.'); - return; - } - - let framebuffer = properties.get(renderTarget).__webglFramebuffer; - - if (renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined) { - framebuffer = framebuffer[activeCubeFaceIndex]; - } - - if (framebuffer) { - state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer); - - try { - const texture = renderTarget.texture; - const textureFormat = texture.format; - const textureType = texture.type; - - if (textureFormat !== RGBAFormat && utils.convert(textureFormat) !== _gl.getParameter(_gl.IMPLEMENTATION_COLOR_READ_FORMAT)) { - console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.'); - return; - } - - const halfFloatSupportedByExt = textureType === HalfFloatType && (extensions.has('EXT_color_buffer_half_float') || capabilities.isWebGL2 && extensions.has('EXT_color_buffer_float')); - - if (textureType !== UnsignedByteType && utils.convert(textureType) !== _gl.getParameter(_gl.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513) - !(textureType === FloatType && (capabilities.isWebGL2 || extensions.has('OES_texture_float') || extensions.has('WEBGL_color_buffer_float'))) && // Chrome Mac >= 52 and Firefox - !halfFloatSupportedByExt) { - console.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.'); - return; - } - - if (_gl.checkFramebufferStatus(_gl.FRAMEBUFFER) === _gl.FRAMEBUFFER_COMPLETE) { - // the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604) - if (x >= 0 && x <= renderTarget.width - width && y >= 0 && y <= renderTarget.height - height) { - _gl.readPixels(x, y, width, height, utils.convert(textureFormat), utils.convert(textureType), buffer); - } - } else { - console.error('THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.'); - } - } finally { - // restore framebuffer of current render target if necessary - const framebuffer = _currentRenderTarget !== null ? properties.get(_currentRenderTarget).__webglFramebuffer : null; - state.bindFramebuffer(_gl.FRAMEBUFFER, framebuffer); - } - } - }; - - this.copyFramebufferToTexture = function (position, texture, level = 0) { - const levelScale = Math.pow(2, -level); - const width = Math.floor(texture.image.width * levelScale); - const height = Math.floor(texture.image.height * levelScale); - let glFormat = utils.convert(texture.format); - - if (capabilities.isWebGL2) { - // Workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=1120100 - // Not needed in Chrome 93+ - if (glFormat === _gl.RGB) glFormat = _gl.RGB8; - if (glFormat === _gl.RGBA) glFormat = _gl.RGBA8; - } - - textures.setTexture2D(texture, 0); - - _gl.copyTexImage2D(_gl.TEXTURE_2D, level, glFormat, position.x, position.y, width, height, 0); - - state.unbindTexture(); - }; - - this.copyTextureToTexture = function (position, srcTexture, dstTexture, level = 0) { - const width = srcTexture.image.width; - const height = srcTexture.image.height; - const glFormat = utils.convert(dstTexture.format); - const glType = utils.convert(dstTexture.type); - textures.setTexture2D(dstTexture, 0); // As another texture upload may have changed pixelStorei - // parameters, make sure they are correct for the dstTexture - - _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY); - - _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha); - - _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment); - - if (srcTexture.isDataTexture) { - _gl.texSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data); - } else { - if (srcTexture.isCompressedTexture) { - _gl.compressedTexSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, srcTexture.mipmaps[0].width, srcTexture.mipmaps[0].height, glFormat, srcTexture.mipmaps[0].data); - } else { - _gl.texSubImage2D(_gl.TEXTURE_2D, level, position.x, position.y, glFormat, glType, srcTexture.image); - } - } // Generate mipmaps only when copying level 0 - - - if (level === 0 && dstTexture.generateMipmaps) _gl.generateMipmap(_gl.TEXTURE_2D); - state.unbindTexture(); - }; - - this.copyTextureToTexture3D = function (sourceBox, position, srcTexture, dstTexture, level = 0) { - if (_this.isWebGL1Renderer) { - console.warn('THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.'); - return; - } - - const width = sourceBox.max.x - sourceBox.min.x + 1; - const height = sourceBox.max.y - sourceBox.min.y + 1; - const depth = sourceBox.max.z - sourceBox.min.z + 1; - const glFormat = utils.convert(dstTexture.format); - const glType = utils.convert(dstTexture.type); - let glTarget; - - if (dstTexture.isDataTexture3D) { - textures.setTexture3D(dstTexture, 0); - glTarget = _gl.TEXTURE_3D; - } else if (dstTexture.isDataTexture2DArray) { - textures.setTexture2DArray(dstTexture, 0); - glTarget = _gl.TEXTURE_2D_ARRAY; - } else { - console.warn('THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.'); - return; - } - - _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, dstTexture.flipY); - - _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, dstTexture.premultiplyAlpha); - - _gl.pixelStorei(_gl.UNPACK_ALIGNMENT, dstTexture.unpackAlignment); - - const unpackRowLen = _gl.getParameter(_gl.UNPACK_ROW_LENGTH); - - const unpackImageHeight = _gl.getParameter(_gl.UNPACK_IMAGE_HEIGHT); - - const unpackSkipPixels = _gl.getParameter(_gl.UNPACK_SKIP_PIXELS); - - const unpackSkipRows = _gl.getParameter(_gl.UNPACK_SKIP_ROWS); - - const unpackSkipImages = _gl.getParameter(_gl.UNPACK_SKIP_IMAGES); - - const image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[0] : srcTexture.image; - - _gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, image.width); - - _gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT, image.height); - - _gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, sourceBox.min.x); - - _gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, sourceBox.min.y); - - _gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES, sourceBox.min.z); - - if (srcTexture.isDataTexture || srcTexture.isDataTexture3D) { - _gl.texSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data); - } else { - if (srcTexture.isCompressedTexture) { - console.warn('THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.'); - - _gl.compressedTexSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data); - } else { - _gl.texSubImage3D(glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image); - } - } - - _gl.pixelStorei(_gl.UNPACK_ROW_LENGTH, unpackRowLen); - - _gl.pixelStorei(_gl.UNPACK_IMAGE_HEIGHT, unpackImageHeight); - - _gl.pixelStorei(_gl.UNPACK_SKIP_PIXELS, unpackSkipPixels); - - _gl.pixelStorei(_gl.UNPACK_SKIP_ROWS, unpackSkipRows); - - _gl.pixelStorei(_gl.UNPACK_SKIP_IMAGES, unpackSkipImages); // Generate mipmaps only when copying level 0 - - - if (level === 0 && dstTexture.generateMipmaps) _gl.generateMipmap(glTarget); - state.unbindTexture(); - }; - - this.initTexture = function (texture) { - textures.setTexture2D(texture, 0); - state.unbindTexture(); - }; - - this.resetState = function () { - _currentActiveCubeFace = 0; - _currentActiveMipmapLevel = 0; - _currentRenderTarget = null; - state.reset(); - bindingStates.reset(); - }; - - if (typeof __THREE_DEVTOOLS__ !== 'undefined') { - __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', { - detail: this - })); // eslint-disable-line no-undef - - } - } - - class WebGL1Renderer extends WebGLRenderer {} - - WebGL1Renderer.prototype.isWebGL1Renderer = true; - - class FogExp2 { - constructor(color, density = 0.00025) { - this.name = ''; - this.color = new Color(color); - this.density = density; - } - - clone() { - return new FogExp2(this.color, this.density); - } - - toJSON() - /* meta */ - { - return { - type: 'FogExp2', - color: this.color.getHex(), - density: this.density - }; - } - - } - - FogExp2.prototype.isFogExp2 = true; - - class Fog { - constructor(color, near = 1, far = 1000) { - this.name = ''; - this.color = new Color(color); - this.near = near; - this.far = far; - } - - clone() { - return new Fog(this.color, this.near, this.far); - } - - toJSON() - /* meta */ - { - return { - type: 'Fog', - color: this.color.getHex(), - near: this.near, - far: this.far - }; - } - - } - - Fog.prototype.isFog = true; - - class Scene extends Object3D { - constructor() { - super(); - this.type = 'Scene'; - this.background = null; - this.environment = null; - this.fog = null; - this.overrideMaterial = null; - this.autoUpdate = true; // checked by the renderer - - if (typeof __THREE_DEVTOOLS__ !== 'undefined') { - __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', { - detail: this - })); // eslint-disable-line no-undef - - } - } - - copy(source, recursive) { - super.copy(source, recursive); - if (source.background !== null) this.background = source.background.clone(); - if (source.environment !== null) this.environment = source.environment.clone(); - if (source.fog !== null) this.fog = source.fog.clone(); - if (source.overrideMaterial !== null) this.overrideMaterial = source.overrideMaterial.clone(); - this.autoUpdate = source.autoUpdate; - this.matrixAutoUpdate = source.matrixAutoUpdate; - return this; - } - - toJSON(meta) { - const data = super.toJSON(meta); - if (this.fog !== null) data.object.fog = this.fog.toJSON(); - return data; - } - - } - - Scene.prototype.isScene = true; - - class InterleavedBuffer { - constructor(array, stride) { - this.array = array; - this.stride = stride; - this.count = array !== undefined ? array.length / stride : 0; - this.usage = StaticDrawUsage; - this.updateRange = { - offset: 0, - count: -1 - }; - this.version = 0; - this.uuid = generateUUID(); - } - - onUploadCallback() {} - - set needsUpdate(value) { - if (value === true) this.version++; - } - - setUsage(value) { - this.usage = value; - return this; - } - - copy(source) { - this.array = new source.array.constructor(source.array); - this.count = source.count; - this.stride = source.stride; - this.usage = source.usage; - return this; - } - - copyAt(index1, attribute, index2) { - index1 *= this.stride; - index2 *= attribute.stride; - - for (let i = 0, l = this.stride; i < l; i++) { - this.array[index1 + i] = attribute.array[index2 + i]; - } - - return this; - } - - set(value, offset = 0) { - this.array.set(value, offset); - return this; - } - - clone(data) { - if (data.arrayBuffers === undefined) { - data.arrayBuffers = {}; - } - - if (this.array.buffer._uuid === undefined) { - this.array.buffer._uuid = generateUUID(); - } - - if (data.arrayBuffers[this.array.buffer._uuid] === undefined) { - data.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer; - } - - const array = new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]); - const ib = new this.constructor(array, this.stride); - ib.setUsage(this.usage); - return ib; - } - - onUpload(callback) { - this.onUploadCallback = callback; - return this; - } - - toJSON(data) { - if (data.arrayBuffers === undefined) { - data.arrayBuffers = {}; - } // generate UUID for array buffer if necessary - - - if (this.array.buffer._uuid === undefined) { - this.array.buffer._uuid = generateUUID(); - } - - if (data.arrayBuffers[this.array.buffer._uuid] === undefined) { - data.arrayBuffers[this.array.buffer._uuid] = Array.prototype.slice.call(new Uint32Array(this.array.buffer)); - } // - - - return { - uuid: this.uuid, - buffer: this.array.buffer._uuid, - type: this.array.constructor.name, - stride: this.stride - }; - } - - } - - InterleavedBuffer.prototype.isInterleavedBuffer = true; - - const _vector$6 = /*@__PURE__*/new Vector3(); - - class InterleavedBufferAttribute { - constructor(interleavedBuffer, itemSize, offset, normalized = false) { - this.name = ''; - this.data = interleavedBuffer; - this.itemSize = itemSize; - this.offset = offset; - this.normalized = normalized === true; - } - - get count() { - return this.data.count; - } - - get array() { - return this.data.array; - } - - set needsUpdate(value) { - this.data.needsUpdate = value; - } - - applyMatrix4(m) { - for (let i = 0, l = this.data.count; i < l; i++) { - _vector$6.x = this.getX(i); - _vector$6.y = this.getY(i); - _vector$6.z = this.getZ(i); - - _vector$6.applyMatrix4(m); - - this.setXYZ(i, _vector$6.x, _vector$6.y, _vector$6.z); - } - - return this; - } - - applyNormalMatrix(m) { - for (let i = 0, l = this.count; i < l; i++) { - _vector$6.x = this.getX(i); - _vector$6.y = this.getY(i); - _vector$6.z = this.getZ(i); - - _vector$6.applyNormalMatrix(m); - - this.setXYZ(i, _vector$6.x, _vector$6.y, _vector$6.z); - } - - return this; - } - - transformDirection(m) { - for (let i = 0, l = this.count; i < l; i++) { - _vector$6.x = this.getX(i); - _vector$6.y = this.getY(i); - _vector$6.z = this.getZ(i); - - _vector$6.transformDirection(m); - - this.setXYZ(i, _vector$6.x, _vector$6.y, _vector$6.z); - } - - return this; - } - - setX(index, x) { - this.data.array[index * this.data.stride + this.offset] = x; - return this; - } - - setY(index, y) { - this.data.array[index * this.data.stride + this.offset + 1] = y; - return this; - } - - setZ(index, z) { - this.data.array[index * this.data.stride + this.offset + 2] = z; - return this; - } - - setW(index, w) { - this.data.array[index * this.data.stride + this.offset + 3] = w; - return this; - } - - getX(index) { - return this.data.array[index * this.data.stride + this.offset]; - } - - getY(index) { - return this.data.array[index * this.data.stride + this.offset + 1]; - } - - getZ(index) { - return this.data.array[index * this.data.stride + this.offset + 2]; - } - - getW(index) { - return this.data.array[index * this.data.stride + this.offset + 3]; - } - - setXY(index, x, y) { - index = index * this.data.stride + this.offset; - this.data.array[index + 0] = x; - this.data.array[index + 1] = y; - return this; - } - - setXYZ(index, x, y, z) { - index = index * this.data.stride + this.offset; - this.data.array[index + 0] = x; - this.data.array[index + 1] = y; - this.data.array[index + 2] = z; - return this; - } - - setXYZW(index, x, y, z, w) { - index = index * this.data.stride + this.offset; - this.data.array[index + 0] = x; - this.data.array[index + 1] = y; - this.data.array[index + 2] = z; - this.data.array[index + 3] = w; - return this; - } - - clone(data) { - if (data === undefined) { - console.log('THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.'); - const array = []; - - for (let i = 0; i < this.count; i++) { - const index = i * this.data.stride + this.offset; - - for (let j = 0; j < this.itemSize; j++) { - array.push(this.data.array[index + j]); - } - } - - return new BufferAttribute(new this.array.constructor(array), this.itemSize, this.normalized); - } else { - if (data.interleavedBuffers === undefined) { - data.interleavedBuffers = {}; - } - - if (data.interleavedBuffers[this.data.uuid] === undefined) { - data.interleavedBuffers[this.data.uuid] = this.data.clone(data); - } - - return new InterleavedBufferAttribute(data.interleavedBuffers[this.data.uuid], this.itemSize, this.offset, this.normalized); - } - } - - toJSON(data) { - if (data === undefined) { - console.log('THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.'); - const array = []; - - for (let i = 0; i < this.count; i++) { - const index = i * this.data.stride + this.offset; - - for (let j = 0; j < this.itemSize; j++) { - array.push(this.data.array[index + j]); - } - } // deinterleave data and save it as an ordinary buffer attribute for now - - - return { - itemSize: this.itemSize, - type: this.array.constructor.name, - array: array, - normalized: this.normalized - }; - } else { - // save as true interlaved attribtue - if (data.interleavedBuffers === undefined) { - data.interleavedBuffers = {}; - } - - if (data.interleavedBuffers[this.data.uuid] === undefined) { - data.interleavedBuffers[this.data.uuid] = this.data.toJSON(data); - } - - return { - isInterleavedBufferAttribute: true, - itemSize: this.itemSize, - data: this.data.uuid, - offset: this.offset, - normalized: this.normalized - }; - } - } - - } - - InterleavedBufferAttribute.prototype.isInterleavedBufferAttribute = true; - - /** - * parameters = { - * color: , - * map: new THREE.Texture( ), - * alphaMap: new THREE.Texture( ), - * rotation: , - * sizeAttenuation: - * } - */ - - class SpriteMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'SpriteMaterial'; - this.color = new Color(0xffffff); - this.map = null; - this.alphaMap = null; - this.rotation = 0; - this.sizeAttenuation = true; - this.transparent = true; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - this.map = source.map; - this.alphaMap = source.alphaMap; - this.rotation = source.rotation; - this.sizeAttenuation = source.sizeAttenuation; - return this; - } - - } - - SpriteMaterial.prototype.isSpriteMaterial = true; - - let _geometry; - - const _intersectPoint = /*@__PURE__*/new Vector3(); - - const _worldScale = /*@__PURE__*/new Vector3(); - - const _mvPosition = /*@__PURE__*/new Vector3(); - - const _alignedPosition = /*@__PURE__*/new Vector2(); - - const _rotatedPosition = /*@__PURE__*/new Vector2(); - - const _viewWorldMatrix = /*@__PURE__*/new Matrix4(); - - const _vA = /*@__PURE__*/new Vector3(); - - const _vB = /*@__PURE__*/new Vector3(); - - const _vC = /*@__PURE__*/new Vector3(); - - const _uvA = /*@__PURE__*/new Vector2(); - - const _uvB = /*@__PURE__*/new Vector2(); - - const _uvC = /*@__PURE__*/new Vector2(); - - class Sprite extends Object3D { - constructor(material) { - super(); - this.type = 'Sprite'; - - if (_geometry === undefined) { - _geometry = new BufferGeometry(); - const float32Array = new Float32Array([-0.5, -0.5, 0, 0, 0, 0.5, -0.5, 0, 1, 0, 0.5, 0.5, 0, 1, 1, -0.5, 0.5, 0, 0, 1]); - const interleavedBuffer = new InterleavedBuffer(float32Array, 5); - - _geometry.setIndex([0, 1, 2, 0, 2, 3]); - - _geometry.setAttribute('position', new InterleavedBufferAttribute(interleavedBuffer, 3, 0, false)); - - _geometry.setAttribute('uv', new InterleavedBufferAttribute(interleavedBuffer, 2, 3, false)); - } - - this.geometry = _geometry; - this.material = material !== undefined ? material : new SpriteMaterial(); - this.center = new Vector2(0.5, 0.5); - } - - raycast(raycaster, intersects) { - if (raycaster.camera === null) { - console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'); - } - - _worldScale.setFromMatrixScale(this.matrixWorld); - - _viewWorldMatrix.copy(raycaster.camera.matrixWorld); - - this.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse, this.matrixWorld); - - _mvPosition.setFromMatrixPosition(this.modelViewMatrix); - - if (raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false) { - _worldScale.multiplyScalar(-_mvPosition.z); - } - - const rotation = this.material.rotation; - let sin, cos; - - if (rotation !== 0) { - cos = Math.cos(rotation); - sin = Math.sin(rotation); - } - - const center = this.center; - transformVertex(_vA.set(-0.5, -0.5, 0), _mvPosition, center, _worldScale, sin, cos); - transformVertex(_vB.set(0.5, -0.5, 0), _mvPosition, center, _worldScale, sin, cos); - transformVertex(_vC.set(0.5, 0.5, 0), _mvPosition, center, _worldScale, sin, cos); - - _uvA.set(0, 0); - - _uvB.set(1, 0); - - _uvC.set(1, 1); // check first triangle - - - let intersect = raycaster.ray.intersectTriangle(_vA, _vB, _vC, false, _intersectPoint); - - if (intersect === null) { - // check second triangle - transformVertex(_vB.set(-0.5, 0.5, 0), _mvPosition, center, _worldScale, sin, cos); - - _uvB.set(0, 1); - - intersect = raycaster.ray.intersectTriangle(_vA, _vC, _vB, false, _intersectPoint); - - if (intersect === null) { - return; - } - } - - const distance = raycaster.ray.origin.distanceTo(_intersectPoint); - if (distance < raycaster.near || distance > raycaster.far) return; - intersects.push({ - distance: distance, - point: _intersectPoint.clone(), - uv: Triangle.getUV(_intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2()), - face: null, - object: this - }); - } - - copy(source) { - super.copy(source); - if (source.center !== undefined) this.center.copy(source.center); - this.material = source.material; - return this; - } - - } - - Sprite.prototype.isSprite = true; - - function transformVertex(vertexPosition, mvPosition, center, scale, sin, cos) { - // compute position in camera space - _alignedPosition.subVectors(vertexPosition, center).addScalar(0.5).multiply(scale); // to check if rotation is not zero - - - if (sin !== undefined) { - _rotatedPosition.x = cos * _alignedPosition.x - sin * _alignedPosition.y; - _rotatedPosition.y = sin * _alignedPosition.x + cos * _alignedPosition.y; - } else { - _rotatedPosition.copy(_alignedPosition); - } - - vertexPosition.copy(mvPosition); - vertexPosition.x += _rotatedPosition.x; - vertexPosition.y += _rotatedPosition.y; // transform to world space - - vertexPosition.applyMatrix4(_viewWorldMatrix); - } - - const _v1$2 = /*@__PURE__*/new Vector3(); - - const _v2$1 = /*@__PURE__*/new Vector3(); - - class LOD extends Object3D { - constructor() { - super(); - this._currentLevel = 0; - this.type = 'LOD'; - Object.defineProperties(this, { - levels: { - enumerable: true, - value: [] - }, - isLOD: { - value: true - } - }); - this.autoUpdate = true; - } - - copy(source) { - super.copy(source, false); - const levels = source.levels; - - for (let i = 0, l = levels.length; i < l; i++) { - const level = levels[i]; - this.addLevel(level.object.clone(), level.distance); - } - - this.autoUpdate = source.autoUpdate; - return this; - } - - addLevel(object, distance = 0) { - distance = Math.abs(distance); - const levels = this.levels; - let l; - - for (l = 0; l < levels.length; l++) { - if (distance < levels[l].distance) { - break; - } - } - - levels.splice(l, 0, { - distance: distance, - object: object - }); - this.add(object); - return this; - } - - getCurrentLevel() { - return this._currentLevel; - } - - getObjectForDistance(distance) { - const levels = this.levels; - - if (levels.length > 0) { - let i, l; - - for (i = 1, l = levels.length; i < l; i++) { - if (distance < levels[i].distance) { - break; - } - } - - return levels[i - 1].object; - } - - return null; - } - - raycast(raycaster, intersects) { - const levels = this.levels; - - if (levels.length > 0) { - _v1$2.setFromMatrixPosition(this.matrixWorld); - - const distance = raycaster.ray.origin.distanceTo(_v1$2); - this.getObjectForDistance(distance).raycast(raycaster, intersects); - } - } - - update(camera) { - const levels = this.levels; - - if (levels.length > 1) { - _v1$2.setFromMatrixPosition(camera.matrixWorld); - - _v2$1.setFromMatrixPosition(this.matrixWorld); - - const distance = _v1$2.distanceTo(_v2$1) / camera.zoom; - levels[0].object.visible = true; - let i, l; - - for (i = 1, l = levels.length; i < l; i++) { - if (distance >= levels[i].distance) { - levels[i - 1].object.visible = false; - levels[i].object.visible = true; - } else { - break; - } - } - - this._currentLevel = i - 1; - - for (; i < l; i++) { - levels[i].object.visible = false; - } - } - } - - toJSON(meta) { - const data = super.toJSON(meta); - if (this.autoUpdate === false) data.object.autoUpdate = false; - data.object.levels = []; - const levels = this.levels; - - for (let i = 0, l = levels.length; i < l; i++) { - const level = levels[i]; - data.object.levels.push({ - object: level.object.uuid, - distance: level.distance - }); - } - - return data; - } - - } - - const _basePosition = /*@__PURE__*/new Vector3(); - - const _skinIndex = /*@__PURE__*/new Vector4(); - - const _skinWeight = /*@__PURE__*/new Vector4(); - - const _vector$5 = /*@__PURE__*/new Vector3(); - - const _matrix = /*@__PURE__*/new Matrix4(); - - class SkinnedMesh extends Mesh { - constructor(geometry, material) { - super(geometry, material); - this.type = 'SkinnedMesh'; - this.bindMode = 'attached'; - this.bindMatrix = new Matrix4(); - this.bindMatrixInverse = new Matrix4(); - } - - copy(source) { - super.copy(source); - this.bindMode = source.bindMode; - this.bindMatrix.copy(source.bindMatrix); - this.bindMatrixInverse.copy(source.bindMatrixInverse); - this.skeleton = source.skeleton; - return this; - } - - bind(skeleton, bindMatrix) { - this.skeleton = skeleton; - - if (bindMatrix === undefined) { - this.updateMatrixWorld(true); - this.skeleton.calculateInverses(); - bindMatrix = this.matrixWorld; - } - - this.bindMatrix.copy(bindMatrix); - this.bindMatrixInverse.copy(bindMatrix).invert(); - } - - pose() { - this.skeleton.pose(); - } - - normalizeSkinWeights() { - const vector = new Vector4(); - const skinWeight = this.geometry.attributes.skinWeight; - - for (let i = 0, l = skinWeight.count; i < l; i++) { - vector.x = skinWeight.getX(i); - vector.y = skinWeight.getY(i); - vector.z = skinWeight.getZ(i); - vector.w = skinWeight.getW(i); - const scale = 1.0 / vector.manhattanLength(); - - if (scale !== Infinity) { - vector.multiplyScalar(scale); - } else { - vector.set(1, 0, 0, 0); // do something reasonable - } - - skinWeight.setXYZW(i, vector.x, vector.y, vector.z, vector.w); - } - } - - updateMatrixWorld(force) { - super.updateMatrixWorld(force); - - if (this.bindMode === 'attached') { - this.bindMatrixInverse.copy(this.matrixWorld).invert(); - } else if (this.bindMode === 'detached') { - this.bindMatrixInverse.copy(this.bindMatrix).invert(); - } else { - console.warn('THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode); - } - } - - boneTransform(index, target) { - const skeleton = this.skeleton; - const geometry = this.geometry; - - _skinIndex.fromBufferAttribute(geometry.attributes.skinIndex, index); - - _skinWeight.fromBufferAttribute(geometry.attributes.skinWeight, index); - - _basePosition.fromBufferAttribute(geometry.attributes.position, index).applyMatrix4(this.bindMatrix); - - target.set(0, 0, 0); - - for (let i = 0; i < 4; i++) { - const weight = _skinWeight.getComponent(i); - - if (weight !== 0) { - const boneIndex = _skinIndex.getComponent(i); - - _matrix.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld, skeleton.boneInverses[boneIndex]); - - target.addScaledVector(_vector$5.copy(_basePosition).applyMatrix4(_matrix), weight); - } - } - - return target.applyMatrix4(this.bindMatrixInverse); - } - - } - - SkinnedMesh.prototype.isSkinnedMesh = true; - - class Bone extends Object3D { - constructor() { - super(); - this.type = 'Bone'; - } - - } - - Bone.prototype.isBone = true; - - class DataTexture extends Texture { - constructor(data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, encoding) { - super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding); - this.image = { - data: data, - width: width, - height: height - }; - this.magFilter = magFilter; - this.minFilter = minFilter; - this.generateMipmaps = false; - this.flipY = false; - this.unpackAlignment = 1; - this.needsUpdate = true; - } - - } - - DataTexture.prototype.isDataTexture = true; - - const _offsetMatrix = /*@__PURE__*/new Matrix4(); - - const _identityMatrix = /*@__PURE__*/new Matrix4(); - - class Skeleton { - constructor(bones = [], boneInverses = []) { - this.uuid = generateUUID(); - this.bones = bones.slice(0); - this.boneInverses = boneInverses; - this.boneMatrices = null; - this.boneTexture = null; - this.boneTextureSize = 0; - this.frame = -1; - this.init(); - } - - init() { - const bones = this.bones; - const boneInverses = this.boneInverses; - this.boneMatrices = new Float32Array(bones.length * 16); // calculate inverse bone matrices if necessary - - if (boneInverses.length === 0) { - this.calculateInverses(); - } else { - // handle special case - if (bones.length !== boneInverses.length) { - console.warn('THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.'); - this.boneInverses = []; - - for (let i = 0, il = this.bones.length; i < il; i++) { - this.boneInverses.push(new Matrix4()); - } - } - } - } - - calculateInverses() { - this.boneInverses.length = 0; - - for (let i = 0, il = this.bones.length; i < il; i++) { - const inverse = new Matrix4(); - - if (this.bones[i]) { - inverse.copy(this.bones[i].matrixWorld).invert(); - } - - this.boneInverses.push(inverse); - } - } - - pose() { - // recover the bind-time world matrices - for (let i = 0, il = this.bones.length; i < il; i++) { - const bone = this.bones[i]; - - if (bone) { - bone.matrixWorld.copy(this.boneInverses[i]).invert(); - } - } // compute the local matrices, positions, rotations and scales - - - for (let i = 0, il = this.bones.length; i < il; i++) { - const bone = this.bones[i]; - - if (bone) { - if (bone.parent && bone.parent.isBone) { - bone.matrix.copy(bone.parent.matrixWorld).invert(); - bone.matrix.multiply(bone.matrixWorld); - } else { - bone.matrix.copy(bone.matrixWorld); - } - - bone.matrix.decompose(bone.position, bone.quaternion, bone.scale); - } - } - } - - update() { - const bones = this.bones; - const boneInverses = this.boneInverses; - const boneMatrices = this.boneMatrices; - const boneTexture = this.boneTexture; // flatten bone matrices to array - - for (let i = 0, il = bones.length; i < il; i++) { - // compute the offset between the current and the original transform - const matrix = bones[i] ? bones[i].matrixWorld : _identityMatrix; - - _offsetMatrix.multiplyMatrices(matrix, boneInverses[i]); - - _offsetMatrix.toArray(boneMatrices, i * 16); - } - - if (boneTexture !== null) { - boneTexture.needsUpdate = true; - } - } - - clone() { - return new Skeleton(this.bones, this.boneInverses); - } - - computeBoneTexture() { - // layout (1 matrix = 4 pixels) - // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4) - // with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8) - // 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16) - // 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32) - // 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64) - let size = Math.sqrt(this.bones.length * 4); // 4 pixels needed for 1 matrix - - size = ceilPowerOfTwo(size); - size = Math.max(size, 4); - const boneMatrices = new Float32Array(size * size * 4); // 4 floats per RGBA pixel - - boneMatrices.set(this.boneMatrices); // copy current values - - const boneTexture = new DataTexture(boneMatrices, size, size, RGBAFormat, FloatType); - this.boneMatrices = boneMatrices; - this.boneTexture = boneTexture; - this.boneTextureSize = size; - return this; - } - - getBoneByName(name) { - for (let i = 0, il = this.bones.length; i < il; i++) { - const bone = this.bones[i]; - - if (bone.name === name) { - return bone; - } - } - - return undefined; - } - - dispose() { - if (this.boneTexture !== null) { - this.boneTexture.dispose(); - this.boneTexture = null; - } - } - - fromJSON(json, bones) { - this.uuid = json.uuid; - - for (let i = 0, l = json.bones.length; i < l; i++) { - const uuid = json.bones[i]; - let bone = bones[uuid]; - - if (bone === undefined) { - console.warn('THREE.Skeleton: No bone found with UUID:', uuid); - bone = new Bone(); - } - - this.bones.push(bone); - this.boneInverses.push(new Matrix4().fromArray(json.boneInverses[i])); - } - - this.init(); - return this; - } - - toJSON() { - const data = { - metadata: { - version: 4.5, - type: 'Skeleton', - generator: 'Skeleton.toJSON' - }, - bones: [], - boneInverses: [] - }; - data.uuid = this.uuid; - const bones = this.bones; - const boneInverses = this.boneInverses; - - for (let i = 0, l = bones.length; i < l; i++) { - const bone = bones[i]; - data.bones.push(bone.uuid); - const boneInverse = boneInverses[i]; - data.boneInverses.push(boneInverse.toArray()); - } - - return data; - } - - } - - const _instanceLocalMatrix = /*@__PURE__*/new Matrix4(); - - const _instanceWorldMatrix = /*@__PURE__*/new Matrix4(); - - const _instanceIntersects = []; - - const _mesh = /*@__PURE__*/new Mesh(); - - class InstancedMesh extends Mesh { - constructor(geometry, material, count) { - super(geometry, material); - this.instanceMatrix = new BufferAttribute(new Float32Array(count * 16), 16); - this.instanceColor = null; - this.count = count; - this.frustumCulled = false; - } - - copy(source) { - super.copy(source); - this.instanceMatrix.copy(source.instanceMatrix); - if (source.instanceColor !== null) this.instanceColor = source.instanceColor.clone(); - this.count = source.count; - return this; - } - - getColorAt(index, color) { - color.fromArray(this.instanceColor.array, index * 3); - } - - getMatrixAt(index, matrix) { - matrix.fromArray(this.instanceMatrix.array, index * 16); - } - - raycast(raycaster, intersects) { - const matrixWorld = this.matrixWorld; - const raycastTimes = this.count; - _mesh.geometry = this.geometry; - _mesh.material = this.material; - if (_mesh.material === undefined) return; - - for (let instanceId = 0; instanceId < raycastTimes; instanceId++) { - // calculate the world matrix for each instance - this.getMatrixAt(instanceId, _instanceLocalMatrix); - - _instanceWorldMatrix.multiplyMatrices(matrixWorld, _instanceLocalMatrix); // the mesh represents this single instance - - - _mesh.matrixWorld = _instanceWorldMatrix; - - _mesh.raycast(raycaster, _instanceIntersects); // process the result of raycast - - - for (let i = 0, l = _instanceIntersects.length; i < l; i++) { - const intersect = _instanceIntersects[i]; - intersect.instanceId = instanceId; - intersect.object = this; - intersects.push(intersect); - } - - _instanceIntersects.length = 0; - } - } - - setColorAt(index, color) { - if (this.instanceColor === null) { - this.instanceColor = new BufferAttribute(new Float32Array(this.count * 3), 3); - } - - color.toArray(this.instanceColor.array, index * 3); - } - - setMatrixAt(index, matrix) { - matrix.toArray(this.instanceMatrix.array, index * 16); - } - - updateMorphTargets() {} - - dispose() { - this.dispatchEvent({ - type: 'dispose' - }); - } - - } - - InstancedMesh.prototype.isInstancedMesh = true; - - /** - * parameters = { - * color: , - * opacity: , - * - * linewidth: , - * linecap: "round", - * linejoin: "round" - * } - */ - - class LineBasicMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'LineBasicMaterial'; - this.color = new Color(0xffffff); - this.linewidth = 1; - this.linecap = 'round'; - this.linejoin = 'round'; - this.morphTargets = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - this.linewidth = source.linewidth; - this.linecap = source.linecap; - this.linejoin = source.linejoin; - this.morphTargets = source.morphTargets; - return this; - } - - } - - LineBasicMaterial.prototype.isLineBasicMaterial = true; - - const _start$1 = /*@__PURE__*/new Vector3(); - - const _end$1 = /*@__PURE__*/new Vector3(); - - const _inverseMatrix$1 = /*@__PURE__*/new Matrix4(); - - const _ray$1 = /*@__PURE__*/new Ray(); - - const _sphere$1 = /*@__PURE__*/new Sphere(); - - class Line extends Object3D { - constructor(geometry = new BufferGeometry(), material = new LineBasicMaterial()) { - super(); - this.type = 'Line'; - this.geometry = geometry; - this.material = material; - this.updateMorphTargets(); - } - - copy(source) { - super.copy(source); - this.material = source.material; - this.geometry = source.geometry; - return this; - } - - computeLineDistances() { - const geometry = this.geometry; - - if (geometry.isBufferGeometry) { - // we assume non-indexed geometry - if (geometry.index === null) { - const positionAttribute = geometry.attributes.position; - const lineDistances = [0]; - - for (let i = 1, l = positionAttribute.count; i < l; i++) { - _start$1.fromBufferAttribute(positionAttribute, i - 1); - - _end$1.fromBufferAttribute(positionAttribute, i); - - lineDistances[i] = lineDistances[i - 1]; - lineDistances[i] += _start$1.distanceTo(_end$1); - } - - geometry.setAttribute('lineDistance', new Float32BufferAttribute(lineDistances, 1)); - } else { - console.warn('THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.'); - } - } else if (geometry.isGeometry) { - console.error('THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.'); - } - - return this; - } - - raycast(raycaster, intersects) { - const geometry = this.geometry; - const matrixWorld = this.matrixWorld; - const threshold = raycaster.params.Line.threshold; - const drawRange = geometry.drawRange; // Checking boundingSphere distance to ray - - if (geometry.boundingSphere === null) geometry.computeBoundingSphere(); - - _sphere$1.copy(geometry.boundingSphere); - - _sphere$1.applyMatrix4(matrixWorld); - - _sphere$1.radius += threshold; - if (raycaster.ray.intersectsSphere(_sphere$1) === false) return; // - - _inverseMatrix$1.copy(matrixWorld).invert(); - - _ray$1.copy(raycaster.ray).applyMatrix4(_inverseMatrix$1); - - const localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3); - const localThresholdSq = localThreshold * localThreshold; - const vStart = new Vector3(); - const vEnd = new Vector3(); - const interSegment = new Vector3(); - const interRay = new Vector3(); - const step = this.isLineSegments ? 2 : 1; - - if (geometry.isBufferGeometry) { - const index = geometry.index; - const attributes = geometry.attributes; - const positionAttribute = attributes.position; - - if (index !== null) { - const start = Math.max(0, drawRange.start); - const end = Math.min(index.count, drawRange.start + drawRange.count); - - for (let i = start, l = end - 1; i < l; i += step) { - const a = index.getX(i); - const b = index.getX(i + 1); - vStart.fromBufferAttribute(positionAttribute, a); - vEnd.fromBufferAttribute(positionAttribute, b); - - const distSq = _ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment); - - if (distSq > localThresholdSq) continue; - interRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation - - const distance = raycaster.ray.origin.distanceTo(interRay); - if (distance < raycaster.near || distance > raycaster.far) continue; - intersects.push({ - distance: distance, - // What do we want? intersection point on the ray or on the segment?? - // point: raycaster.ray.at( distance ), - point: interSegment.clone().applyMatrix4(this.matrixWorld), - index: i, - face: null, - faceIndex: null, - object: this - }); - } - } else { - const start = Math.max(0, drawRange.start); - const end = Math.min(positionAttribute.count, drawRange.start + drawRange.count); - - for (let i = start, l = end - 1; i < l; i += step) { - vStart.fromBufferAttribute(positionAttribute, i); - vEnd.fromBufferAttribute(positionAttribute, i + 1); - - const distSq = _ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment); - - if (distSq > localThresholdSq) continue; - interRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation - - const distance = raycaster.ray.origin.distanceTo(interRay); - if (distance < raycaster.near || distance > raycaster.far) continue; - intersects.push({ - distance: distance, - // What do we want? intersection point on the ray or on the segment?? - // point: raycaster.ray.at( distance ), - point: interSegment.clone().applyMatrix4(this.matrixWorld), - index: i, - face: null, - faceIndex: null, - object: this - }); - } - } - } else if (geometry.isGeometry) { - console.error('THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.'); - } - } - - updateMorphTargets() { - const geometry = this.geometry; - - if (geometry.isBufferGeometry) { - const morphAttributes = geometry.morphAttributes; - const keys = Object.keys(morphAttributes); - - if (keys.length > 0) { - const morphAttribute = morphAttributes[keys[0]]; - - if (morphAttribute !== undefined) { - this.morphTargetInfluences = []; - this.morphTargetDictionary = {}; - - for (let m = 0, ml = morphAttribute.length; m < ml; m++) { - const name = morphAttribute[m].name || String(m); - this.morphTargetInfluences.push(0); - this.morphTargetDictionary[name] = m; - } - } - } - } else { - const morphTargets = geometry.morphTargets; - - if (morphTargets !== undefined && morphTargets.length > 0) { - console.error('THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.'); - } - } - } - - } - - Line.prototype.isLine = true; - - const _start = /*@__PURE__*/new Vector3(); - - const _end = /*@__PURE__*/new Vector3(); - - class LineSegments extends Line { - constructor(geometry, material) { - super(geometry, material); - this.type = 'LineSegments'; - } - - computeLineDistances() { - const geometry = this.geometry; - - if (geometry.isBufferGeometry) { - // we assume non-indexed geometry - if (geometry.index === null) { - const positionAttribute = geometry.attributes.position; - const lineDistances = []; - - for (let i = 0, l = positionAttribute.count; i < l; i += 2) { - _start.fromBufferAttribute(positionAttribute, i); - - _end.fromBufferAttribute(positionAttribute, i + 1); - - lineDistances[i] = i === 0 ? 0 : lineDistances[i - 1]; - lineDistances[i + 1] = lineDistances[i] + _start.distanceTo(_end); - } - - geometry.setAttribute('lineDistance', new Float32BufferAttribute(lineDistances, 1)); - } else { - console.warn('THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.'); - } - } else if (geometry.isGeometry) { - console.error('THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.'); - } - - return this; - } - - } - - LineSegments.prototype.isLineSegments = true; - - class LineLoop extends Line { - constructor(geometry, material) { - super(geometry, material); - this.type = 'LineLoop'; - } - - } - - LineLoop.prototype.isLineLoop = true; - - /** - * parameters = { - * color: , - * opacity: , - * map: new THREE.Texture( ), - * alphaMap: new THREE.Texture( ), - * - * size: , - * sizeAttenuation: - * - * morphTargets: - * } - */ - - class PointsMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'PointsMaterial'; - this.color = new Color(0xffffff); - this.map = null; - this.alphaMap = null; - this.size = 1; - this.sizeAttenuation = true; - this.morphTargets = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - this.map = source.map; - this.alphaMap = source.alphaMap; - this.size = source.size; - this.sizeAttenuation = source.sizeAttenuation; - this.morphTargets = source.morphTargets; - return this; - } - - } - - PointsMaterial.prototype.isPointsMaterial = true; - - const _inverseMatrix = /*@__PURE__*/new Matrix4(); - - const _ray = /*@__PURE__*/new Ray(); - - const _sphere = /*@__PURE__*/new Sphere(); - - const _position$2 = /*@__PURE__*/new Vector3(); - - class Points extends Object3D { - constructor(geometry = new BufferGeometry(), material = new PointsMaterial()) { - super(); - this.type = 'Points'; - this.geometry = geometry; - this.material = material; - this.updateMorphTargets(); - } - - copy(source) { - super.copy(source); - this.material = source.material; - this.geometry = source.geometry; - return this; - } - - raycast(raycaster, intersects) { - const geometry = this.geometry; - const matrixWorld = this.matrixWorld; - const threshold = raycaster.params.Points.threshold; - const drawRange = geometry.drawRange; // Checking boundingSphere distance to ray - - if (geometry.boundingSphere === null) geometry.computeBoundingSphere(); - - _sphere.copy(geometry.boundingSphere); - - _sphere.applyMatrix4(matrixWorld); - - _sphere.radius += threshold; - if (raycaster.ray.intersectsSphere(_sphere) === false) return; // - - _inverseMatrix.copy(matrixWorld).invert(); - - _ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix); - - const localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3); - const localThresholdSq = localThreshold * localThreshold; - - if (geometry.isBufferGeometry) { - const index = geometry.index; - const attributes = geometry.attributes; - const positionAttribute = attributes.position; - - if (index !== null) { - const start = Math.max(0, drawRange.start); - const end = Math.min(index.count, drawRange.start + drawRange.count); - - for (let i = start, il = end; i < il; i++) { - const a = index.getX(i); - - _position$2.fromBufferAttribute(positionAttribute, a); - - testPoint(_position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this); - } - } else { - const start = Math.max(0, drawRange.start); - const end = Math.min(positionAttribute.count, drawRange.start + drawRange.count); - - for (let i = start, l = end; i < l; i++) { - _position$2.fromBufferAttribute(positionAttribute, i); - - testPoint(_position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this); - } - } - } else { - console.error('THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.'); - } - } - - updateMorphTargets() { - const geometry = this.geometry; - - if (geometry.isBufferGeometry) { - const morphAttributes = geometry.morphAttributes; - const keys = Object.keys(morphAttributes); - - if (keys.length > 0) { - const morphAttribute = morphAttributes[keys[0]]; - - if (morphAttribute !== undefined) { - this.morphTargetInfluences = []; - this.morphTargetDictionary = {}; - - for (let m = 0, ml = morphAttribute.length; m < ml; m++) { - const name = morphAttribute[m].name || String(m); - this.morphTargetInfluences.push(0); - this.morphTargetDictionary[name] = m; - } - } - } - } else { - const morphTargets = geometry.morphTargets; - - if (morphTargets !== undefined && morphTargets.length > 0) { - console.error('THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.'); - } - } - } - - } - - Points.prototype.isPoints = true; - - function testPoint(point, index, localThresholdSq, matrixWorld, raycaster, intersects, object) { - const rayPointDistanceSq = _ray.distanceSqToPoint(point); - - if (rayPointDistanceSq < localThresholdSq) { - const intersectPoint = new Vector3(); - - _ray.closestPointToPoint(point, intersectPoint); - - intersectPoint.applyMatrix4(matrixWorld); - const distance = raycaster.ray.origin.distanceTo(intersectPoint); - if (distance < raycaster.near || distance > raycaster.far) return; - intersects.push({ - distance: distance, - distanceToRay: Math.sqrt(rayPointDistanceSq), - point: intersectPoint, - index: index, - face: null, - object: object - }); - } - } - - class VideoTexture extends Texture { - constructor(video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy) { - super(video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy); - this.format = format !== undefined ? format : RGBFormat; - this.minFilter = minFilter !== undefined ? minFilter : LinearFilter; - this.magFilter = magFilter !== undefined ? magFilter : LinearFilter; - this.generateMipmaps = false; - const scope = this; - - function updateVideo() { - scope.needsUpdate = true; - video.requestVideoFrameCallback(updateVideo); - } - - if ('requestVideoFrameCallback' in video) { - video.requestVideoFrameCallback(updateVideo); - } - } - - clone() { - return new this.constructor(this.image).copy(this); - } - - update() { - const video = this.image; - const hasVideoFrameCallback = ('requestVideoFrameCallback' in video); - - if (hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA) { - this.needsUpdate = true; - } - } - - } - - VideoTexture.prototype.isVideoTexture = true; - - class CompressedTexture extends Texture { - constructor(mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding) { - super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding); - this.image = { - width: width, - height: height - }; - this.mipmaps = mipmaps; // no flipping for cube textures - // (also flipping doesn't work for compressed textures ) - - this.flipY = false; // can't generate mipmaps for compressed textures - // mips must be embedded in DDS files - - this.generateMipmaps = false; - } - - } - - CompressedTexture.prototype.isCompressedTexture = true; - - class CanvasTexture extends Texture { - constructor(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy) { - super(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy); - this.needsUpdate = true; - } - - } - - CanvasTexture.prototype.isCanvasTexture = true; - - class DepthTexture extends Texture { - constructor(width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format) { - format = format !== undefined ? format : DepthFormat; - - if (format !== DepthFormat && format !== DepthStencilFormat) { - throw new Error('DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat'); - } - - if (type === undefined && format === DepthFormat) type = UnsignedShortType; - if (type === undefined && format === DepthStencilFormat) type = UnsignedInt248Type; - super(null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy); - this.image = { - width: width, - height: height - }; - this.magFilter = magFilter !== undefined ? magFilter : NearestFilter; - this.minFilter = minFilter !== undefined ? minFilter : NearestFilter; - this.flipY = false; - this.generateMipmaps = false; - } - - } - - DepthTexture.prototype.isDepthTexture = true; - - class CircleGeometry extends BufferGeometry { - constructor(radius = 1, segments = 8, thetaStart = 0, thetaLength = Math.PI * 2) { - super(); - this.type = 'CircleGeometry'; - this.parameters = { - radius: radius, - segments: segments, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - segments = Math.max(3, segments); // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; // helper variables - - const vertex = new Vector3(); - const uv = new Vector2(); // center point - - vertices.push(0, 0, 0); - normals.push(0, 0, 1); - uvs.push(0.5, 0.5); - - for (let s = 0, i = 3; s <= segments; s++, i += 3) { - const segment = thetaStart + s / segments * thetaLength; // vertex - - vertex.x = radius * Math.cos(segment); - vertex.y = radius * Math.sin(segment); - vertices.push(vertex.x, vertex.y, vertex.z); // normal - - normals.push(0, 0, 1); // uvs - - uv.x = (vertices[i] / radius + 1) / 2; - uv.y = (vertices[i + 1] / radius + 1) / 2; - uvs.push(uv.x, uv.y); - } // indices - - - for (let i = 1; i <= segments; i++) { - indices.push(i, i + 1, 0); - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); - } - - static fromJSON(data) { - return new CircleGeometry(data.radius, data.segments, data.thetaStart, data.thetaLength); - } - - } - - class CylinderGeometry extends BufferGeometry { - constructor(radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2) { - super(); - this.type = 'CylinderGeometry'; - this.parameters = { - radiusTop: radiusTop, - radiusBottom: radiusBottom, - height: height, - radialSegments: radialSegments, - heightSegments: heightSegments, - openEnded: openEnded, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - const scope = this; - radialSegments = Math.floor(radialSegments); - heightSegments = Math.floor(heightSegments); // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; // helper variables - - let index = 0; - const indexArray = []; - const halfHeight = height / 2; - let groupStart = 0; // generate geometry - - generateTorso(); - - if (openEnded === false) { - if (radiusTop > 0) generateCap(true); - if (radiusBottom > 0) generateCap(false); - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); - - function generateTorso() { - const normal = new Vector3(); - const vertex = new Vector3(); - let groupCount = 0; // this will be used to calculate the normal - - const slope = (radiusBottom - radiusTop) / height; // generate vertices, normals and uvs - - for (let y = 0; y <= heightSegments; y++) { - const indexRow = []; - const v = y / heightSegments; // calculate the radius of the current row - - const radius = v * (radiusBottom - radiusTop) + radiusTop; - - for (let x = 0; x <= radialSegments; x++) { - const u = x / radialSegments; - const theta = u * thetaLength + thetaStart; - const sinTheta = Math.sin(theta); - const cosTheta = Math.cos(theta); // vertex - - vertex.x = radius * sinTheta; - vertex.y = -v * height + halfHeight; - vertex.z = radius * cosTheta; - vertices.push(vertex.x, vertex.y, vertex.z); // normal - - normal.set(sinTheta, slope, cosTheta).normalize(); - normals.push(normal.x, normal.y, normal.z); // uv - - uvs.push(u, 1 - v); // save index of vertex in respective row - - indexRow.push(index++); - } // now save vertices of the row in our index array - - - indexArray.push(indexRow); - } // generate indices - - - for (let x = 0; x < radialSegments; x++) { - for (let y = 0; y < heightSegments; y++) { - // we use the index array to access the correct indices - const a = indexArray[y][x]; - const b = indexArray[y + 1][x]; - const c = indexArray[y + 1][x + 1]; - const d = indexArray[y][x + 1]; // faces - - indices.push(a, b, d); - indices.push(b, c, d); // update group counter - - groupCount += 6; - } - } // add a group to the geometry. this will ensure multi material support - - - scope.addGroup(groupStart, groupCount, 0); // calculate new start value for groups - - groupStart += groupCount; - } - - function generateCap(top) { - // save the index of the first center vertex - const centerIndexStart = index; - const uv = new Vector2(); - const vertex = new Vector3(); - let groupCount = 0; - const radius = top === true ? radiusTop : radiusBottom; - const sign = top === true ? 1 : -1; // first we generate the center vertex data of the cap. - // because the geometry needs one set of uvs per face, - // we must generate a center vertex per face/segment - - for (let x = 1; x <= radialSegments; x++) { - // vertex - vertices.push(0, halfHeight * sign, 0); // normal - - normals.push(0, sign, 0); // uv - - uvs.push(0.5, 0.5); // increase index - - index++; - } // save the index of the last center vertex - - - const centerIndexEnd = index; // now we generate the surrounding vertices, normals and uvs - - for (let x = 0; x <= radialSegments; x++) { - const u = x / radialSegments; - const theta = u * thetaLength + thetaStart; - const cosTheta = Math.cos(theta); - const sinTheta = Math.sin(theta); // vertex - - vertex.x = radius * sinTheta; - vertex.y = halfHeight * sign; - vertex.z = radius * cosTheta; - vertices.push(vertex.x, vertex.y, vertex.z); // normal - - normals.push(0, sign, 0); // uv - - uv.x = cosTheta * 0.5 + 0.5; - uv.y = sinTheta * 0.5 * sign + 0.5; - uvs.push(uv.x, uv.y); // increase index - - index++; - } // generate indices - - - for (let x = 0; x < radialSegments; x++) { - const c = centerIndexStart + x; - const i = centerIndexEnd + x; - - if (top === true) { - // face top - indices.push(i, i + 1, c); - } else { - // face bottom - indices.push(i + 1, i, c); - } - - groupCount += 3; - } // add a group to the geometry. this will ensure multi material support - - - scope.addGroup(groupStart, groupCount, top === true ? 1 : 2); // calculate new start value for groups - - groupStart += groupCount; - } - } - - static fromJSON(data) { - return new CylinderGeometry(data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength); - } - - } - - class ConeGeometry extends CylinderGeometry { - constructor(radius = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2) { - super(0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength); - this.type = 'ConeGeometry'; - this.parameters = { - radius: radius, - height: height, - radialSegments: radialSegments, - heightSegments: heightSegments, - openEnded: openEnded, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - } - - static fromJSON(data) { - return new ConeGeometry(data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength); - } - - } - - class PolyhedronGeometry extends BufferGeometry { - constructor(vertices, indices, radius = 1, detail = 0) { - super(); - this.type = 'PolyhedronGeometry'; - this.parameters = { - vertices: vertices, - indices: indices, - radius: radius, - detail: detail - }; // default buffer data - - const vertexBuffer = []; - const uvBuffer = []; // the subdivision creates the vertex buffer data - - subdivide(detail); // all vertices should lie on a conceptual sphere with a given radius - - applyRadius(radius); // finally, create the uv data - - generateUVs(); // build non-indexed geometry - - this.setAttribute('position', new Float32BufferAttribute(vertexBuffer, 3)); - this.setAttribute('normal', new Float32BufferAttribute(vertexBuffer.slice(), 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvBuffer, 2)); - - if (detail === 0) { - this.computeVertexNormals(); // flat normals - } else { - this.normalizeNormals(); // smooth normals - } // helper functions - - - function subdivide(detail) { - const a = new Vector3(); - const b = new Vector3(); - const c = new Vector3(); // iterate over all faces and apply a subdivison with the given detail value - - for (let i = 0; i < indices.length; i += 3) { - // get the vertices of the face - getVertexByIndex(indices[i + 0], a); - getVertexByIndex(indices[i + 1], b); - getVertexByIndex(indices[i + 2], c); // perform subdivision - - subdivideFace(a, b, c, detail); - } - } - - function subdivideFace(a, b, c, detail) { - const cols = detail + 1; // we use this multidimensional array as a data structure for creating the subdivision - - const v = []; // construct all of the vertices for this subdivision - - for (let i = 0; i <= cols; i++) { - v[i] = []; - const aj = a.clone().lerp(c, i / cols); - const bj = b.clone().lerp(c, i / cols); - const rows = cols - i; - - for (let j = 0; j <= rows; j++) { - if (j === 0 && i === cols) { - v[i][j] = aj; - } else { - v[i][j] = aj.clone().lerp(bj, j / rows); - } - } - } // construct all of the faces - - - for (let i = 0; i < cols; i++) { - for (let j = 0; j < 2 * (cols - i) - 1; j++) { - const k = Math.floor(j / 2); - - if (j % 2 === 0) { - pushVertex(v[i][k + 1]); - pushVertex(v[i + 1][k]); - pushVertex(v[i][k]); - } else { - pushVertex(v[i][k + 1]); - pushVertex(v[i + 1][k + 1]); - pushVertex(v[i + 1][k]); - } - } - } - } - - function applyRadius(radius) { - const vertex = new Vector3(); // iterate over the entire buffer and apply the radius to each vertex - - for (let i = 0; i < vertexBuffer.length; i += 3) { - vertex.x = vertexBuffer[i + 0]; - vertex.y = vertexBuffer[i + 1]; - vertex.z = vertexBuffer[i + 2]; - vertex.normalize().multiplyScalar(radius); - vertexBuffer[i + 0] = vertex.x; - vertexBuffer[i + 1] = vertex.y; - vertexBuffer[i + 2] = vertex.z; - } - } - - function generateUVs() { - const vertex = new Vector3(); - - for (let i = 0; i < vertexBuffer.length; i += 3) { - vertex.x = vertexBuffer[i + 0]; - vertex.y = vertexBuffer[i + 1]; - vertex.z = vertexBuffer[i + 2]; - const u = azimuth(vertex) / 2 / Math.PI + 0.5; - const v = inclination(vertex) / Math.PI + 0.5; - uvBuffer.push(u, 1 - v); - } - - correctUVs(); - correctSeam(); - } - - function correctSeam() { - // handle case when face straddles the seam, see #3269 - for (let i = 0; i < uvBuffer.length; i += 6) { - // uv data of a single face - const x0 = uvBuffer[i + 0]; - const x1 = uvBuffer[i + 2]; - const x2 = uvBuffer[i + 4]; - const max = Math.max(x0, x1, x2); - const min = Math.min(x0, x1, x2); // 0.9 is somewhat arbitrary - - if (max > 0.9 && min < 0.1) { - if (x0 < 0.2) uvBuffer[i + 0] += 1; - if (x1 < 0.2) uvBuffer[i + 2] += 1; - if (x2 < 0.2) uvBuffer[i + 4] += 1; - } - } - } - - function pushVertex(vertex) { - vertexBuffer.push(vertex.x, vertex.y, vertex.z); - } - - function getVertexByIndex(index, vertex) { - const stride = index * 3; - vertex.x = vertices[stride + 0]; - vertex.y = vertices[stride + 1]; - vertex.z = vertices[stride + 2]; - } - - function correctUVs() { - const a = new Vector3(); - const b = new Vector3(); - const c = new Vector3(); - const centroid = new Vector3(); - const uvA = new Vector2(); - const uvB = new Vector2(); - const uvC = new Vector2(); - - for (let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6) { - a.set(vertexBuffer[i + 0], vertexBuffer[i + 1], vertexBuffer[i + 2]); - b.set(vertexBuffer[i + 3], vertexBuffer[i + 4], vertexBuffer[i + 5]); - c.set(vertexBuffer[i + 6], vertexBuffer[i + 7], vertexBuffer[i + 8]); - uvA.set(uvBuffer[j + 0], uvBuffer[j + 1]); - uvB.set(uvBuffer[j + 2], uvBuffer[j + 3]); - uvC.set(uvBuffer[j + 4], uvBuffer[j + 5]); - centroid.copy(a).add(b).add(c).divideScalar(3); - const azi = azimuth(centroid); - correctUV(uvA, j + 0, a, azi); - correctUV(uvB, j + 2, b, azi); - correctUV(uvC, j + 4, c, azi); - } - } - - function correctUV(uv, stride, vector, azimuth) { - if (azimuth < 0 && uv.x === 1) { - uvBuffer[stride] = uv.x - 1; - } - - if (vector.x === 0 && vector.z === 0) { - uvBuffer[stride] = azimuth / 2 / Math.PI + 0.5; - } - } // Angle around the Y axis, counter-clockwise when looking from above. - - - function azimuth(vector) { - return Math.atan2(vector.z, -vector.x); - } // Angle above the XZ plane. - - - function inclination(vector) { - return Math.atan2(-vector.y, Math.sqrt(vector.x * vector.x + vector.z * vector.z)); - } - } - - static fromJSON(data) { - return new PolyhedronGeometry(data.vertices, data.indices, data.radius, data.details); - } - - } - - class DodecahedronGeometry extends PolyhedronGeometry { - constructor(radius = 1, detail = 0) { - const t = (1 + Math.sqrt(5)) / 2; - const r = 1 / t; - const vertices = [// (±1, ±1, ±1) - -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, // (0, ±1/φ, ±φ) - 0, -r, -t, 0, -r, t, 0, r, -t, 0, r, t, // (±1/φ, ±φ, 0) - -r, -t, 0, -r, t, 0, r, -t, 0, r, t, 0, // (±φ, 0, ±1/φ) - -t, 0, -r, t, 0, -r, -t, 0, r, t, 0, r]; - const indices = [3, 11, 7, 3, 7, 15, 3, 15, 13, 7, 19, 17, 7, 17, 6, 7, 6, 15, 17, 4, 8, 17, 8, 10, 17, 10, 6, 8, 0, 16, 8, 16, 2, 8, 2, 10, 0, 12, 1, 0, 1, 18, 0, 18, 16, 6, 10, 2, 6, 2, 13, 6, 13, 15, 2, 16, 18, 2, 18, 3, 2, 3, 13, 18, 1, 9, 18, 9, 11, 18, 11, 3, 4, 14, 12, 4, 12, 0, 4, 0, 8, 11, 9, 5, 11, 5, 19, 11, 19, 7, 19, 5, 14, 19, 14, 4, 19, 4, 17, 1, 12, 14, 1, 14, 5, 1, 5, 9]; - super(vertices, indices, radius, detail); - this.type = 'DodecahedronGeometry'; - this.parameters = { - radius: radius, - detail: detail - }; - } - - static fromJSON(data) { - return new DodecahedronGeometry(data.radius, data.detail); - } - - } - - const _v0 = new Vector3(); - - const _v1$1 = new Vector3(); - - const _normal = new Vector3(); - - const _triangle = new Triangle(); - - class EdgesGeometry extends BufferGeometry { - constructor(geometry, thresholdAngle) { - super(); - this.type = 'EdgesGeometry'; - this.parameters = { - thresholdAngle: thresholdAngle - }; - thresholdAngle = thresholdAngle !== undefined ? thresholdAngle : 1; - - if (geometry.isGeometry === true) { - console.error('THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.'); - return; - } - - const precisionPoints = 4; - const precision = Math.pow(10, precisionPoints); - const thresholdDot = Math.cos(DEG2RAD * thresholdAngle); - const indexAttr = geometry.getIndex(); - const positionAttr = geometry.getAttribute('position'); - const indexCount = indexAttr ? indexAttr.count : positionAttr.count; - const indexArr = [0, 0, 0]; - const vertKeys = ['a', 'b', 'c']; - const hashes = new Array(3); - const edgeData = {}; - const vertices = []; - - for (let i = 0; i < indexCount; i += 3) { - if (indexAttr) { - indexArr[0] = indexAttr.getX(i); - indexArr[1] = indexAttr.getX(i + 1); - indexArr[2] = indexAttr.getX(i + 2); - } else { - indexArr[0] = i; - indexArr[1] = i + 1; - indexArr[2] = i + 2; - } - - const { - a, - b, - c - } = _triangle; - a.fromBufferAttribute(positionAttr, indexArr[0]); - b.fromBufferAttribute(positionAttr, indexArr[1]); - c.fromBufferAttribute(positionAttr, indexArr[2]); - - _triangle.getNormal(_normal); // create hashes for the edge from the vertices - - - hashes[0] = `${Math.round(a.x * precision)},${Math.round(a.y * precision)},${Math.round(a.z * precision)}`; - hashes[1] = `${Math.round(b.x * precision)},${Math.round(b.y * precision)},${Math.round(b.z * precision)}`; - hashes[2] = `${Math.round(c.x * precision)},${Math.round(c.y * precision)},${Math.round(c.z * precision)}`; // skip degenerate triangles - - if (hashes[0] === hashes[1] || hashes[1] === hashes[2] || hashes[2] === hashes[0]) { - continue; - } // iterate over every edge - - - for (let j = 0; j < 3; j++) { - // get the first and next vertex making up the edge - const jNext = (j + 1) % 3; - const vecHash0 = hashes[j]; - const vecHash1 = hashes[jNext]; - const v0 = _triangle[vertKeys[j]]; - const v1 = _triangle[vertKeys[jNext]]; - const hash = `${vecHash0}_${vecHash1}`; - const reverseHash = `${vecHash1}_${vecHash0}`; - - if (reverseHash in edgeData && edgeData[reverseHash]) { - // if we found a sibling edge add it into the vertex array if - // it meets the angle threshold and delete the edge from the map. - if (_normal.dot(edgeData[reverseHash].normal) <= thresholdDot) { - vertices.push(v0.x, v0.y, v0.z); - vertices.push(v1.x, v1.y, v1.z); - } - - edgeData[reverseHash] = null; - } else if (!(hash in edgeData)) { - // if we've already got an edge here then skip adding a new one - edgeData[hash] = { - index0: indexArr[j], - index1: indexArr[jNext], - normal: _normal.clone() - }; - } - } - } // iterate over all remaining, unmatched edges and add them to the vertex array - - - for (const key in edgeData) { - if (edgeData[key]) { - const { - index0, - index1 - } = edgeData[key]; - - _v0.fromBufferAttribute(positionAttr, index0); - - _v1$1.fromBufferAttribute(positionAttr, index1); - - vertices.push(_v0.x, _v0.y, _v0.z); - vertices.push(_v1$1.x, _v1$1.y, _v1$1.z); - } - } - - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - } - - } - - /** - * Extensible curve object. - * - * Some common of curve methods: - * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget ) - * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget ) - * .getPoints(), .getSpacedPoints() - * .getLength() - * .updateArcLengths() - * - * This following curves inherit from THREE.Curve: - * - * -- 2D curves -- - * THREE.ArcCurve - * THREE.CubicBezierCurve - * THREE.EllipseCurve - * THREE.LineCurve - * THREE.QuadraticBezierCurve - * THREE.SplineCurve - * - * -- 3D curves -- - * THREE.CatmullRomCurve3 - * THREE.CubicBezierCurve3 - * THREE.LineCurve3 - * THREE.QuadraticBezierCurve3 - * - * A series of curves can be represented as a THREE.CurvePath. - * - **/ - - class Curve { - constructor() { - this.type = 'Curve'; - this.arcLengthDivisions = 200; - } // Virtual base class method to overwrite and implement in subclasses - // - t [0 .. 1] - - - getPoint() - /* t, optionalTarget */ - { - console.warn('THREE.Curve: .getPoint() not implemented.'); - return null; - } // Get point at relative position in curve according to arc length - // - u [0 .. 1] - - - getPointAt(u, optionalTarget) { - const t = this.getUtoTmapping(u); - return this.getPoint(t, optionalTarget); - } // Get sequence of points using getPoint( t ) - - - getPoints(divisions = 5) { - const points = []; - - for (let d = 0; d <= divisions; d++) { - points.push(this.getPoint(d / divisions)); - } - - return points; - } // Get sequence of points using getPointAt( u ) - - - getSpacedPoints(divisions = 5) { - const points = []; - - for (let d = 0; d <= divisions; d++) { - points.push(this.getPointAt(d / divisions)); - } - - return points; - } // Get total curve arc length - - - getLength() { - const lengths = this.getLengths(); - return lengths[lengths.length - 1]; - } // Get list of cumulative segment lengths - - - getLengths(divisions = this.arcLengthDivisions) { - if (this.cacheArcLengths && this.cacheArcLengths.length === divisions + 1 && !this.needsUpdate) { - return this.cacheArcLengths; - } - - this.needsUpdate = false; - const cache = []; - let current, - last = this.getPoint(0); - let sum = 0; - cache.push(0); - - for (let p = 1; p <= divisions; p++) { - current = this.getPoint(p / divisions); - sum += current.distanceTo(last); - cache.push(sum); - last = current; - } - - this.cacheArcLengths = cache; - return cache; // { sums: cache, sum: sum }; Sum is in the last element. - } - - updateArcLengths() { - this.needsUpdate = true; - this.getLengths(); - } // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant - - - getUtoTmapping(u, distance) { - const arcLengths = this.getLengths(); - let i = 0; - const il = arcLengths.length; - let targetArcLength; // The targeted u distance value to get - - if (distance) { - targetArcLength = distance; - } else { - targetArcLength = u * arcLengths[il - 1]; - } // binary search for the index with largest value smaller than target u distance - - - let low = 0, - high = il - 1, - comparison; - - while (low <= high) { - i = Math.floor(low + (high - low) / 2); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats - - comparison = arcLengths[i] - targetArcLength; - - if (comparison < 0) { - low = i + 1; - } else if (comparison > 0) { - high = i - 1; - } else { - high = i; - break; // DONE - } - } - - i = high; - - if (arcLengths[i] === targetArcLength) { - return i / (il - 1); - } // we could get finer grain at lengths, or use simple interpolation between two points - - - const lengthBefore = arcLengths[i]; - const lengthAfter = arcLengths[i + 1]; - const segmentLength = lengthAfter - lengthBefore; // determine where we are between the 'before' and 'after' points - - const segmentFraction = (targetArcLength - lengthBefore) / segmentLength; // add that fractional amount to t - - const t = (i + segmentFraction) / (il - 1); - return t; - } // Returns a unit vector tangent at t - // In case any sub curve does not implement its tangent derivation, - // 2 points a small delta apart will be used to find its gradient - // which seems to give a reasonable approximation - - - getTangent(t, optionalTarget) { - const delta = 0.0001; - let t1 = t - delta; - let t2 = t + delta; // Capping in case of danger - - if (t1 < 0) t1 = 0; - if (t2 > 1) t2 = 1; - const pt1 = this.getPoint(t1); - const pt2 = this.getPoint(t2); - const tangent = optionalTarget || (pt1.isVector2 ? new Vector2() : new Vector3()); - tangent.copy(pt2).sub(pt1).normalize(); - return tangent; - } - - getTangentAt(u, optionalTarget) { - const t = this.getUtoTmapping(u); - return this.getTangent(t, optionalTarget); - } - - computeFrenetFrames(segments, closed) { - // see http://www.cs.indiana.edu/pub/techreports/TR425.pdf - const normal = new Vector3(); - const tangents = []; - const normals = []; - const binormals = []; - const vec = new Vector3(); - const mat = new Matrix4(); // compute the tangent vectors for each segment on the curve - - for (let i = 0; i <= segments; i++) { - const u = i / segments; - tangents[i] = this.getTangentAt(u, new Vector3()); - tangents[i].normalize(); - } // select an initial normal vector perpendicular to the first tangent vector, - // and in the direction of the minimum tangent xyz component - - - normals[0] = new Vector3(); - binormals[0] = new Vector3(); - let min = Number.MAX_VALUE; - const tx = Math.abs(tangents[0].x); - const ty = Math.abs(tangents[0].y); - const tz = Math.abs(tangents[0].z); - - if (tx <= min) { - min = tx; - normal.set(1, 0, 0); - } - - if (ty <= min) { - min = ty; - normal.set(0, 1, 0); - } - - if (tz <= min) { - normal.set(0, 0, 1); - } - - vec.crossVectors(tangents[0], normal).normalize(); - normals[0].crossVectors(tangents[0], vec); - binormals[0].crossVectors(tangents[0], normals[0]); // compute the slowly-varying normal and binormal vectors for each segment on the curve - - for (let i = 1; i <= segments; i++) { - normals[i] = normals[i - 1].clone(); - binormals[i] = binormals[i - 1].clone(); - vec.crossVectors(tangents[i - 1], tangents[i]); - - if (vec.length() > Number.EPSILON) { - vec.normalize(); - const theta = Math.acos(clamp(tangents[i - 1].dot(tangents[i]), -1, 1)); // clamp for floating pt errors - - normals[i].applyMatrix4(mat.makeRotationAxis(vec, theta)); - } - - binormals[i].crossVectors(tangents[i], normals[i]); - } // if the curve is closed, postprocess the vectors so the first and last normal vectors are the same - - - if (closed === true) { - let theta = Math.acos(clamp(normals[0].dot(normals[segments]), -1, 1)); - theta /= segments; - - if (tangents[0].dot(vec.crossVectors(normals[0], normals[segments])) > 0) { - theta = -theta; - } - - for (let i = 1; i <= segments; i++) { - // twist a little... - normals[i].applyMatrix4(mat.makeRotationAxis(tangents[i], theta * i)); - binormals[i].crossVectors(tangents[i], normals[i]); - } - } - - return { - tangents: tangents, - normals: normals, - binormals: binormals - }; - } - - clone() { - return new this.constructor().copy(this); - } - - copy(source) { - this.arcLengthDivisions = source.arcLengthDivisions; - return this; - } - - toJSON() { - const data = { - metadata: { - version: 4.5, - type: 'Curve', - generator: 'Curve.toJSON' - } - }; - data.arcLengthDivisions = this.arcLengthDivisions; - data.type = this.type; - return data; - } - - fromJSON(json) { - this.arcLengthDivisions = json.arcLengthDivisions; - return this; - } - - } - - class EllipseCurve extends Curve { - constructor(aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0) { - super(); - this.type = 'EllipseCurve'; - this.aX = aX; - this.aY = aY; - this.xRadius = xRadius; - this.yRadius = yRadius; - this.aStartAngle = aStartAngle; - this.aEndAngle = aEndAngle; - this.aClockwise = aClockwise; - this.aRotation = aRotation; - } - - getPoint(t, optionalTarget) { - const point = optionalTarget || new Vector2(); - const twoPi = Math.PI * 2; - let deltaAngle = this.aEndAngle - this.aStartAngle; - const samePoints = Math.abs(deltaAngle) < Number.EPSILON; // ensures that deltaAngle is 0 .. 2 PI - - while (deltaAngle < 0) deltaAngle += twoPi; - - while (deltaAngle > twoPi) deltaAngle -= twoPi; - - if (deltaAngle < Number.EPSILON) { - if (samePoints) { - deltaAngle = 0; - } else { - deltaAngle = twoPi; - } - } - - if (this.aClockwise === true && !samePoints) { - if (deltaAngle === twoPi) { - deltaAngle = -twoPi; - } else { - deltaAngle = deltaAngle - twoPi; - } - } - - const angle = this.aStartAngle + t * deltaAngle; - let x = this.aX + this.xRadius * Math.cos(angle); - let y = this.aY + this.yRadius * Math.sin(angle); - - if (this.aRotation !== 0) { - const cos = Math.cos(this.aRotation); - const sin = Math.sin(this.aRotation); - const tx = x - this.aX; - const ty = y - this.aY; // Rotate the point about the center of the ellipse. - - x = tx * cos - ty * sin + this.aX; - y = tx * sin + ty * cos + this.aY; - } - - return point.set(x, y); - } - - copy(source) { - super.copy(source); - this.aX = source.aX; - this.aY = source.aY; - this.xRadius = source.xRadius; - this.yRadius = source.yRadius; - this.aStartAngle = source.aStartAngle; - this.aEndAngle = source.aEndAngle; - this.aClockwise = source.aClockwise; - this.aRotation = source.aRotation; - return this; - } - - toJSON() { - const data = super.toJSON(); - data.aX = this.aX; - data.aY = this.aY; - data.xRadius = this.xRadius; - data.yRadius = this.yRadius; - data.aStartAngle = this.aStartAngle; - data.aEndAngle = this.aEndAngle; - data.aClockwise = this.aClockwise; - data.aRotation = this.aRotation; - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.aX = json.aX; - this.aY = json.aY; - this.xRadius = json.xRadius; - this.yRadius = json.yRadius; - this.aStartAngle = json.aStartAngle; - this.aEndAngle = json.aEndAngle; - this.aClockwise = json.aClockwise; - this.aRotation = json.aRotation; - return this; - } - - } - - EllipseCurve.prototype.isEllipseCurve = true; - - class ArcCurve extends EllipseCurve { - constructor(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) { - super(aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise); - this.type = 'ArcCurve'; - } - - } - - ArcCurve.prototype.isArcCurve = true; - - /** - * Centripetal CatmullRom Curve - which is useful for avoiding - * cusps and self-intersections in non-uniform catmull rom curves. - * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf - * - * curve.type accepts centripetal(default), chordal and catmullrom - * curve.tension is used for catmullrom which defaults to 0.5 - */ - - /* - Based on an optimized c++ solution in - - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/ - - http://ideone.com/NoEbVM - - This CubicPoly class could be used for reusing some variables and calculations, - but for three.js curve use, it could be possible inlined and flatten into a single function call - which can be placed in CurveUtils. - */ - - function CubicPoly() { - let c0 = 0, - c1 = 0, - c2 = 0, - c3 = 0; - /* - * Compute coefficients for a cubic polynomial - * p(s) = c0 + c1*s + c2*s^2 + c3*s^3 - * such that - * p(0) = x0, p(1) = x1 - * and - * p'(0) = t0, p'(1) = t1. - */ - - function init(x0, x1, t0, t1) { - c0 = x0; - c1 = t0; - c2 = -3 * x0 + 3 * x1 - 2 * t0 - t1; - c3 = 2 * x0 - 2 * x1 + t0 + t1; - } - - return { - initCatmullRom: function (x0, x1, x2, x3, tension) { - init(x1, x2, tension * (x2 - x0), tension * (x3 - x1)); - }, - initNonuniformCatmullRom: function (x0, x1, x2, x3, dt0, dt1, dt2) { - // compute tangents when parameterized in [t1,t2] - let t1 = (x1 - x0) / dt0 - (x2 - x0) / (dt0 + dt1) + (x2 - x1) / dt1; - let t2 = (x2 - x1) / dt1 - (x3 - x1) / (dt1 + dt2) + (x3 - x2) / dt2; // rescale tangents for parametrization in [0,1] - - t1 *= dt1; - t2 *= dt1; - init(x1, x2, t1, t2); - }, - calc: function (t) { - const t2 = t * t; - const t3 = t2 * t; - return c0 + c1 * t + c2 * t2 + c3 * t3; - } - }; - } // - - - const tmp = new Vector3(); - const px = new CubicPoly(), - py = new CubicPoly(), - pz = new CubicPoly(); - - class CatmullRomCurve3 extends Curve { - constructor(points = [], closed = false, curveType = 'centripetal', tension = 0.5) { - super(); - this.type = 'CatmullRomCurve3'; - this.points = points; - this.closed = closed; - this.curveType = curveType; - this.tension = tension; - } - - getPoint(t, optionalTarget = new Vector3()) { - const point = optionalTarget; - const points = this.points; - const l = points.length; - const p = (l - (this.closed ? 0 : 1)) * t; - let intPoint = Math.floor(p); - let weight = p - intPoint; - - if (this.closed) { - intPoint += intPoint > 0 ? 0 : (Math.floor(Math.abs(intPoint) / l) + 1) * l; - } else if (weight === 0 && intPoint === l - 1) { - intPoint = l - 2; - weight = 1; - } - - let p0, p3; // 4 points (p1 & p2 defined below) - - if (this.closed || intPoint > 0) { - p0 = points[(intPoint - 1) % l]; - } else { - // extrapolate first point - tmp.subVectors(points[0], points[1]).add(points[0]); - p0 = tmp; - } - - const p1 = points[intPoint % l]; - const p2 = points[(intPoint + 1) % l]; - - if (this.closed || intPoint + 2 < l) { - p3 = points[(intPoint + 2) % l]; - } else { - // extrapolate last point - tmp.subVectors(points[l - 1], points[l - 2]).add(points[l - 1]); - p3 = tmp; - } - - if (this.curveType === 'centripetal' || this.curveType === 'chordal') { - // init Centripetal / Chordal Catmull-Rom - const pow = this.curveType === 'chordal' ? 0.5 : 0.25; - let dt0 = Math.pow(p0.distanceToSquared(p1), pow); - let dt1 = Math.pow(p1.distanceToSquared(p2), pow); - let dt2 = Math.pow(p2.distanceToSquared(p3), pow); // safety check for repeated points - - if (dt1 < 1e-4) dt1 = 1.0; - if (dt0 < 1e-4) dt0 = dt1; - if (dt2 < 1e-4) dt2 = dt1; - px.initNonuniformCatmullRom(p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2); - py.initNonuniformCatmullRom(p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2); - pz.initNonuniformCatmullRom(p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2); - } else if (this.curveType === 'catmullrom') { - px.initCatmullRom(p0.x, p1.x, p2.x, p3.x, this.tension); - py.initCatmullRom(p0.y, p1.y, p2.y, p3.y, this.tension); - pz.initCatmullRom(p0.z, p1.z, p2.z, p3.z, this.tension); - } - - point.set(px.calc(weight), py.calc(weight), pz.calc(weight)); - return point; - } - - copy(source) { - super.copy(source); - this.points = []; - - for (let i = 0, l = source.points.length; i < l; i++) { - const point = source.points[i]; - this.points.push(point.clone()); - } - - this.closed = source.closed; - this.curveType = source.curveType; - this.tension = source.tension; - return this; - } - - toJSON() { - const data = super.toJSON(); - data.points = []; - - for (let i = 0, l = this.points.length; i < l; i++) { - const point = this.points[i]; - data.points.push(point.toArray()); - } - - data.closed = this.closed; - data.curveType = this.curveType; - data.tension = this.tension; - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.points = []; - - for (let i = 0, l = json.points.length; i < l; i++) { - const point = json.points[i]; - this.points.push(new Vector3().fromArray(point)); - } - - this.closed = json.closed; - this.curveType = json.curveType; - this.tension = json.tension; - return this; - } - - } - - CatmullRomCurve3.prototype.isCatmullRomCurve3 = true; - - /** - * Bezier Curves formulas obtained from - * http://en.wikipedia.org/wiki/Bézier_curve - */ - function CatmullRom(t, p0, p1, p2, p3) { - const v0 = (p2 - p0) * 0.5; - const v1 = (p3 - p1) * 0.5; - const t2 = t * t; - const t3 = t * t2; - return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1; - } // - - - function QuadraticBezierP0(t, p) { - const k = 1 - t; - return k * k * p; - } - - function QuadraticBezierP1(t, p) { - return 2 * (1 - t) * t * p; - } - - function QuadraticBezierP2(t, p) { - return t * t * p; - } - - function QuadraticBezier(t, p0, p1, p2) { - return QuadraticBezierP0(t, p0) + QuadraticBezierP1(t, p1) + QuadraticBezierP2(t, p2); - } // - - - function CubicBezierP0(t, p) { - const k = 1 - t; - return k * k * k * p; - } - - function CubicBezierP1(t, p) { - const k = 1 - t; - return 3 * k * k * t * p; - } - - function CubicBezierP2(t, p) { - return 3 * (1 - t) * t * t * p; - } - - function CubicBezierP3(t, p) { - return t * t * t * p; - } - - function CubicBezier(t, p0, p1, p2, p3) { - return CubicBezierP0(t, p0) + CubicBezierP1(t, p1) + CubicBezierP2(t, p2) + CubicBezierP3(t, p3); - } - - class CubicBezierCurve extends Curve { - constructor(v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2()) { - super(); - this.type = 'CubicBezierCurve'; - this.v0 = v0; - this.v1 = v1; - this.v2 = v2; - this.v3 = v3; - } - - getPoint(t, optionalTarget = new Vector2()) { - const point = optionalTarget; - const v0 = this.v0, - v1 = this.v1, - v2 = this.v2, - v3 = this.v3; - point.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y)); - return point; - } - - copy(source) { - super.copy(source); - this.v0.copy(source.v0); - this.v1.copy(source.v1); - this.v2.copy(source.v2); - this.v3.copy(source.v3); - return this; - } - - toJSON() { - const data = super.toJSON(); - data.v0 = this.v0.toArray(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - data.v3 = this.v3.toArray(); - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.v0.fromArray(json.v0); - this.v1.fromArray(json.v1); - this.v2.fromArray(json.v2); - this.v3.fromArray(json.v3); - return this; - } - - } - - CubicBezierCurve.prototype.isCubicBezierCurve = true; - - class CubicBezierCurve3 extends Curve { - constructor(v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3()) { - super(); - this.type = 'CubicBezierCurve3'; - this.v0 = v0; - this.v1 = v1; - this.v2 = v2; - this.v3 = v3; - } - - getPoint(t, optionalTarget = new Vector3()) { - const point = optionalTarget; - const v0 = this.v0, - v1 = this.v1, - v2 = this.v2, - v3 = this.v3; - point.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y), CubicBezier(t, v0.z, v1.z, v2.z, v3.z)); - return point; - } - - copy(source) { - super.copy(source); - this.v0.copy(source.v0); - this.v1.copy(source.v1); - this.v2.copy(source.v2); - this.v3.copy(source.v3); - return this; - } - - toJSON() { - const data = super.toJSON(); - data.v0 = this.v0.toArray(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - data.v3 = this.v3.toArray(); - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.v0.fromArray(json.v0); - this.v1.fromArray(json.v1); - this.v2.fromArray(json.v2); - this.v3.fromArray(json.v3); - return this; - } - - } - - CubicBezierCurve3.prototype.isCubicBezierCurve3 = true; - - class LineCurve extends Curve { - constructor(v1 = new Vector2(), v2 = new Vector2()) { - super(); - this.type = 'LineCurve'; - this.v1 = v1; - this.v2 = v2; - } - - getPoint(t, optionalTarget = new Vector2()) { - const point = optionalTarget; - - if (t === 1) { - point.copy(this.v2); - } else { - point.copy(this.v2).sub(this.v1); - point.multiplyScalar(t).add(this.v1); - } - - return point; - } // Line curve is linear, so we can overwrite default getPointAt - - - getPointAt(u, optionalTarget) { - return this.getPoint(u, optionalTarget); - } - - getTangent(t, optionalTarget) { - const tangent = optionalTarget || new Vector2(); - tangent.copy(this.v2).sub(this.v1).normalize(); - return tangent; - } - - copy(source) { - super.copy(source); - this.v1.copy(source.v1); - this.v2.copy(source.v2); - return this; - } - - toJSON() { - const data = super.toJSON(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.v1.fromArray(json.v1); - this.v2.fromArray(json.v2); - return this; - } - - } - - LineCurve.prototype.isLineCurve = true; - - class LineCurve3 extends Curve { - constructor(v1 = new Vector3(), v2 = new Vector3()) { - super(); - this.type = 'LineCurve3'; - this.isLineCurve3 = true; - this.v1 = v1; - this.v2 = v2; - } - - getPoint(t, optionalTarget = new Vector3()) { - const point = optionalTarget; - - if (t === 1) { - point.copy(this.v2); - } else { - point.copy(this.v2).sub(this.v1); - point.multiplyScalar(t).add(this.v1); - } - - return point; - } // Line curve is linear, so we can overwrite default getPointAt - - - getPointAt(u, optionalTarget) { - return this.getPoint(u, optionalTarget); - } - - copy(source) { - super.copy(source); - this.v1.copy(source.v1); - this.v2.copy(source.v2); - return this; - } - - toJSON() { - const data = super.toJSON(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.v1.fromArray(json.v1); - this.v2.fromArray(json.v2); - return this; - } - - } - - class QuadraticBezierCurve extends Curve { - constructor(v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2()) { - super(); - this.type = 'QuadraticBezierCurve'; - this.v0 = v0; - this.v1 = v1; - this.v2 = v2; - } - - getPoint(t, optionalTarget = new Vector2()) { - const point = optionalTarget; - const v0 = this.v0, - v1 = this.v1, - v2 = this.v2; - point.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y)); - return point; - } - - copy(source) { - super.copy(source); - this.v0.copy(source.v0); - this.v1.copy(source.v1); - this.v2.copy(source.v2); - return this; - } - - toJSON() { - const data = super.toJSON(); - data.v0 = this.v0.toArray(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.v0.fromArray(json.v0); - this.v1.fromArray(json.v1); - this.v2.fromArray(json.v2); - return this; - } - - } - - QuadraticBezierCurve.prototype.isQuadraticBezierCurve = true; - - class QuadraticBezierCurve3 extends Curve { - constructor(v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3()) { - super(); - this.type = 'QuadraticBezierCurve3'; - this.v0 = v0; - this.v1 = v1; - this.v2 = v2; - } - - getPoint(t, optionalTarget = new Vector3()) { - const point = optionalTarget; - const v0 = this.v0, - v1 = this.v1, - v2 = this.v2; - point.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y), QuadraticBezier(t, v0.z, v1.z, v2.z)); - return point; - } - - copy(source) { - super.copy(source); - this.v0.copy(source.v0); - this.v1.copy(source.v1); - this.v2.copy(source.v2); - return this; - } - - toJSON() { - const data = super.toJSON(); - data.v0 = this.v0.toArray(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.v0.fromArray(json.v0); - this.v1.fromArray(json.v1); - this.v2.fromArray(json.v2); - return this; - } - - } - - QuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true; - - class SplineCurve extends Curve { - constructor(points = []) { - super(); - this.type = 'SplineCurve'; - this.points = points; - } - - getPoint(t, optionalTarget = new Vector2()) { - const point = optionalTarget; - const points = this.points; - const p = (points.length - 1) * t; - const intPoint = Math.floor(p); - const weight = p - intPoint; - const p0 = points[intPoint === 0 ? intPoint : intPoint - 1]; - const p1 = points[intPoint]; - const p2 = points[intPoint > points.length - 2 ? points.length - 1 : intPoint + 1]; - const p3 = points[intPoint > points.length - 3 ? points.length - 1 : intPoint + 2]; - point.set(CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), CatmullRom(weight, p0.y, p1.y, p2.y, p3.y)); - return point; - } - - copy(source) { - super.copy(source); - this.points = []; - - for (let i = 0, l = source.points.length; i < l; i++) { - const point = source.points[i]; - this.points.push(point.clone()); - } - - return this; - } - - toJSON() { - const data = super.toJSON(); - data.points = []; - - for (let i = 0, l = this.points.length; i < l; i++) { - const point = this.points[i]; - data.points.push(point.toArray()); - } - - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.points = []; - - for (let i = 0, l = json.points.length; i < l; i++) { - const point = json.points[i]; - this.points.push(new Vector2().fromArray(point)); - } - - return this; - } - - } - - SplineCurve.prototype.isSplineCurve = true; - - var Curves = /*#__PURE__*/Object.freeze({ - __proto__: null, - ArcCurve: ArcCurve, - CatmullRomCurve3: CatmullRomCurve3, - CubicBezierCurve: CubicBezierCurve, - CubicBezierCurve3: CubicBezierCurve3, - EllipseCurve: EllipseCurve, - LineCurve: LineCurve, - LineCurve3: LineCurve3, - QuadraticBezierCurve: QuadraticBezierCurve, - QuadraticBezierCurve3: QuadraticBezierCurve3, - SplineCurve: SplineCurve - }); - - /** - * Port from https://github.com/mapbox/earcut (v2.2.2) - */ - const Earcut = { - triangulate: function (data, holeIndices, dim = 2) { - const hasHoles = holeIndices && holeIndices.length; - const outerLen = hasHoles ? holeIndices[0] * dim : data.length; - let outerNode = linkedList(data, 0, outerLen, dim, true); - const triangles = []; - if (!outerNode || outerNode.next === outerNode.prev) return triangles; - let minX, minY, maxX, maxY, x, y, invSize; - if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim); // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox - - if (data.length > 80 * dim) { - minX = maxX = data[0]; - minY = maxY = data[1]; - - for (let i = dim; i < outerLen; i += dim) { - x = data[i]; - y = data[i + 1]; - if (x < minX) minX = x; - if (y < minY) minY = y; - if (x > maxX) maxX = x; - if (y > maxY) maxY = y; - } // minX, minY and invSize are later used to transform coords into integers for z-order calculation - - - invSize = Math.max(maxX - minX, maxY - minY); - invSize = invSize !== 0 ? 1 / invSize : 0; - } - - earcutLinked(outerNode, triangles, dim, minX, minY, invSize); - return triangles; - } - }; // create a circular doubly linked list from polygon points in the specified winding order - - function linkedList(data, start, end, dim, clockwise) { - let i, last; - - if (clockwise === signedArea(data, start, end, dim) > 0) { - for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last); - } else { - for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last); - } - - if (last && equals(last, last.next)) { - removeNode(last); - last = last.next; - } - - return last; - } // eliminate colinear or duplicate points - - - function filterPoints(start, end) { - if (!start) return start; - if (!end) end = start; - let p = start, - again; - - do { - again = false; - - if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) { - removeNode(p); - p = end = p.prev; - if (p === p.next) break; - again = true; - } else { - p = p.next; - } - } while (again || p !== end); - - return end; - } // main ear slicing loop which triangulates a polygon (given as a linked list) - - - function earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) { - if (!ear) return; // interlink polygon nodes in z-order - - if (!pass && invSize) indexCurve(ear, minX, minY, invSize); - let stop = ear, - prev, - next; // iterate through ears, slicing them one by one - - while (ear.prev !== ear.next) { - prev = ear.prev; - next = ear.next; - - if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) { - // cut off the triangle - triangles.push(prev.i / dim); - triangles.push(ear.i / dim); - triangles.push(next.i / dim); - removeNode(ear); // skipping the next vertex leads to less sliver triangles - - ear = next.next; - stop = next.next; - continue; - } - - ear = next; // if we looped through the whole remaining polygon and can't find any more ears - - if (ear === stop) { - // try filtering points and slicing again - if (!pass) { - earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1); // if this didn't work, try curing all small self-intersections locally - } else if (pass === 1) { - ear = cureLocalIntersections(filterPoints(ear), triangles, dim); - earcutLinked(ear, triangles, dim, minX, minY, invSize, 2); // as a last resort, try splitting the remaining polygon into two - } else if (pass === 2) { - splitEarcut(ear, triangles, dim, minX, minY, invSize); - } - - break; - } - } - } // check whether a polygon node forms a valid ear with adjacent nodes - - - function isEar(ear) { - const a = ear.prev, - b = ear, - c = ear.next; - if (area(a, b, c) >= 0) return false; // reflex, can't be an ear - // now make sure we don't have other points inside the potential ear - - let p = ear.next.next; - - while (p !== ear.prev) { - if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false; - p = p.next; - } - - return true; - } - - function isEarHashed(ear, minX, minY, invSize) { - const a = ear.prev, - b = ear, - c = ear.next; - if (area(a, b, c) >= 0) return false; // reflex, can't be an ear - // triangle bbox; min & max are calculated like this for speed - - const minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x, - minTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y, - maxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x, - maxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y; // z-order range for the current triangle bbox; - - const minZ = zOrder(minTX, minTY, minX, minY, invSize), - maxZ = zOrder(maxTX, maxTY, minX, minY, invSize); - let p = ear.prevZ, - n = ear.nextZ; // look for points inside the triangle in both directions - - while (p && p.z >= minZ && n && n.z <= maxZ) { - if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false; - p = p.prevZ; - if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false; - n = n.nextZ; - } // look for remaining points in decreasing z-order - - - while (p && p.z >= minZ) { - if (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false; - p = p.prevZ; - } // look for remaining points in increasing z-order - - - while (n && n.z <= maxZ) { - if (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false; - n = n.nextZ; - } - - return true; - } // go through all polygon nodes and cure small local self-intersections - - - function cureLocalIntersections(start, triangles, dim) { - let p = start; - - do { - const a = p.prev, - b = p.next.next; - - if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) { - triangles.push(a.i / dim); - triangles.push(p.i / dim); - triangles.push(b.i / dim); // remove two nodes involved - - removeNode(p); - removeNode(p.next); - p = start = b; - } - - p = p.next; - } while (p !== start); - - return filterPoints(p); - } // try splitting polygon into two and triangulate them independently - - - function splitEarcut(start, triangles, dim, minX, minY, invSize) { - // look for a valid diagonal that divides the polygon into two - let a = start; - - do { - let b = a.next.next; - - while (b !== a.prev) { - if (a.i !== b.i && isValidDiagonal(a, b)) { - // split the polygon in two by the diagonal - let c = splitPolygon(a, b); // filter colinear points around the cuts - - a = filterPoints(a, a.next); - c = filterPoints(c, c.next); // run earcut on each half - - earcutLinked(a, triangles, dim, minX, minY, invSize); - earcutLinked(c, triangles, dim, minX, minY, invSize); - return; - } - - b = b.next; - } - - a = a.next; - } while (a !== start); - } // link every hole into the outer loop, producing a single-ring polygon without holes - - - function eliminateHoles(data, holeIndices, outerNode, dim) { - const queue = []; - let i, len, start, end, list; - - for (i = 0, len = holeIndices.length; i < len; i++) { - start = holeIndices[i] * dim; - end = i < len - 1 ? holeIndices[i + 1] * dim : data.length; - list = linkedList(data, start, end, dim, false); - if (list === list.next) list.steiner = true; - queue.push(getLeftmost(list)); - } - - queue.sort(compareX); // process holes from left to right - - for (i = 0; i < queue.length; i++) { - eliminateHole(queue[i], outerNode); - outerNode = filterPoints(outerNode, outerNode.next); - } - - return outerNode; - } - - function compareX(a, b) { - return a.x - b.x; - } // find a bridge between vertices that connects hole with an outer ring and and link it - - - function eliminateHole(hole, outerNode) { - outerNode = findHoleBridge(hole, outerNode); - - if (outerNode) { - const b = splitPolygon(outerNode, hole); // filter collinear points around the cuts - - filterPoints(outerNode, outerNode.next); - filterPoints(b, b.next); - } - } // David Eberly's algorithm for finding a bridge between hole and outer polygon - - - function findHoleBridge(hole, outerNode) { - let p = outerNode; - const hx = hole.x; - const hy = hole.y; - let qx = -Infinity, - m; // find a segment intersected by a ray from the hole's leftmost point to the left; - // segment's endpoint with lesser x will be potential connection point - - do { - if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) { - const x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y); - - if (x <= hx && x > qx) { - qx = x; - - if (x === hx) { - if (hy === p.y) return p; - if (hy === p.next.y) return p.next; - } - - m = p.x < p.next.x ? p : p.next; - } - } - - p = p.next; - } while (p !== outerNode); - - if (!m) return null; - if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint - // look for points inside the triangle of hole point, segment intersection and endpoint; - // if there are no points found, we have a valid connection; - // otherwise choose the point of the minimum angle with the ray as connection point - - const stop = m, - mx = m.x, - my = m.y; - let tanMin = Infinity, - tan; - p = m; - - do { - if (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) { - tan = Math.abs(hy - p.y) / (hx - p.x); // tangential - - if (locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) { - m = p; - tanMin = tan; - } - } - - p = p.next; - } while (p !== stop); - - return m; - } // whether sector in vertex m contains sector in vertex p in the same coordinates - - - function sectorContainsSector(m, p) { - return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0; - } // interlink polygon nodes in z-order - - - function indexCurve(start, minX, minY, invSize) { - let p = start; - - do { - if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize); - p.prevZ = p.prev; - p.nextZ = p.next; - p = p.next; - } while (p !== start); - - p.prevZ.nextZ = null; - p.prevZ = null; - sortLinked(p); - } // Simon Tatham's linked list merge sort algorithm - // http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html - - - function sortLinked(list) { - let i, - p, - q, - e, - tail, - numMerges, - pSize, - qSize, - inSize = 1; - - do { - p = list; - list = null; - tail = null; - numMerges = 0; - - while (p) { - numMerges++; - q = p; - pSize = 0; - - for (i = 0; i < inSize; i++) { - pSize++; - q = q.nextZ; - if (!q) break; - } - - qSize = inSize; - - while (pSize > 0 || qSize > 0 && q) { - if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) { - e = p; - p = p.nextZ; - pSize--; - } else { - e = q; - q = q.nextZ; - qSize--; - } - - if (tail) tail.nextZ = e;else list = e; - e.prevZ = tail; - tail = e; - } - - p = q; - } - - tail.nextZ = null; - inSize *= 2; - } while (numMerges > 1); - - return list; - } // z-order of a point given coords and inverse of the longer side of data bbox - - - function zOrder(x, y, minX, minY, invSize) { - // coords are transformed into non-negative 15-bit integer range - x = 32767 * (x - minX) * invSize; - y = 32767 * (y - minY) * invSize; - x = (x | x << 8) & 0x00FF00FF; - x = (x | x << 4) & 0x0F0F0F0F; - x = (x | x << 2) & 0x33333333; - x = (x | x << 1) & 0x55555555; - y = (y | y << 8) & 0x00FF00FF; - y = (y | y << 4) & 0x0F0F0F0F; - y = (y | y << 2) & 0x33333333; - y = (y | y << 1) & 0x55555555; - return x | y << 1; - } // find the leftmost node of a polygon ring - - - function getLeftmost(start) { - let p = start, - leftmost = start; - - do { - if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p; - p = p.next; - } while (p !== start); - - return leftmost; - } // check if a point lies within a convex triangle - - - function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) { - return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0; - } // check if a diagonal between two polygon nodes is valid (lies in polygon interior) - - - function isValidDiagonal(a, b) { - return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && ( // dones't intersect other edges - locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && ( // locally visible - area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors - equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case - } // signed area of a triangle - - - function area(p, q, r) { - return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); - } // check if two points are equal - - - function equals(p1, p2) { - return p1.x === p2.x && p1.y === p2.y; - } // check if two segments intersect - - - function intersects(p1, q1, p2, q2) { - const o1 = sign(area(p1, q1, p2)); - const o2 = sign(area(p1, q1, q2)); - const o3 = sign(area(p2, q2, p1)); - const o4 = sign(area(p2, q2, q1)); - if (o1 !== o2 && o3 !== o4) return true; // general case - - if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 - - if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 - - if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 - - if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 - - return false; - } // for collinear points p, q, r, check if point q lies on segment pr - - - function onSegment(p, q, r) { - return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y); - } - - function sign(num) { - return num > 0 ? 1 : num < 0 ? -1 : 0; - } // check if a polygon diagonal intersects any polygon segments - - - function intersectsPolygon(a, b) { - let p = a; - - do { - if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true; - p = p.next; - } while (p !== a); - - return false; - } // check if a polygon diagonal is locally inside the polygon - - - function locallyInside(a, b) { - return area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0; - } // check if the middle point of a polygon diagonal is inside the polygon - - - function middleInside(a, b) { - let p = a, - inside = false; - const px = (a.x + b.x) / 2, - py = (a.y + b.y) / 2; - - do { - if (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x) inside = !inside; - p = p.next; - } while (p !== a); - - return inside; - } // link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; - // if one belongs to the outer ring and another to a hole, it merges it into a single ring - - - function splitPolygon(a, b) { - const a2 = new Node(a.i, a.x, a.y), - b2 = new Node(b.i, b.x, b.y), - an = a.next, - bp = b.prev; - a.next = b; - b.prev = a; - a2.next = an; - an.prev = a2; - b2.next = a2; - a2.prev = b2; - bp.next = b2; - b2.prev = bp; - return b2; - } // create a node and optionally link it with previous one (in a circular doubly linked list) - - - function insertNode(i, x, y, last) { - const p = new Node(i, x, y); - - if (!last) { - p.prev = p; - p.next = p; - } else { - p.next = last.next; - p.prev = last; - last.next.prev = p; - last.next = p; - } - - return p; - } - - function removeNode(p) { - p.next.prev = p.prev; - p.prev.next = p.next; - if (p.prevZ) p.prevZ.nextZ = p.nextZ; - if (p.nextZ) p.nextZ.prevZ = p.prevZ; - } - - function Node(i, x, y) { - // vertex index in coordinates array - this.i = i; // vertex coordinates - - this.x = x; - this.y = y; // previous and next vertex nodes in a polygon ring - - this.prev = null; - this.next = null; // z-order curve value - - this.z = null; // previous and next nodes in z-order - - this.prevZ = null; - this.nextZ = null; // indicates whether this is a steiner point - - this.steiner = false; - } - - function signedArea(data, start, end, dim) { - let sum = 0; - - for (let i = start, j = end - dim; i < end; i += dim) { - sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]); - j = i; - } - - return sum; - } - - class ShapeUtils { - // calculate area of the contour polygon - static area(contour) { - const n = contour.length; - let a = 0.0; - - for (let p = n - 1, q = 0; q < n; p = q++) { - a += contour[p].x * contour[q].y - contour[q].x * contour[p].y; - } - - return a * 0.5; - } - - static isClockWise(pts) { - return ShapeUtils.area(pts) < 0; - } - - static triangulateShape(contour, holes) { - const vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ] - - const holeIndices = []; // array of hole indices - - const faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ] - - removeDupEndPts(contour); - addContour(vertices, contour); // - - let holeIndex = contour.length; - holes.forEach(removeDupEndPts); - - for (let i = 0; i < holes.length; i++) { - holeIndices.push(holeIndex); - holeIndex += holes[i].length; - addContour(vertices, holes[i]); - } // - - - const triangles = Earcut.triangulate(vertices, holeIndices); // - - for (let i = 0; i < triangles.length; i += 3) { - faces.push(triangles.slice(i, i + 3)); - } - - return faces; - } - - } - - function removeDupEndPts(points) { - const l = points.length; - - if (l > 2 && points[l - 1].equals(points[0])) { - points.pop(); - } - } - - function addContour(vertices, contour) { - for (let i = 0; i < contour.length; i++) { - vertices.push(contour[i].x); - vertices.push(contour[i].y); - } - } - - /** - * Creates extruded geometry from a path shape. - * - * parameters = { - * - * curveSegments: , // number of points on the curves - * steps: , // number of points for z-side extrusions / used for subdividing segments of extrude spline too - * depth: , // Depth to extrude the shape - * - * bevelEnabled: , // turn on bevel - * bevelThickness: , // how deep into the original shape bevel goes - * bevelSize: , // how far from shape outline (including bevelOffset) is bevel - * bevelOffset: , // how far from shape outline does bevel start - * bevelSegments: , // number of bevel layers - * - * extrudePath: // curve to extrude shape along - * - * UVGenerator: // object that provides UV generator functions - * - * } - */ - - class ExtrudeGeometry extends BufferGeometry { - constructor(shapes, options) { - super(); - this.type = 'ExtrudeGeometry'; - this.parameters = { - shapes: shapes, - options: options - }; - shapes = Array.isArray(shapes) ? shapes : [shapes]; - const scope = this; - const verticesArray = []; - const uvArray = []; - - for (let i = 0, l = shapes.length; i < l; i++) { - const shape = shapes[i]; - addShape(shape); - } // build geometry - - - this.setAttribute('position', new Float32BufferAttribute(verticesArray, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvArray, 2)); - this.computeVertexNormals(); // functions - - function addShape(shape) { - const placeholder = []; // options - - const curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12; - const steps = options.steps !== undefined ? options.steps : 1; - let depth = options.depth !== undefined ? options.depth : 100; - let bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true; - let bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 6; - let bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 2; - let bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0; - let bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3; - const extrudePath = options.extrudePath; - const uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator; // deprecated options - - if (options.amount !== undefined) { - console.warn('THREE.ExtrudeBufferGeometry: amount has been renamed to depth.'); - depth = options.amount; - } // - - - let extrudePts, - extrudeByPath = false; - let splineTube, binormal, normal, position2; - - if (extrudePath) { - extrudePts = extrudePath.getSpacedPoints(steps); - extrudeByPath = true; - bevelEnabled = false; // bevels not supported for path extrusion - // SETUP TNB variables - // TODO1 - have a .isClosed in spline? - - splineTube = extrudePath.computeFrenetFrames(steps, false); // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length); - - binormal = new Vector3(); - normal = new Vector3(); - position2 = new Vector3(); - } // Safeguards if bevels are not enabled - - - if (!bevelEnabled) { - bevelSegments = 0; - bevelThickness = 0; - bevelSize = 0; - bevelOffset = 0; - } // Variables initialization - - - const shapePoints = shape.extractPoints(curveSegments); - let vertices = shapePoints.shape; - const holes = shapePoints.holes; - const reverse = !ShapeUtils.isClockWise(vertices); - - if (reverse) { - vertices = vertices.reverse(); // Maybe we should also check if holes are in the opposite direction, just to be safe ... - - for (let h = 0, hl = holes.length; h < hl; h++) { - const ahole = holes[h]; - - if (ShapeUtils.isClockWise(ahole)) { - holes[h] = ahole.reverse(); - } - } - } - - const faces = ShapeUtils.triangulateShape(vertices, holes); - /* Vertices */ - - const contour = vertices; // vertices has all points but contour has only points of circumference - - for (let h = 0, hl = holes.length; h < hl; h++) { - const ahole = holes[h]; - vertices = vertices.concat(ahole); - } - - function scalePt2(pt, vec, size) { - if (!vec) console.error('THREE.ExtrudeGeometry: vec does not exist'); - return vec.clone().multiplyScalar(size).add(pt); - } - - const vlen = vertices.length, - flen = faces.length; // Find directions for point movement - - function getBevelVec(inPt, inPrev, inNext) { - // computes for inPt the corresponding point inPt' on a new contour - // shifted by 1 unit (length of normalized vector) to the left - // if we walk along contour clockwise, this new contour is outside the old one - // - // inPt' is the intersection of the two lines parallel to the two - // adjacent edges of inPt at a distance of 1 unit on the left side. - let v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt - // good reading for geometry algorithms (here: line-line intersection) - // http://geomalgorithms.com/a05-_intersect-1.html - - const v_prev_x = inPt.x - inPrev.x, - v_prev_y = inPt.y - inPrev.y; - const v_next_x = inNext.x - inPt.x, - v_next_y = inNext.y - inPt.y; - const v_prev_lensq = v_prev_x * v_prev_x + v_prev_y * v_prev_y; // check for collinear edges - - const collinear0 = v_prev_x * v_next_y - v_prev_y * v_next_x; - - if (Math.abs(collinear0) > Number.EPSILON) { - // not collinear - // length of vectors for normalizing - const v_prev_len = Math.sqrt(v_prev_lensq); - const v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y); // shift adjacent points by unit vectors to the left - - const ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len; - const ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len; - const ptNextShift_x = inNext.x - v_next_y / v_next_len; - const ptNextShift_y = inNext.y + v_next_x / v_next_len; // scaling factor for v_prev to intersection point - - const sf = ((ptNextShift_x - ptPrevShift_x) * v_next_y - (ptNextShift_y - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x); // vector from inPt to intersection point - - v_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x; - v_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y; // Don't normalize!, otherwise sharp corners become ugly - // but prevent crazy spikes - - const v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y; - - if (v_trans_lensq <= 2) { - return new Vector2(v_trans_x, v_trans_y); - } else { - shrink_by = Math.sqrt(v_trans_lensq / 2); - } - } else { - // handle special case of collinear edges - let direction_eq = false; // assumes: opposite - - if (v_prev_x > Number.EPSILON) { - if (v_next_x > Number.EPSILON) { - direction_eq = true; - } - } else { - if (v_prev_x < -Number.EPSILON) { - if (v_next_x < -Number.EPSILON) { - direction_eq = true; - } - } else { - if (Math.sign(v_prev_y) === Math.sign(v_next_y)) { - direction_eq = true; - } - } - } - - if (direction_eq) { - // console.log("Warning: lines are a straight sequence"); - v_trans_x = -v_prev_y; - v_trans_y = v_prev_x; - shrink_by = Math.sqrt(v_prev_lensq); - } else { - // console.log("Warning: lines are a straight spike"); - v_trans_x = v_prev_x; - v_trans_y = v_prev_y; - shrink_by = Math.sqrt(v_prev_lensq / 2); - } - } - - return new Vector2(v_trans_x / shrink_by, v_trans_y / shrink_by); - } - - const contourMovements = []; - - for (let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i++, j++, k++) { - if (j === il) j = 0; - if (k === il) k = 0; // (j)---(i)---(k) - // console.log('i,j,k', i, j , k) - - contourMovements[i] = getBevelVec(contour[i], contour[j], contour[k]); - } - - const holesMovements = []; - let oneHoleMovements, - verticesMovements = contourMovements.concat(); - - for (let h = 0, hl = holes.length; h < hl; h++) { - const ahole = holes[h]; - oneHoleMovements = []; - - for (let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i++, j++, k++) { - if (j === il) j = 0; - if (k === il) k = 0; // (j)---(i)---(k) - - oneHoleMovements[i] = getBevelVec(ahole[i], ahole[j], ahole[k]); - } - - holesMovements.push(oneHoleMovements); - verticesMovements = verticesMovements.concat(oneHoleMovements); - } // Loop bevelSegments, 1 for the front, 1 for the back - - - for (let b = 0; b < bevelSegments; b++) { - //for ( b = bevelSegments; b > 0; b -- ) { - const t = b / bevelSegments; - const z = bevelThickness * Math.cos(t * Math.PI / 2); - const bs = bevelSize * Math.sin(t * Math.PI / 2) + bevelOffset; // contract shape - - for (let i = 0, il = contour.length; i < il; i++) { - const vert = scalePt2(contour[i], contourMovements[i], bs); - v(vert.x, vert.y, -z); - } // expand holes - - - for (let h = 0, hl = holes.length; h < hl; h++) { - const ahole = holes[h]; - oneHoleMovements = holesMovements[h]; - - for (let i = 0, il = ahole.length; i < il; i++) { - const vert = scalePt2(ahole[i], oneHoleMovements[i], bs); - v(vert.x, vert.y, -z); - } - } - } - - const bs = bevelSize + bevelOffset; // Back facing vertices - - for (let i = 0; i < vlen; i++) { - const vert = bevelEnabled ? scalePt2(vertices[i], verticesMovements[i], bs) : vertices[i]; - - if (!extrudeByPath) { - v(vert.x, vert.y, 0); - } else { - // v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x ); - normal.copy(splineTube.normals[0]).multiplyScalar(vert.x); - binormal.copy(splineTube.binormals[0]).multiplyScalar(vert.y); - position2.copy(extrudePts[0]).add(normal).add(binormal); - v(position2.x, position2.y, position2.z); - } - } // Add stepped vertices... - // Including front facing vertices - - - for (let s = 1; s <= steps; s++) { - for (let i = 0; i < vlen; i++) { - const vert = bevelEnabled ? scalePt2(vertices[i], verticesMovements[i], bs) : vertices[i]; - - if (!extrudeByPath) { - v(vert.x, vert.y, depth / steps * s); - } else { - // v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x ); - normal.copy(splineTube.normals[s]).multiplyScalar(vert.x); - binormal.copy(splineTube.binormals[s]).multiplyScalar(vert.y); - position2.copy(extrudePts[s]).add(normal).add(binormal); - v(position2.x, position2.y, position2.z); - } - } - } // Add bevel segments planes - //for ( b = 1; b <= bevelSegments; b ++ ) { - - - for (let b = bevelSegments - 1; b >= 0; b--) { - const t = b / bevelSegments; - const z = bevelThickness * Math.cos(t * Math.PI / 2); - const bs = bevelSize * Math.sin(t * Math.PI / 2) + bevelOffset; // contract shape - - for (let i = 0, il = contour.length; i < il; i++) { - const vert = scalePt2(contour[i], contourMovements[i], bs); - v(vert.x, vert.y, depth + z); - } // expand holes - - - for (let h = 0, hl = holes.length; h < hl; h++) { - const ahole = holes[h]; - oneHoleMovements = holesMovements[h]; - - for (let i = 0, il = ahole.length; i < il; i++) { - const vert = scalePt2(ahole[i], oneHoleMovements[i], bs); - - if (!extrudeByPath) { - v(vert.x, vert.y, depth + z); - } else { - v(vert.x, vert.y + extrudePts[steps - 1].y, extrudePts[steps - 1].x + z); - } - } - } - } - /* Faces */ - // Top and bottom faces - - - buildLidFaces(); // Sides faces - - buildSideFaces(); ///// Internal functions - - function buildLidFaces() { - const start = verticesArray.length / 3; - - if (bevelEnabled) { - let layer = 0; // steps + 1 - - let offset = vlen * layer; // Bottom faces - - for (let i = 0; i < flen; i++) { - const face = faces[i]; - f3(face[2] + offset, face[1] + offset, face[0] + offset); - } - - layer = steps + bevelSegments * 2; - offset = vlen * layer; // Top faces - - for (let i = 0; i < flen; i++) { - const face = faces[i]; - f3(face[0] + offset, face[1] + offset, face[2] + offset); - } - } else { - // Bottom faces - for (let i = 0; i < flen; i++) { - const face = faces[i]; - f3(face[2], face[1], face[0]); - } // Top faces - - - for (let i = 0; i < flen; i++) { - const face = faces[i]; - f3(face[0] + vlen * steps, face[1] + vlen * steps, face[2] + vlen * steps); - } - } - - scope.addGroup(start, verticesArray.length / 3 - start, 0); - } // Create faces for the z-sides of the shape - - - function buildSideFaces() { - const start = verticesArray.length / 3; - let layeroffset = 0; - sidewalls(contour, layeroffset); - layeroffset += contour.length; - - for (let h = 0, hl = holes.length; h < hl; h++) { - const ahole = holes[h]; - sidewalls(ahole, layeroffset); //, true - - layeroffset += ahole.length; - } - - scope.addGroup(start, verticesArray.length / 3 - start, 1); - } - - function sidewalls(contour, layeroffset) { - let i = contour.length; - - while (--i >= 0) { - const j = i; - let k = i - 1; - if (k < 0) k = contour.length - 1; //console.log('b', i,j, i-1, k,vertices.length); - - for (let s = 0, sl = steps + bevelSegments * 2; s < sl; s++) { - const slen1 = vlen * s; - const slen2 = vlen * (s + 1); - const a = layeroffset + j + slen1, - b = layeroffset + k + slen1, - c = layeroffset + k + slen2, - d = layeroffset + j + slen2; - f4(a, b, c, d); - } - } - } - - function v(x, y, z) { - placeholder.push(x); - placeholder.push(y); - placeholder.push(z); - } - - function f3(a, b, c) { - addVertex(a); - addVertex(b); - addVertex(c); - const nextIndex = verticesArray.length / 3; - const uvs = uvgen.generateTopUV(scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1); - addUV(uvs[0]); - addUV(uvs[1]); - addUV(uvs[2]); - } - - function f4(a, b, c, d) { - addVertex(a); - addVertex(b); - addVertex(d); - addVertex(b); - addVertex(c); - addVertex(d); - const nextIndex = verticesArray.length / 3; - const uvs = uvgen.generateSideWallUV(scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1); - addUV(uvs[0]); - addUV(uvs[1]); - addUV(uvs[3]); - addUV(uvs[1]); - addUV(uvs[2]); - addUV(uvs[3]); - } - - function addVertex(index) { - verticesArray.push(placeholder[index * 3 + 0]); - verticesArray.push(placeholder[index * 3 + 1]); - verticesArray.push(placeholder[index * 3 + 2]); - } - - function addUV(vector2) { - uvArray.push(vector2.x); - uvArray.push(vector2.y); - } - } - } - - toJSON() { - const data = super.toJSON(); - const shapes = this.parameters.shapes; - const options = this.parameters.options; - return toJSON$1(shapes, options, data); - } - - static fromJSON(data, shapes) { - const geometryShapes = []; - - for (let j = 0, jl = data.shapes.length; j < jl; j++) { - const shape = shapes[data.shapes[j]]; - geometryShapes.push(shape); - } - - const extrudePath = data.options.extrudePath; - - if (extrudePath !== undefined) { - data.options.extrudePath = new Curves[extrudePath.type]().fromJSON(extrudePath); - } - - return new ExtrudeGeometry(geometryShapes, data.options); - } - - } - - const WorldUVGenerator = { - generateTopUV: function (geometry, vertices, indexA, indexB, indexC) { - const a_x = vertices[indexA * 3]; - const a_y = vertices[indexA * 3 + 1]; - const b_x = vertices[indexB * 3]; - const b_y = vertices[indexB * 3 + 1]; - const c_x = vertices[indexC * 3]; - const c_y = vertices[indexC * 3 + 1]; - return [new Vector2(a_x, a_y), new Vector2(b_x, b_y), new Vector2(c_x, c_y)]; - }, - generateSideWallUV: function (geometry, vertices, indexA, indexB, indexC, indexD) { - const a_x = vertices[indexA * 3]; - const a_y = vertices[indexA * 3 + 1]; - const a_z = vertices[indexA * 3 + 2]; - const b_x = vertices[indexB * 3]; - const b_y = vertices[indexB * 3 + 1]; - const b_z = vertices[indexB * 3 + 2]; - const c_x = vertices[indexC * 3]; - const c_y = vertices[indexC * 3 + 1]; - const c_z = vertices[indexC * 3 + 2]; - const d_x = vertices[indexD * 3]; - const d_y = vertices[indexD * 3 + 1]; - const d_z = vertices[indexD * 3 + 2]; - - if (Math.abs(a_y - b_y) < Math.abs(a_x - b_x)) { - return [new Vector2(a_x, 1 - a_z), new Vector2(b_x, 1 - b_z), new Vector2(c_x, 1 - c_z), new Vector2(d_x, 1 - d_z)]; - } else { - return [new Vector2(a_y, 1 - a_z), new Vector2(b_y, 1 - b_z), new Vector2(c_y, 1 - c_z), new Vector2(d_y, 1 - d_z)]; - } - } - }; - - function toJSON$1(shapes, options, data) { - data.shapes = []; - - if (Array.isArray(shapes)) { - for (let i = 0, l = shapes.length; i < l; i++) { - const shape = shapes[i]; - data.shapes.push(shape.uuid); - } - } else { - data.shapes.push(shapes.uuid); - } - - if (options.extrudePath !== undefined) data.options.extrudePath = options.extrudePath.toJSON(); - return data; - } - - class IcosahedronGeometry extends PolyhedronGeometry { - constructor(radius = 1, detail = 0) { - const t = (1 + Math.sqrt(5)) / 2; - const vertices = [-1, t, 0, 1, t, 0, -1, -t, 0, 1, -t, 0, 0, -1, t, 0, 1, t, 0, -1, -t, 0, 1, -t, t, 0, -1, t, 0, 1, -t, 0, -1, -t, 0, 1]; - const indices = [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1]; - super(vertices, indices, radius, detail); - this.type = 'IcosahedronGeometry'; - this.parameters = { - radius: radius, - detail: detail - }; - } - - static fromJSON(data) { - return new IcosahedronGeometry(data.radius, data.detail); - } - - } - - class LatheGeometry extends BufferGeometry { - constructor(points, segments = 12, phiStart = 0, phiLength = Math.PI * 2) { - super(); - this.type = 'LatheGeometry'; - this.parameters = { - points: points, - segments: segments, - phiStart: phiStart, - phiLength: phiLength - }; - segments = Math.floor(segments); // clamp phiLength so it's in range of [ 0, 2PI ] - - phiLength = clamp(phiLength, 0, Math.PI * 2); // buffers - - const indices = []; - const vertices = []; - const uvs = []; // helper variables - - const inverseSegments = 1.0 / segments; - const vertex = new Vector3(); - const uv = new Vector2(); // generate vertices and uvs - - for (let i = 0; i <= segments; i++) { - const phi = phiStart + i * inverseSegments * phiLength; - const sin = Math.sin(phi); - const cos = Math.cos(phi); - - for (let j = 0; j <= points.length - 1; j++) { - // vertex - vertex.x = points[j].x * sin; - vertex.y = points[j].y; - vertex.z = points[j].x * cos; - vertices.push(vertex.x, vertex.y, vertex.z); // uv - - uv.x = i / segments; - uv.y = j / (points.length - 1); - uvs.push(uv.x, uv.y); - } - } // indices - - - for (let i = 0; i < segments; i++) { - for (let j = 0; j < points.length - 1; j++) { - const base = j + i * points.length; - const a = base; - const b = base + points.length; - const c = base + points.length + 1; - const d = base + 1; // faces - - indices.push(a, b, d); - indices.push(b, c, d); - } - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // generate normals - - this.computeVertexNormals(); // if the geometry is closed, we need to average the normals along the seam. - // because the corresponding vertices are identical (but still have different UVs). - - if (phiLength === Math.PI * 2) { - const normals = this.attributes.normal.array; - const n1 = new Vector3(); - const n2 = new Vector3(); - const n = new Vector3(); // this is the buffer offset for the last line of vertices - - const base = segments * points.length * 3; - - for (let i = 0, j = 0; i < points.length; i++, j += 3) { - // select the normal of the vertex in the first line - n1.x = normals[j + 0]; - n1.y = normals[j + 1]; - n1.z = normals[j + 2]; // select the normal of the vertex in the last line - - n2.x = normals[base + j + 0]; - n2.y = normals[base + j + 1]; - n2.z = normals[base + j + 2]; // average normals - - n.addVectors(n1, n2).normalize(); // assign the new values to both normals - - normals[j + 0] = normals[base + j + 0] = n.x; - normals[j + 1] = normals[base + j + 1] = n.y; - normals[j + 2] = normals[base + j + 2] = n.z; - } - } - } - - static fromJSON(data) { - return new LatheGeometry(data.points, data.segments, data.phiStart, data.phiLength); - } - - } - - class OctahedronGeometry extends PolyhedronGeometry { - constructor(radius = 1, detail = 0) { - const vertices = [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1]; - const indices = [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2]; - super(vertices, indices, radius, detail); - this.type = 'OctahedronGeometry'; - this.parameters = { - radius: radius, - detail: detail - }; - } - - static fromJSON(data) { - return new OctahedronGeometry(data.radius, data.detail); - } - - } - - /** - * Parametric Surfaces Geometry - * based on the brilliant article by @prideout https://prideout.net/blog/old/blog/index.html@p=44.html - */ - - class ParametricGeometry extends BufferGeometry { - constructor(func, slices, stacks) { - super(); - this.type = 'ParametricGeometry'; - this.parameters = { - func: func, - slices: slices, - stacks: stacks - }; // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - const EPS = 0.00001; - const normal = new Vector3(); - const p0 = new Vector3(), - p1 = new Vector3(); - const pu = new Vector3(), - pv = new Vector3(); - - if (func.length < 3) { - console.error('THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.'); - } // generate vertices, normals and uvs - - - const sliceCount = slices + 1; - - for (let i = 0; i <= stacks; i++) { - const v = i / stacks; - - for (let j = 0; j <= slices; j++) { - const u = j / slices; // vertex - - func(u, v, p0); - vertices.push(p0.x, p0.y, p0.z); // normal - // approximate tangent vectors via finite differences - - if (u - EPS >= 0) { - func(u - EPS, v, p1); - pu.subVectors(p0, p1); - } else { - func(u + EPS, v, p1); - pu.subVectors(p1, p0); - } - - if (v - EPS >= 0) { - func(u, v - EPS, p1); - pv.subVectors(p0, p1); - } else { - func(u, v + EPS, p1); - pv.subVectors(p1, p0); - } // cross product of tangent vectors returns surface normal - - - normal.crossVectors(pu, pv).normalize(); - normals.push(normal.x, normal.y, normal.z); // uv - - uvs.push(u, v); - } - } // generate indices - - - for (let i = 0; i < stacks; i++) { - for (let j = 0; j < slices; j++) { - const a = i * sliceCount + j; - const b = i * sliceCount + j + 1; - const c = (i + 1) * sliceCount + j + 1; - const d = (i + 1) * sliceCount + j; // faces one and two - - indices.push(a, b, d); - indices.push(b, c, d); - } - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); - } - - } - - class RingGeometry extends BufferGeometry { - constructor(innerRadius = 0.5, outerRadius = 1, thetaSegments = 8, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2) { - super(); - this.type = 'RingGeometry'; - this.parameters = { - innerRadius: innerRadius, - outerRadius: outerRadius, - thetaSegments: thetaSegments, - phiSegments: phiSegments, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - thetaSegments = Math.max(3, thetaSegments); - phiSegments = Math.max(1, phiSegments); // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; // some helper variables - - let radius = innerRadius; - const radiusStep = (outerRadius - innerRadius) / phiSegments; - const vertex = new Vector3(); - const uv = new Vector2(); // generate vertices, normals and uvs - - for (let j = 0; j <= phiSegments; j++) { - for (let i = 0; i <= thetaSegments; i++) { - // values are generate from the inside of the ring to the outside - const segment = thetaStart + i / thetaSegments * thetaLength; // vertex - - vertex.x = radius * Math.cos(segment); - vertex.y = radius * Math.sin(segment); - vertices.push(vertex.x, vertex.y, vertex.z); // normal - - normals.push(0, 0, 1); // uv - - uv.x = (vertex.x / outerRadius + 1) / 2; - uv.y = (vertex.y / outerRadius + 1) / 2; - uvs.push(uv.x, uv.y); - } // increase the radius for next row of vertices - - - radius += radiusStep; - } // indices - - - for (let j = 0; j < phiSegments; j++) { - const thetaSegmentLevel = j * (thetaSegments + 1); - - for (let i = 0; i < thetaSegments; i++) { - const segment = i + thetaSegmentLevel; - const a = segment; - const b = segment + thetaSegments + 1; - const c = segment + thetaSegments + 2; - const d = segment + 1; // faces - - indices.push(a, b, d); - indices.push(b, c, d); - } - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); - } - - static fromJSON(data) { - return new RingGeometry(data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength); - } - - } - - class ShapeGeometry extends BufferGeometry { - constructor(shapes, curveSegments = 12) { - super(); - this.type = 'ShapeGeometry'; - this.parameters = { - shapes: shapes, - curveSegments: curveSegments - }; // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; // helper variables - - let groupStart = 0; - let groupCount = 0; // allow single and array values for "shapes" parameter - - if (Array.isArray(shapes) === false) { - addShape(shapes); - } else { - for (let i = 0; i < shapes.length; i++) { - addShape(shapes[i]); - this.addGroup(groupStart, groupCount, i); // enables MultiMaterial support - - groupStart += groupCount; - groupCount = 0; - } - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // helper functions - - function addShape(shape) { - const indexOffset = vertices.length / 3; - const points = shape.extractPoints(curveSegments); - let shapeVertices = points.shape; - const shapeHoles = points.holes; // check direction of vertices - - if (ShapeUtils.isClockWise(shapeVertices) === false) { - shapeVertices = shapeVertices.reverse(); - } - - for (let i = 0, l = shapeHoles.length; i < l; i++) { - const shapeHole = shapeHoles[i]; - - if (ShapeUtils.isClockWise(shapeHole) === true) { - shapeHoles[i] = shapeHole.reverse(); - } - } - - const faces = ShapeUtils.triangulateShape(shapeVertices, shapeHoles); // join vertices of inner and outer paths to a single array - - for (let i = 0, l = shapeHoles.length; i < l; i++) { - const shapeHole = shapeHoles[i]; - shapeVertices = shapeVertices.concat(shapeHole); - } // vertices, normals, uvs - - - for (let i = 0, l = shapeVertices.length; i < l; i++) { - const vertex = shapeVertices[i]; - vertices.push(vertex.x, vertex.y, 0); - normals.push(0, 0, 1); - uvs.push(vertex.x, vertex.y); // world uvs - } // incides - - - for (let i = 0, l = faces.length; i < l; i++) { - const face = faces[i]; - const a = face[0] + indexOffset; - const b = face[1] + indexOffset; - const c = face[2] + indexOffset; - indices.push(a, b, c); - groupCount += 3; - } - } - } - - toJSON() { - const data = super.toJSON(); - const shapes = this.parameters.shapes; - return toJSON(shapes, data); - } - - static fromJSON(data, shapes) { - const geometryShapes = []; - - for (let j = 0, jl = data.shapes.length; j < jl; j++) { - const shape = shapes[data.shapes[j]]; - geometryShapes.push(shape); - } - - return new ShapeGeometry(geometryShapes, data.curveSegments); - } - - } - - function toJSON(shapes, data) { - data.shapes = []; - - if (Array.isArray(shapes)) { - for (let i = 0, l = shapes.length; i < l; i++) { - const shape = shapes[i]; - data.shapes.push(shape.uuid); - } - } else { - data.shapes.push(shapes.uuid); - } - - return data; - } - - class SphereGeometry extends BufferGeometry { - constructor(radius = 1, widthSegments = 8, heightSegments = 6, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI) { - super(); - this.type = 'SphereGeometry'; - this.parameters = { - radius: radius, - widthSegments: widthSegments, - heightSegments: heightSegments, - phiStart: phiStart, - phiLength: phiLength, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - widthSegments = Math.max(3, Math.floor(widthSegments)); - heightSegments = Math.max(2, Math.floor(heightSegments)); - const thetaEnd = Math.min(thetaStart + thetaLength, Math.PI); - let index = 0; - const grid = []; - const vertex = new Vector3(); - const normal = new Vector3(); // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; // generate vertices, normals and uvs - - for (let iy = 0; iy <= heightSegments; iy++) { - const verticesRow = []; - const v = iy / heightSegments; // special case for the poles - - let uOffset = 0; - - if (iy == 0 && thetaStart == 0) { - uOffset = 0.5 / widthSegments; - } else if (iy == heightSegments && thetaEnd == Math.PI) { - uOffset = -0.5 / widthSegments; - } - - for (let ix = 0; ix <= widthSegments; ix++) { - const u = ix / widthSegments; // vertex - - vertex.x = -radius * Math.cos(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength); - vertex.y = radius * Math.cos(thetaStart + v * thetaLength); - vertex.z = radius * Math.sin(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength); - vertices.push(vertex.x, vertex.y, vertex.z); // normal - - normal.copy(vertex).normalize(); - normals.push(normal.x, normal.y, normal.z); // uv - - uvs.push(u + uOffset, 1 - v); - verticesRow.push(index++); - } - - grid.push(verticesRow); - } // indices - - - for (let iy = 0; iy < heightSegments; iy++) { - for (let ix = 0; ix < widthSegments; ix++) { - const a = grid[iy][ix + 1]; - const b = grid[iy][ix]; - const c = grid[iy + 1][ix]; - const d = grid[iy + 1][ix + 1]; - if (iy !== 0 || thetaStart > 0) indices.push(a, b, d); - if (iy !== heightSegments - 1 || thetaEnd < Math.PI) indices.push(b, c, d); - } - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); - } - - static fromJSON(data) { - return new SphereGeometry(data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength); - } - - } - - class TetrahedronGeometry extends PolyhedronGeometry { - constructor(radius = 1, detail = 0) { - const vertices = [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1]; - const indices = [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1]; - super(vertices, indices, radius, detail); - this.type = 'TetrahedronGeometry'; - this.parameters = { - radius: radius, - detail: detail - }; - } - - static fromJSON(data) { - return new TetrahedronGeometry(data.radius, data.detail); - } - - } - - /** - * Text = 3D Text - * - * parameters = { - * font: , // font - * - * size: , // size of the text - * height: , // thickness to extrude text - * curveSegments: , // number of points on the curves - * - * bevelEnabled: , // turn on bevel - * bevelThickness: , // how deep into text bevel goes - * bevelSize: , // how far from text outline (including bevelOffset) is bevel - * bevelOffset: // how far from text outline does bevel start - * } - */ - - class TextGeometry extends ExtrudeGeometry { - constructor(text, parameters = {}) { - const font = parameters.font; - - if (!(font && font.isFont)) { - console.error('THREE.TextGeometry: font parameter is not an instance of THREE.Font.'); - return new BufferGeometry(); - } - - const shapes = font.generateShapes(text, parameters.size); // translate parameters to ExtrudeGeometry API - - parameters.depth = parameters.height !== undefined ? parameters.height : 50; // defaults - - if (parameters.bevelThickness === undefined) parameters.bevelThickness = 10; - if (parameters.bevelSize === undefined) parameters.bevelSize = 8; - if (parameters.bevelEnabled === undefined) parameters.bevelEnabled = false; - super(shapes, parameters); - this.type = 'TextGeometry'; - } - - } - - class TorusGeometry extends BufferGeometry { - constructor(radius = 1, tube = 0.4, radialSegments = 8, tubularSegments = 6, arc = Math.PI * 2) { - super(); - this.type = 'TorusGeometry'; - this.parameters = { - radius: radius, - tube: tube, - radialSegments: radialSegments, - tubularSegments: tubularSegments, - arc: arc - }; - radialSegments = Math.floor(radialSegments); - tubularSegments = Math.floor(tubularSegments); // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; // helper variables - - const center = new Vector3(); - const vertex = new Vector3(); - const normal = new Vector3(); // generate vertices, normals and uvs - - for (let j = 0; j <= radialSegments; j++) { - for (let i = 0; i <= tubularSegments; i++) { - const u = i / tubularSegments * arc; - const v = j / radialSegments * Math.PI * 2; // vertex - - vertex.x = (radius + tube * Math.cos(v)) * Math.cos(u); - vertex.y = (radius + tube * Math.cos(v)) * Math.sin(u); - vertex.z = tube * Math.sin(v); - vertices.push(vertex.x, vertex.y, vertex.z); // normal - - center.x = radius * Math.cos(u); - center.y = radius * Math.sin(u); - normal.subVectors(vertex, center).normalize(); - normals.push(normal.x, normal.y, normal.z); // uv - - uvs.push(i / tubularSegments); - uvs.push(j / radialSegments); - } - } // generate indices - - - for (let j = 1; j <= radialSegments; j++) { - for (let i = 1; i <= tubularSegments; i++) { - // indices - const a = (tubularSegments + 1) * j + i - 1; - const b = (tubularSegments + 1) * (j - 1) + i - 1; - const c = (tubularSegments + 1) * (j - 1) + i; - const d = (tubularSegments + 1) * j + i; // faces - - indices.push(a, b, d); - indices.push(b, c, d); - } - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); - } - - static fromJSON(data) { - return new TorusGeometry(data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc); - } - - } - - class TorusKnotGeometry extends BufferGeometry { - constructor(radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3) { - super(); - this.type = 'TorusKnotGeometry'; - this.parameters = { - radius: radius, - tube: tube, - tubularSegments: tubularSegments, - radialSegments: radialSegments, - p: p, - q: q - }; - tubularSegments = Math.floor(tubularSegments); - radialSegments = Math.floor(radialSegments); // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; // helper variables - - const vertex = new Vector3(); - const normal = new Vector3(); - const P1 = new Vector3(); - const P2 = new Vector3(); - const B = new Vector3(); - const T = new Vector3(); - const N = new Vector3(); // generate vertices, normals and uvs - - for (let i = 0; i <= tubularSegments; ++i) { - // the radian "u" is used to calculate the position on the torus curve of the current tubular segement - const u = i / tubularSegments * p * Math.PI * 2; // now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead. - // these points are used to create a special "coordinate space", which is necessary to calculate the correct vertex positions - - calculatePositionOnCurve(u, p, q, radius, P1); - calculatePositionOnCurve(u + 0.01, p, q, radius, P2); // calculate orthonormal basis - - T.subVectors(P2, P1); - N.addVectors(P2, P1); - B.crossVectors(T, N); - N.crossVectors(B, T); // normalize B, N. T can be ignored, we don't use it - - B.normalize(); - N.normalize(); - - for (let j = 0; j <= radialSegments; ++j) { - // now calculate the vertices. they are nothing more than an extrusion of the torus curve. - // because we extrude a shape in the xy-plane, there is no need to calculate a z-value. - const v = j / radialSegments * Math.PI * 2; - const cx = -tube * Math.cos(v); - const cy = tube * Math.sin(v); // now calculate the final vertex position. - // first we orient the extrusion with our basis vectos, then we add it to the current position on the curve - - vertex.x = P1.x + (cx * N.x + cy * B.x); - vertex.y = P1.y + (cx * N.y + cy * B.y); - vertex.z = P1.z + (cx * N.z + cy * B.z); - vertices.push(vertex.x, vertex.y, vertex.z); // normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal) - - normal.subVectors(vertex, P1).normalize(); - normals.push(normal.x, normal.y, normal.z); // uv - - uvs.push(i / tubularSegments); - uvs.push(j / radialSegments); - } - } // generate indices - - - for (let j = 1; j <= tubularSegments; j++) { - for (let i = 1; i <= radialSegments; i++) { - // indices - const a = (radialSegments + 1) * (j - 1) + (i - 1); - const b = (radialSegments + 1) * j + (i - 1); - const c = (radialSegments + 1) * j + i; - const d = (radialSegments + 1) * (j - 1) + i; // faces - - indices.push(a, b, d); - indices.push(b, c, d); - } - } // build geometry - - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // this function calculates the current position on the torus curve - - function calculatePositionOnCurve(u, p, q, radius, position) { - const cu = Math.cos(u); - const su = Math.sin(u); - const quOverP = q / p * u; - const cs = Math.cos(quOverP); - position.x = radius * (2 + cs) * 0.5 * cu; - position.y = radius * (2 + cs) * su * 0.5; - position.z = radius * Math.sin(quOverP) * 0.5; - } - } - - static fromJSON(data) { - return new TorusKnotGeometry(data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q); - } - - } - - class TubeGeometry extends BufferGeometry { - constructor(path, tubularSegments = 64, radius = 1, radialSegments = 8, closed = false) { - super(); - this.type = 'TubeGeometry'; - this.parameters = { - path: path, - tubularSegments: tubularSegments, - radius: radius, - radialSegments: radialSegments, - closed: closed - }; - const frames = path.computeFrenetFrames(tubularSegments, closed); // expose internals - - this.tangents = frames.tangents; - this.normals = frames.normals; - this.binormals = frames.binormals; // helper variables - - const vertex = new Vector3(); - const normal = new Vector3(); - const uv = new Vector2(); - let P = new Vector3(); // buffer - - const vertices = []; - const normals = []; - const uvs = []; - const indices = []; // create buffer data - - generateBufferData(); // build geometry - - this.setIndex(indices); - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - this.setAttribute('normal', new Float32BufferAttribute(normals, 3)); - this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // functions - - function generateBufferData() { - for (let i = 0; i < tubularSegments; i++) { - generateSegment(i); - } // if the geometry is not closed, generate the last row of vertices and normals - // at the regular position on the given path - // - // if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ) - - - generateSegment(closed === false ? tubularSegments : 0); // uvs are generated in a separate function. - // this makes it easy compute correct values for closed geometries - - generateUVs(); // finally create faces - - generateIndices(); - } - - function generateSegment(i) { - // we use getPointAt to sample evenly distributed points from the given path - P = path.getPointAt(i / tubularSegments, P); // retrieve corresponding normal and binormal - - const N = frames.normals[i]; - const B = frames.binormals[i]; // generate normals and vertices for the current segment - - for (let j = 0; j <= radialSegments; j++) { - const v = j / radialSegments * Math.PI * 2; - const sin = Math.sin(v); - const cos = -Math.cos(v); // normal - - normal.x = cos * N.x + sin * B.x; - normal.y = cos * N.y + sin * B.y; - normal.z = cos * N.z + sin * B.z; - normal.normalize(); - normals.push(normal.x, normal.y, normal.z); // vertex - - vertex.x = P.x + radius * normal.x; - vertex.y = P.y + radius * normal.y; - vertex.z = P.z + radius * normal.z; - vertices.push(vertex.x, vertex.y, vertex.z); - } - } - - function generateIndices() { - for (let j = 1; j <= tubularSegments; j++) { - for (let i = 1; i <= radialSegments; i++) { - const a = (radialSegments + 1) * (j - 1) + (i - 1); - const b = (radialSegments + 1) * j + (i - 1); - const c = (radialSegments + 1) * j + i; - const d = (radialSegments + 1) * (j - 1) + i; // faces - - indices.push(a, b, d); - indices.push(b, c, d); - } - } - } - - function generateUVs() { - for (let i = 0; i <= tubularSegments; i++) { - for (let j = 0; j <= radialSegments; j++) { - uv.x = i / tubularSegments; - uv.y = j / radialSegments; - uvs.push(uv.x, uv.y); - } - } - } - } - - toJSON() { - const data = super.toJSON(); - data.path = this.parameters.path.toJSON(); - return data; - } - - static fromJSON(data) { - // This only works for built-in curves (e.g. CatmullRomCurve3). - // User defined curves or instances of CurvePath will not be deserialized. - return new TubeGeometry(new Curves[data.path.type]().fromJSON(data.path), data.tubularSegments, data.radius, data.radialSegments, data.closed); - } - - } - - class WireframeGeometry extends BufferGeometry { - constructor(geometry) { - super(); - this.type = 'WireframeGeometry'; - - if (geometry.isGeometry === true) { - console.error('THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.'); - return; - } // buffer - - - const vertices = []; // helper variables - - const edge = [0, 0], - edges = {}; - const vertex = new Vector3(); - - if (geometry.index !== null) { - // indexed BufferGeometry - const position = geometry.attributes.position; - const indices = geometry.index; - let groups = geometry.groups; - - if (groups.length === 0) { - groups = [{ - start: 0, - count: indices.count, - materialIndex: 0 - }]; - } // create a data structure that contains all eges without duplicates - - - for (let o = 0, ol = groups.length; o < ol; ++o) { - const group = groups[o]; - const start = group.start; - const count = group.count; - - for (let i = start, l = start + count; i < l; i += 3) { - for (let j = 0; j < 3; j++) { - const edge1 = indices.getX(i + j); - const edge2 = indices.getX(i + (j + 1) % 3); - edge[0] = Math.min(edge1, edge2); // sorting prevents duplicates - - edge[1] = Math.max(edge1, edge2); - const key = edge[0] + ',' + edge[1]; - - if (edges[key] === undefined) { - edges[key] = { - index1: edge[0], - index2: edge[1] - }; - } - } - } - } // generate vertices - - - for (const key in edges) { - const e = edges[key]; - vertex.fromBufferAttribute(position, e.index1); - vertices.push(vertex.x, vertex.y, vertex.z); - vertex.fromBufferAttribute(position, e.index2); - vertices.push(vertex.x, vertex.y, vertex.z); - } - } else { - // non-indexed BufferGeometry - const position = geometry.attributes.position; - - for (let i = 0, l = position.count / 3; i < l; i++) { - for (let j = 0; j < 3; j++) { - // three edges per triangle, an edge is represented as (index1, index2) - // e.g. the first triangle has the following edges: (0,1),(1,2),(2,0) - const index1 = 3 * i + j; - vertex.fromBufferAttribute(position, index1); - vertices.push(vertex.x, vertex.y, vertex.z); - const index2 = 3 * i + (j + 1) % 3; - vertex.fromBufferAttribute(position, index2); - vertices.push(vertex.x, vertex.y, vertex.z); - } - } - } // build geometry - - - this.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - } - - } - - var Geometries = /*#__PURE__*/Object.freeze({ - __proto__: null, - BoxGeometry: BoxGeometry, - BoxBufferGeometry: BoxGeometry, - CircleGeometry: CircleGeometry, - CircleBufferGeometry: CircleGeometry, - ConeGeometry: ConeGeometry, - ConeBufferGeometry: ConeGeometry, - CylinderGeometry: CylinderGeometry, - CylinderBufferGeometry: CylinderGeometry, - DodecahedronGeometry: DodecahedronGeometry, - DodecahedronBufferGeometry: DodecahedronGeometry, - EdgesGeometry: EdgesGeometry, - ExtrudeGeometry: ExtrudeGeometry, - ExtrudeBufferGeometry: ExtrudeGeometry, - IcosahedronGeometry: IcosahedronGeometry, - IcosahedronBufferGeometry: IcosahedronGeometry, - LatheGeometry: LatheGeometry, - LatheBufferGeometry: LatheGeometry, - OctahedronGeometry: OctahedronGeometry, - OctahedronBufferGeometry: OctahedronGeometry, - ParametricGeometry: ParametricGeometry, - ParametricBufferGeometry: ParametricGeometry, - PlaneGeometry: PlaneGeometry, - PlaneBufferGeometry: PlaneGeometry, - PolyhedronGeometry: PolyhedronGeometry, - PolyhedronBufferGeometry: PolyhedronGeometry, - RingGeometry: RingGeometry, - RingBufferGeometry: RingGeometry, - ShapeGeometry: ShapeGeometry, - ShapeBufferGeometry: ShapeGeometry, - SphereGeometry: SphereGeometry, - SphereBufferGeometry: SphereGeometry, - TetrahedronGeometry: TetrahedronGeometry, - TetrahedronBufferGeometry: TetrahedronGeometry, - TextGeometry: TextGeometry, - TextBufferGeometry: TextGeometry, - TorusGeometry: TorusGeometry, - TorusBufferGeometry: TorusGeometry, - TorusKnotGeometry: TorusKnotGeometry, - TorusKnotBufferGeometry: TorusKnotGeometry, - TubeGeometry: TubeGeometry, - TubeBufferGeometry: TubeGeometry, - WireframeGeometry: WireframeGeometry - }); - - /** - * parameters = { - * color: - * } - */ - - class ShadowMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'ShadowMaterial'; - this.color = new Color(0x000000); - this.transparent = true; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - return this; - } - - } - - ShadowMaterial.prototype.isShadowMaterial = true; - - class RawShaderMaterial extends ShaderMaterial { - constructor(parameters) { - super(parameters); - this.type = 'RawShaderMaterial'; - } - - } - - RawShaderMaterial.prototype.isRawShaderMaterial = true; - - /** - * parameters = { - * color: , - * roughness: , - * metalness: , - * opacity: , - * - * map: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * emissive: , - * emissiveIntensity: - * emissiveMap: new THREE.Texture( ), - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * roughnessMap: new THREE.Texture( ), - * - * metalnessMap: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ), - * envMapIntensity: - * - * refractionRatio: , - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: , - * morphNormals: , - * - * flatShading: - * } - */ - - class MeshStandardMaterial extends Material { - constructor(parameters) { - super(); - this.defines = { - 'STANDARD': '' - }; - this.type = 'MeshStandardMaterial'; - this.color = new Color(0xffffff); // diffuse - - this.roughness = 1.0; - this.metalness = 0.0; - this.map = null; - this.lightMap = null; - this.lightMapIntensity = 1.0; - this.aoMap = null; - this.aoMapIntensity = 1.0; - this.emissive = new Color(0x000000); - this.emissiveIntensity = 1.0; - this.emissiveMap = null; - this.bumpMap = null; - this.bumpScale = 1; - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2(1, 1); - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - this.roughnessMap = null; - this.metalnessMap = null; - this.alphaMap = null; - this.envMap = null; - this.envMapIntensity = 1.0; - this.refractionRatio = 0.98; - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - this.morphTargets = false; - this.morphNormals = false; - this.flatShading = false; - this.vertexTangents = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.defines = { - 'STANDARD': '' - }; - this.color.copy(source.color); - this.roughness = source.roughness; - this.metalness = source.metalness; - this.map = source.map; - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - this.emissive.copy(source.emissive); - this.emissiveMap = source.emissiveMap; - this.emissiveIntensity = source.emissiveIntensity; - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy(source.normalScale); - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - this.roughnessMap = source.roughnessMap; - this.metalnessMap = source.metalnessMap; - this.alphaMap = source.alphaMap; - this.envMap = source.envMap; - this.envMapIntensity = source.envMapIntensity; - this.refractionRatio = source.refractionRatio; - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - this.flatShading = source.flatShading; - this.vertexTangents = source.vertexTangents; - return this; - } - - } - - MeshStandardMaterial.prototype.isMeshStandardMaterial = true; - - /** - * parameters = { - * clearcoat: , - * clearcoatMap: new THREE.Texture( ), - * clearcoatRoughness: , - * clearcoatRoughnessMap: new THREE.Texture( ), - * clearcoatNormalScale: , - * clearcoatNormalMap: new THREE.Texture( ), - * - * reflectivity: , - * ior: , - * - * sheen: , - * - * transmission: , - * transmissionMap: new THREE.Texture( ), - * - * thickness: , - * thicknessMap: new THREE.Texture( ), - * attenuationDistance: , - * attenuationColor: - * } - */ - - class MeshPhysicalMaterial extends MeshStandardMaterial { - constructor(parameters) { - super(); - this.defines = { - 'STANDARD': '', - 'PHYSICAL': '' - }; - this.type = 'MeshPhysicalMaterial'; - this.clearcoat = 0.0; - this.clearcoatMap = null; - this.clearcoatRoughness = 0.0; - this.clearcoatRoughnessMap = null; - this.clearcoatNormalScale = new Vector2(1, 1); - this.clearcoatNormalMap = null; - this.reflectivity = 0.5; // maps to F0 = 0.04 - - Object.defineProperty(this, 'ior', { - get: function () { - return (1 + 0.4 * this.reflectivity) / (1 - 0.4 * this.reflectivity); - }, - set: function (ior) { - this.reflectivity = clamp(2.5 * (ior - 1) / (ior + 1), 0, 1); - } - }); - this.sheen = null; // null will disable sheen bsdf - - this.transmission = 0.0; - this.transmissionMap = null; - this.thickness = 0.01; - this.thicknessMap = null; - this.attenuationDistance = 0.0; - this.attenuationColor = new Color(1, 1, 1); - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.defines = { - 'STANDARD': '', - 'PHYSICAL': '' - }; - this.clearcoat = source.clearcoat; - this.clearcoatMap = source.clearcoatMap; - this.clearcoatRoughness = source.clearcoatRoughness; - this.clearcoatRoughnessMap = source.clearcoatRoughnessMap; - this.clearcoatNormalMap = source.clearcoatNormalMap; - this.clearcoatNormalScale.copy(source.clearcoatNormalScale); - this.reflectivity = source.reflectivity; - - if (source.sheen) { - this.sheen = (this.sheen || new Color()).copy(source.sheen); - } else { - this.sheen = null; - } - - this.transmission = source.transmission; - this.transmissionMap = source.transmissionMap; - this.thickness = source.thickness; - this.thicknessMap = source.thicknessMap; - this.attenuationDistance = source.attenuationDistance; - this.attenuationColor.copy(source.attenuationColor); - return this; - } - - } - - MeshPhysicalMaterial.prototype.isMeshPhysicalMaterial = true; - - /** - * parameters = { - * color: , - * specular: , - * shininess: , - * opacity: , - * - * map: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * emissive: , - * emissiveIntensity: - * emissiveMap: new THREE.Texture( ), - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * specularMap: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ), - * combine: THREE.MultiplyOperation, - * reflectivity: , - * refractionRatio: , - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: , - * morphNormals: , - * - * flatShading: - * } - */ - - class MeshPhongMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'MeshPhongMaterial'; - this.color = new Color(0xffffff); // diffuse - - this.specular = new Color(0x111111); - this.shininess = 30; - this.map = null; - this.lightMap = null; - this.lightMapIntensity = 1.0; - this.aoMap = null; - this.aoMapIntensity = 1.0; - this.emissive = new Color(0x000000); - this.emissiveIntensity = 1.0; - this.emissiveMap = null; - this.bumpMap = null; - this.bumpScale = 1; - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2(1, 1); - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - this.specularMap = null; - this.alphaMap = null; - this.envMap = null; - this.combine = MultiplyOperation; - this.reflectivity = 1; - this.refractionRatio = 0.98; - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - this.morphTargets = false; - this.morphNormals = false; - this.flatShading = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - this.specular.copy(source.specular); - this.shininess = source.shininess; - this.map = source.map; - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - this.emissive.copy(source.emissive); - this.emissiveMap = source.emissiveMap; - this.emissiveIntensity = source.emissiveIntensity; - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy(source.normalScale); - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - this.specularMap = source.specularMap; - this.alphaMap = source.alphaMap; - this.envMap = source.envMap; - this.combine = source.combine; - this.reflectivity = source.reflectivity; - this.refractionRatio = source.refractionRatio; - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - this.flatShading = source.flatShading; - return this; - } - - } - - MeshPhongMaterial.prototype.isMeshPhongMaterial = true; - - /** - * parameters = { - * color: , - * - * map: new THREE.Texture( ), - * gradientMap: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * emissive: , - * emissiveIntensity: - * emissiveMap: new THREE.Texture( ), - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * alphaMap: new THREE.Texture( ), - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: , - * morphNormals: - * } - */ - - class MeshToonMaterial extends Material { - constructor(parameters) { - super(); - this.defines = { - 'TOON': '' - }; - this.type = 'MeshToonMaterial'; - this.color = new Color(0xffffff); - this.map = null; - this.gradientMap = null; - this.lightMap = null; - this.lightMapIntensity = 1.0; - this.aoMap = null; - this.aoMapIntensity = 1.0; - this.emissive = new Color(0x000000); - this.emissiveIntensity = 1.0; - this.emissiveMap = null; - this.bumpMap = null; - this.bumpScale = 1; - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2(1, 1); - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - this.alphaMap = null; - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - this.morphTargets = false; - this.morphNormals = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - this.map = source.map; - this.gradientMap = source.gradientMap; - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - this.emissive.copy(source.emissive); - this.emissiveMap = source.emissiveMap; - this.emissiveIntensity = source.emissiveIntensity; - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy(source.normalScale); - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - this.alphaMap = source.alphaMap; - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - return this; - } - - } - - MeshToonMaterial.prototype.isMeshToonMaterial = true; - - /** - * parameters = { - * opacity: , - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * wireframe: , - * wireframeLinewidth: - * - * morphTargets: , - * morphNormals: , - * - * flatShading: - * } - */ - - class MeshNormalMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'MeshNormalMaterial'; - this.bumpMap = null; - this.bumpScale = 1; - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2(1, 1); - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - this.wireframe = false; - this.wireframeLinewidth = 1; - this.fog = false; - this.morphTargets = false; - this.morphNormals = false; - this.flatShading = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy(source.normalScale); - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - this.flatShading = source.flatShading; - return this; - } - - } - - MeshNormalMaterial.prototype.isMeshNormalMaterial = true; - - /** - * parameters = { - * color: , - * opacity: , - * - * map: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * emissive: , - * emissiveIntensity: - * emissiveMap: new THREE.Texture( ), - * - * specularMap: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ), - * combine: THREE.Multiply, - * reflectivity: , - * refractionRatio: , - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: , - * morphNormals: - * } - */ - - class MeshLambertMaterial extends Material { - constructor(parameters) { - super(); - this.type = 'MeshLambertMaterial'; - this.color = new Color(0xffffff); // diffuse - - this.map = null; - this.lightMap = null; - this.lightMapIntensity = 1.0; - this.aoMap = null; - this.aoMapIntensity = 1.0; - this.emissive = new Color(0x000000); - this.emissiveIntensity = 1.0; - this.emissiveMap = null; - this.specularMap = null; - this.alphaMap = null; - this.envMap = null; - this.combine = MultiplyOperation; - this.reflectivity = 1; - this.refractionRatio = 0.98; - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - this.morphTargets = false; - this.morphNormals = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - this.map = source.map; - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - this.emissive.copy(source.emissive); - this.emissiveMap = source.emissiveMap; - this.emissiveIntensity = source.emissiveIntensity; - this.specularMap = source.specularMap; - this.alphaMap = source.alphaMap; - this.envMap = source.envMap; - this.combine = source.combine; - this.reflectivity = source.reflectivity; - this.refractionRatio = source.refractionRatio; - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - return this; - } - - } - - MeshLambertMaterial.prototype.isMeshLambertMaterial = true; - - /** - * parameters = { - * color: , - * opacity: , - * - * matcap: new THREE.Texture( ), - * - * map: new THREE.Texture( ), - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * alphaMap: new THREE.Texture( ), - * - * morphTargets: , - * morphNormals: - * - * flatShading: - * } - */ - - class MeshMatcapMaterial extends Material { - constructor(parameters) { - super(); - this.defines = { - 'MATCAP': '' - }; - this.type = 'MeshMatcapMaterial'; - this.color = new Color(0xffffff); // diffuse - - this.matcap = null; - this.map = null; - this.bumpMap = null; - this.bumpScale = 1; - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2(1, 1); - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - this.alphaMap = null; - this.morphTargets = false; - this.morphNormals = false; - this.flatShading = false; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.defines = { - 'MATCAP': '' - }; - this.color.copy(source.color); - this.matcap = source.matcap; - this.map = source.map; - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy(source.normalScale); - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - this.alphaMap = source.alphaMap; - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - this.flatShading = source.flatShading; - return this; - } - - } - - MeshMatcapMaterial.prototype.isMeshMatcapMaterial = true; - - /** - * parameters = { - * color: , - * opacity: , - * - * linewidth: , - * - * scale: , - * dashSize: , - * gapSize: - * } - */ - - class LineDashedMaterial extends LineBasicMaterial { - constructor(parameters) { - super(); - this.type = 'LineDashedMaterial'; - this.scale = 1; - this.dashSize = 3; - this.gapSize = 1; - this.setValues(parameters); - } - - copy(source) { - super.copy(source); - this.scale = source.scale; - this.dashSize = source.dashSize; - this.gapSize = source.gapSize; - return this; - } - - } - - LineDashedMaterial.prototype.isLineDashedMaterial = true; - - var Materials = /*#__PURE__*/Object.freeze({ - __proto__: null, - ShadowMaterial: ShadowMaterial, - SpriteMaterial: SpriteMaterial, - RawShaderMaterial: RawShaderMaterial, - ShaderMaterial: ShaderMaterial, - PointsMaterial: PointsMaterial, - MeshPhysicalMaterial: MeshPhysicalMaterial, - MeshStandardMaterial: MeshStandardMaterial, - MeshPhongMaterial: MeshPhongMaterial, - MeshToonMaterial: MeshToonMaterial, - MeshNormalMaterial: MeshNormalMaterial, - MeshLambertMaterial: MeshLambertMaterial, - MeshDepthMaterial: MeshDepthMaterial, - MeshDistanceMaterial: MeshDistanceMaterial, - MeshBasicMaterial: MeshBasicMaterial, - MeshMatcapMaterial: MeshMatcapMaterial, - LineDashedMaterial: LineDashedMaterial, - LineBasicMaterial: LineBasicMaterial, - Material: Material - }); - - const AnimationUtils = { - // same as Array.prototype.slice, but also works on typed arrays - arraySlice: function (array, from, to) { - if (AnimationUtils.isTypedArray(array)) { - // in ios9 array.subarray(from, undefined) will return empty array - // but array.subarray(from) or array.subarray(from, len) is correct - return new array.constructor(array.subarray(from, to !== undefined ? to : array.length)); - } - - return array.slice(from, to); - }, - // converts an array to a specific type - convertArray: function (array, type, forceClone) { - if (!array || // let 'undefined' and 'null' pass - !forceClone && array.constructor === type) return array; - - if (typeof type.BYTES_PER_ELEMENT === 'number') { - return new type(array); // create typed array - } - - return Array.prototype.slice.call(array); // create Array - }, - isTypedArray: function (object) { - return ArrayBuffer.isView(object) && !(object instanceof DataView); - }, - // returns an array by which times and values can be sorted - getKeyframeOrder: function (times) { - function compareTime(i, j) { - return times[i] - times[j]; - } - - const n = times.length; - const result = new Array(n); - - for (let i = 0; i !== n; ++i) result[i] = i; - - result.sort(compareTime); - return result; - }, - // uses the array previously returned by 'getKeyframeOrder' to sort data - sortedArray: function (values, stride, order) { - const nValues = values.length; - const result = new values.constructor(nValues); - - for (let i = 0, dstOffset = 0; dstOffset !== nValues; ++i) { - const srcOffset = order[i] * stride; - - for (let j = 0; j !== stride; ++j) { - result[dstOffset++] = values[srcOffset + j]; - } - } - - return result; - }, - // function for parsing AOS keyframe formats - flattenJSON: function (jsonKeys, times, values, valuePropertyName) { - let i = 1, - key = jsonKeys[0]; - - while (key !== undefined && key[valuePropertyName] === undefined) { - key = jsonKeys[i++]; - } - - if (key === undefined) return; // no data - - let value = key[valuePropertyName]; - if (value === undefined) return; // no data - - if (Array.isArray(value)) { - do { - value = key[valuePropertyName]; - - if (value !== undefined) { - times.push(key.time); - values.push.apply(values, value); // push all elements - } - - key = jsonKeys[i++]; - } while (key !== undefined); - } else if (value.toArray !== undefined) { - // ...assume THREE.Math-ish - do { - value = key[valuePropertyName]; - - if (value !== undefined) { - times.push(key.time); - value.toArray(values, values.length); - } - - key = jsonKeys[i++]; - } while (key !== undefined); - } else { - // otherwise push as-is - do { - value = key[valuePropertyName]; - - if (value !== undefined) { - times.push(key.time); - values.push(value); - } - - key = jsonKeys[i++]; - } while (key !== undefined); - } - }, - subclip: function (sourceClip, name, startFrame, endFrame, fps = 30) { - const clip = sourceClip.clone(); - clip.name = name; - const tracks = []; - - for (let i = 0; i < clip.tracks.length; ++i) { - const track = clip.tracks[i]; - const valueSize = track.getValueSize(); - const times = []; - const values = []; - - for (let j = 0; j < track.times.length; ++j) { - const frame = track.times[j] * fps; - if (frame < startFrame || frame >= endFrame) continue; - times.push(track.times[j]); - - for (let k = 0; k < valueSize; ++k) { - values.push(track.values[j * valueSize + k]); - } - } - - if (times.length === 0) continue; - track.times = AnimationUtils.convertArray(times, track.times.constructor); - track.values = AnimationUtils.convertArray(values, track.values.constructor); - tracks.push(track); - } - - clip.tracks = tracks; // find minimum .times value across all tracks in the trimmed clip - - let minStartTime = Infinity; - - for (let i = 0; i < clip.tracks.length; ++i) { - if (minStartTime > clip.tracks[i].times[0]) { - minStartTime = clip.tracks[i].times[0]; - } - } // shift all tracks such that clip begins at t=0 - - - for (let i = 0; i < clip.tracks.length; ++i) { - clip.tracks[i].shift(-1 * minStartTime); - } - - clip.resetDuration(); - return clip; - }, - makeClipAdditive: function (targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30) { - if (fps <= 0) fps = 30; - const numTracks = referenceClip.tracks.length; - const referenceTime = referenceFrame / fps; // Make each track's values relative to the values at the reference frame - - for (let i = 0; i < numTracks; ++i) { - const referenceTrack = referenceClip.tracks[i]; - const referenceTrackType = referenceTrack.ValueTypeName; // Skip this track if it's non-numeric - - if (referenceTrackType === 'bool' || referenceTrackType === 'string') continue; // Find the track in the target clip whose name and type matches the reference track - - const targetTrack = targetClip.tracks.find(function (track) { - return track.name === referenceTrack.name && track.ValueTypeName === referenceTrackType; - }); - if (targetTrack === undefined) continue; - let referenceOffset = 0; - const referenceValueSize = referenceTrack.getValueSize(); - - if (referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) { - referenceOffset = referenceValueSize / 3; - } - - let targetOffset = 0; - const targetValueSize = targetTrack.getValueSize(); - - if (targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) { - targetOffset = targetValueSize / 3; - } - - const lastIndex = referenceTrack.times.length - 1; - let referenceValue; // Find the value to subtract out of the track - - if (referenceTime <= referenceTrack.times[0]) { - // Reference frame is earlier than the first keyframe, so just use the first keyframe - const startIndex = referenceOffset; - const endIndex = referenceValueSize - referenceOffset; - referenceValue = AnimationUtils.arraySlice(referenceTrack.values, startIndex, endIndex); - } else if (referenceTime >= referenceTrack.times[lastIndex]) { - // Reference frame is after the last keyframe, so just use the last keyframe - const startIndex = lastIndex * referenceValueSize + referenceOffset; - const endIndex = startIndex + referenceValueSize - referenceOffset; - referenceValue = AnimationUtils.arraySlice(referenceTrack.values, startIndex, endIndex); - } else { - // Interpolate to the reference value - const interpolant = referenceTrack.createInterpolant(); - const startIndex = referenceOffset; - const endIndex = referenceValueSize - referenceOffset; - interpolant.evaluate(referenceTime); - referenceValue = AnimationUtils.arraySlice(interpolant.resultBuffer, startIndex, endIndex); - } // Conjugate the quaternion - - - if (referenceTrackType === 'quaternion') { - const referenceQuat = new Quaternion().fromArray(referenceValue).normalize().conjugate(); - referenceQuat.toArray(referenceValue); - } // Subtract the reference value from all of the track values - - - const numTimes = targetTrack.times.length; - - for (let j = 0; j < numTimes; ++j) { - const valueStart = j * targetValueSize + targetOffset; - - if (referenceTrackType === 'quaternion') { - // Multiply the conjugate for quaternion track types - Quaternion.multiplyQuaternionsFlat(targetTrack.values, valueStart, referenceValue, 0, targetTrack.values, valueStart); - } else { - const valueEnd = targetValueSize - targetOffset * 2; // Subtract each value for all other numeric track types - - for (let k = 0; k < valueEnd; ++k) { - targetTrack.values[valueStart + k] -= referenceValue[k]; - } - } - } - } - - targetClip.blendMode = AdditiveAnimationBlendMode; - return targetClip; - } - }; - - /** - * Abstract base class of interpolants over parametric samples. - * - * The parameter domain is one dimensional, typically the time or a path - * along a curve defined by the data. - * - * The sample values can have any dimensionality and derived classes may - * apply special interpretations to the data. - * - * This class provides the interval seek in a Template Method, deferring - * the actual interpolation to derived classes. - * - * Time complexity is O(1) for linear access crossing at most two points - * and O(log N) for random access, where N is the number of positions. - * - * References: - * - * http://www.oodesign.com/template-method-pattern.html - * - */ - class Interpolant { - constructor(parameterPositions, sampleValues, sampleSize, resultBuffer) { - this.parameterPositions = parameterPositions; - this._cachedIndex = 0; - this.resultBuffer = resultBuffer !== undefined ? resultBuffer : new sampleValues.constructor(sampleSize); - this.sampleValues = sampleValues; - this.valueSize = sampleSize; - this.settings = null; - this.DefaultSettings_ = {}; - } - - evaluate(t) { - const pp = this.parameterPositions; - let i1 = this._cachedIndex, - t1 = pp[i1], - t0 = pp[i1 - 1]; - - validate_interval: { - seek: { - let right; - - linear_scan: { - //- See http://jsperf.com/comparison-to-undefined/3 - //- slower code: - //- - //- if ( t >= t1 || t1 === undefined ) { - forward_scan: if (!(t < t1)) { - for (let giveUpAt = i1 + 2;;) { - if (t1 === undefined) { - if (t < t0) break forward_scan; // after end - - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_(i1 - 1, t, t0); - } - - if (i1 === giveUpAt) break; // this loop - - t0 = t1; - t1 = pp[++i1]; - - if (t < t1) { - // we have arrived at the sought interval - break seek; - } - } // prepare binary search on the right side of the index - - - right = pp.length; - break linear_scan; - } //- slower code: - //- if ( t < t0 || t0 === undefined ) { - - - if (!(t >= t0)) { - // looping? - const t1global = pp[1]; - - if (t < t1global) { - i1 = 2; // + 1, using the scan for the details - - t0 = t1global; - } // linear reverse scan - - - for (let giveUpAt = i1 - 2;;) { - if (t0 === undefined) { - // before start - this._cachedIndex = 0; - return this.beforeStart_(0, t, t1); - } - - if (i1 === giveUpAt) break; // this loop - - t1 = t0; - t0 = pp[--i1 - 1]; - - if (t >= t0) { - // we have arrived at the sought interval - break seek; - } - } // prepare binary search on the left side of the index - - - right = i1; - i1 = 0; - break linear_scan; - } // the interval is valid - - - break validate_interval; - } // linear scan - // binary search - - - while (i1 < right) { - const mid = i1 + right >>> 1; - - if (t < pp[mid]) { - right = mid; - } else { - i1 = mid + 1; - } - } - - t1 = pp[i1]; - t0 = pp[i1 - 1]; // check boundary cases, again - - if (t0 === undefined) { - this._cachedIndex = 0; - return this.beforeStart_(0, t, t1); - } - - if (t1 === undefined) { - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_(i1 - 1, t0, t); - } - } // seek - - - this._cachedIndex = i1; - this.intervalChanged_(i1, t0, t1); - } // validate_interval - - - return this.interpolate_(i1, t0, t, t1); - } - - getSettings_() { - return this.settings || this.DefaultSettings_; - } - - copySampleValue_(index) { - // copies a sample value to the result buffer - const result = this.resultBuffer, - values = this.sampleValues, - stride = this.valueSize, - offset = index * stride; - - for (let i = 0; i !== stride; ++i) { - result[i] = values[offset + i]; - } - - return result; - } // Template methods for derived classes: - - - interpolate_() - /* i1, t0, t, t1 */ - { - throw new Error('call to abstract method'); // implementations shall return this.resultBuffer - } - - intervalChanged_() - /* i1, t0, t1 */ - {// empty - } - - } // ALIAS DEFINITIONS - - - Interpolant.prototype.beforeStart_ = Interpolant.prototype.copySampleValue_; - Interpolant.prototype.afterEnd_ = Interpolant.prototype.copySampleValue_; - - /** - * Fast and simple cubic spline interpolant. - * - * It was derived from a Hermitian construction setting the first derivative - * at each sample position to the linear slope between neighboring positions - * over their parameter interval. - */ - - class CubicInterpolant extends Interpolant { - constructor(parameterPositions, sampleValues, sampleSize, resultBuffer) { - super(parameterPositions, sampleValues, sampleSize, resultBuffer); - this._weightPrev = -0; - this._offsetPrev = -0; - this._weightNext = -0; - this._offsetNext = -0; - this.DefaultSettings_ = { - endingStart: ZeroCurvatureEnding, - endingEnd: ZeroCurvatureEnding - }; - } - - intervalChanged_(i1, t0, t1) { - const pp = this.parameterPositions; - let iPrev = i1 - 2, - iNext = i1 + 1, - tPrev = pp[iPrev], - tNext = pp[iNext]; - - if (tPrev === undefined) { - switch (this.getSettings_().endingStart) { - case ZeroSlopeEnding: - // f'(t0) = 0 - iPrev = i1; - tPrev = 2 * t0 - t1; - break; - - case WrapAroundEnding: - // use the other end of the curve - iPrev = pp.length - 2; - tPrev = t0 + pp[iPrev] - pp[iPrev + 1]; - break; - - default: - // ZeroCurvatureEnding - // f''(t0) = 0 a.k.a. Natural Spline - iPrev = i1; - tPrev = t1; - } - } - - if (tNext === undefined) { - switch (this.getSettings_().endingEnd) { - case ZeroSlopeEnding: - // f'(tN) = 0 - iNext = i1; - tNext = 2 * t1 - t0; - break; - - case WrapAroundEnding: - // use the other end of the curve - iNext = 1; - tNext = t1 + pp[1] - pp[0]; - break; - - default: - // ZeroCurvatureEnding - // f''(tN) = 0, a.k.a. Natural Spline - iNext = i1 - 1; - tNext = t0; - } - } - - const halfDt = (t1 - t0) * 0.5, - stride = this.valueSize; - this._weightPrev = halfDt / (t0 - tPrev); - this._weightNext = halfDt / (tNext - t1); - this._offsetPrev = iPrev * stride; - this._offsetNext = iNext * stride; - } - - interpolate_(i1, t0, t, t1) { - const result = this.resultBuffer, - values = this.sampleValues, - stride = this.valueSize, - o1 = i1 * stride, - o0 = o1 - stride, - oP = this._offsetPrev, - oN = this._offsetNext, - wP = this._weightPrev, - wN = this._weightNext, - p = (t - t0) / (t1 - t0), - pp = p * p, - ppp = pp * p; // evaluate polynomials - - const sP = -wP * ppp + 2 * wP * pp - wP * p; - const s0 = (1 + wP) * ppp + (-1.5 - 2 * wP) * pp + (-0.5 + wP) * p + 1; - const s1 = (-1 - wN) * ppp + (1.5 + wN) * pp + 0.5 * p; - const sN = wN * ppp - wN * pp; // combine data linearly - - for (let i = 0; i !== stride; ++i) { - result[i] = sP * values[oP + i] + s0 * values[o0 + i] + s1 * values[o1 + i] + sN * values[oN + i]; - } - - return result; - } - - } - - class LinearInterpolant extends Interpolant { - constructor(parameterPositions, sampleValues, sampleSize, resultBuffer) { - super(parameterPositions, sampleValues, sampleSize, resultBuffer); - } - - interpolate_(i1, t0, t, t1) { - const result = this.resultBuffer, - values = this.sampleValues, - stride = this.valueSize, - offset1 = i1 * stride, - offset0 = offset1 - stride, - weight1 = (t - t0) / (t1 - t0), - weight0 = 1 - weight1; - - for (let i = 0; i !== stride; ++i) { - result[i] = values[offset0 + i] * weight0 + values[offset1 + i] * weight1; - } - - return result; - } - - } - - /** - * - * Interpolant that evaluates to the sample value at the position preceeding - * the parameter. - */ - - class DiscreteInterpolant extends Interpolant { - constructor(parameterPositions, sampleValues, sampleSize, resultBuffer) { - super(parameterPositions, sampleValues, sampleSize, resultBuffer); - } - - interpolate_(i1 - /*, t0, t, t1 */ - ) { - return this.copySampleValue_(i1 - 1); - } - - } - - class KeyframeTrack { - constructor(name, times, values, interpolation) { - if (name === undefined) throw new Error('THREE.KeyframeTrack: track name is undefined'); - if (times === undefined || times.length === 0) throw new Error('THREE.KeyframeTrack: no keyframes in track named ' + name); - this.name = name; - this.times = AnimationUtils.convertArray(times, this.TimeBufferType); - this.values = AnimationUtils.convertArray(values, this.ValueBufferType); - this.setInterpolation(interpolation || this.DefaultInterpolation); - } // Serialization (in static context, because of constructor invocation - // and automatic invocation of .toJSON): - - - static toJSON(track) { - const trackType = track.constructor; - let json; // derived classes can define a static toJSON method - - if (trackType.toJSON !== this.toJSON) { - json = trackType.toJSON(track); - } else { - // by default, we assume the data can be serialized as-is - json = { - 'name': track.name, - 'times': AnimationUtils.convertArray(track.times, Array), - 'values': AnimationUtils.convertArray(track.values, Array) - }; - const interpolation = track.getInterpolation(); - - if (interpolation !== track.DefaultInterpolation) { - json.interpolation = interpolation; - } - } - - json.type = track.ValueTypeName; // mandatory - - return json; - } - - InterpolantFactoryMethodDiscrete(result) { - return new DiscreteInterpolant(this.times, this.values, this.getValueSize(), result); - } - - InterpolantFactoryMethodLinear(result) { - return new LinearInterpolant(this.times, this.values, this.getValueSize(), result); - } - - InterpolantFactoryMethodSmooth(result) { - return new CubicInterpolant(this.times, this.values, this.getValueSize(), result); - } - - setInterpolation(interpolation) { - let factoryMethod; - - switch (interpolation) { - case InterpolateDiscrete: - factoryMethod = this.InterpolantFactoryMethodDiscrete; - break; - - case InterpolateLinear: - factoryMethod = this.InterpolantFactoryMethodLinear; - break; - - case InterpolateSmooth: - factoryMethod = this.InterpolantFactoryMethodSmooth; - break; - } - - if (factoryMethod === undefined) { - const message = 'unsupported interpolation for ' + this.ValueTypeName + ' keyframe track named ' + this.name; - - if (this.createInterpolant === undefined) { - // fall back to default, unless the default itself is messed up - if (interpolation !== this.DefaultInterpolation) { - this.setInterpolation(this.DefaultInterpolation); - } else { - throw new Error(message); // fatal, in this case - } - } - - console.warn('THREE.KeyframeTrack:', message); - return this; - } - - this.createInterpolant = factoryMethod; - return this; - } - - getInterpolation() { - switch (this.createInterpolant) { - case this.InterpolantFactoryMethodDiscrete: - return InterpolateDiscrete; - - case this.InterpolantFactoryMethodLinear: - return InterpolateLinear; - - case this.InterpolantFactoryMethodSmooth: - return InterpolateSmooth; - } - } - - getValueSize() { - return this.values.length / this.times.length; - } // move all keyframes either forwards or backwards in time - - - shift(timeOffset) { - if (timeOffset !== 0.0) { - const times = this.times; - - for (let i = 0, n = times.length; i !== n; ++i) { - times[i] += timeOffset; - } - } - - return this; - } // scale all keyframe times by a factor (useful for frame <-> seconds conversions) - - - scale(timeScale) { - if (timeScale !== 1.0) { - const times = this.times; - - for (let i = 0, n = times.length; i !== n; ++i) { - times[i] *= timeScale; - } - } - - return this; - } // removes keyframes before and after animation without changing any values within the range [startTime, endTime]. - // IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values - - - trim(startTime, endTime) { - const times = this.times, - nKeys = times.length; - let from = 0, - to = nKeys - 1; - - while (from !== nKeys && times[from] < startTime) { - ++from; - } - - while (to !== -1 && times[to] > endTime) { - --to; - } - - ++to; // inclusive -> exclusive bound - - if (from !== 0 || to !== nKeys) { - // empty tracks are forbidden, so keep at least one keyframe - if (from >= to) { - to = Math.max(to, 1); - from = to - 1; - } - - const stride = this.getValueSize(); - this.times = AnimationUtils.arraySlice(times, from, to); - this.values = AnimationUtils.arraySlice(this.values, from * stride, to * stride); - } - - return this; - } // ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable - - - validate() { - let valid = true; - const valueSize = this.getValueSize(); - - if (valueSize - Math.floor(valueSize) !== 0) { - console.error('THREE.KeyframeTrack: Invalid value size in track.', this); - valid = false; - } - - const times = this.times, - values = this.values, - nKeys = times.length; - - if (nKeys === 0) { - console.error('THREE.KeyframeTrack: Track is empty.', this); - valid = false; - } - - let prevTime = null; - - for (let i = 0; i !== nKeys; i++) { - const currTime = times[i]; - - if (typeof currTime === 'number' && isNaN(currTime)) { - console.error('THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime); - valid = false; - break; - } - - if (prevTime !== null && prevTime > currTime) { - console.error('THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime); - valid = false; - break; - } - - prevTime = currTime; - } - - if (values !== undefined) { - if (AnimationUtils.isTypedArray(values)) { - for (let i = 0, n = values.length; i !== n; ++i) { - const value = values[i]; - - if (isNaN(value)) { - console.error('THREE.KeyframeTrack: Value is not a valid number.', this, i, value); - valid = false; - break; - } - } - } - } - - return valid; - } // removes equivalent sequential keys as common in morph target sequences - // (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0) - - - optimize() { - // times or values may be shared with other tracks, so overwriting is unsafe - const times = AnimationUtils.arraySlice(this.times), - values = AnimationUtils.arraySlice(this.values), - stride = this.getValueSize(), - smoothInterpolation = this.getInterpolation() === InterpolateSmooth, - lastIndex = times.length - 1; - let writeIndex = 1; - - for (let i = 1; i < lastIndex; ++i) { - let keep = false; - const time = times[i]; - const timeNext = times[i + 1]; // remove adjacent keyframes scheduled at the same time - - if (time !== timeNext && (i !== 1 || time !== times[0])) { - if (!smoothInterpolation) { - // remove unnecessary keyframes same as their neighbors - const offset = i * stride, - offsetP = offset - stride, - offsetN = offset + stride; - - for (let j = 0; j !== stride; ++j) { - const value = values[offset + j]; - - if (value !== values[offsetP + j] || value !== values[offsetN + j]) { - keep = true; - break; - } - } - } else { - keep = true; - } - } // in-place compaction - - - if (keep) { - if (i !== writeIndex) { - times[writeIndex] = times[i]; - const readOffset = i * stride, - writeOffset = writeIndex * stride; - - for (let j = 0; j !== stride; ++j) { - values[writeOffset + j] = values[readOffset + j]; - } - } - - ++writeIndex; - } - } // flush last keyframe (compaction looks ahead) - - - if (lastIndex > 0) { - times[writeIndex] = times[lastIndex]; - - for (let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++j) { - values[writeOffset + j] = values[readOffset + j]; - } - - ++writeIndex; - } - - if (writeIndex !== times.length) { - this.times = AnimationUtils.arraySlice(times, 0, writeIndex); - this.values = AnimationUtils.arraySlice(values, 0, writeIndex * stride); - } else { - this.times = times; - this.values = values; - } - - return this; - } - - clone() { - const times = AnimationUtils.arraySlice(this.times, 0); - const values = AnimationUtils.arraySlice(this.values, 0); - const TypedKeyframeTrack = this.constructor; - const track = new TypedKeyframeTrack(this.name, times, values); // Interpolant argument to constructor is not saved, so copy the factory method directly. - - track.createInterpolant = this.createInterpolant; - return track; - } - - } - - KeyframeTrack.prototype.TimeBufferType = Float32Array; - KeyframeTrack.prototype.ValueBufferType = Float32Array; - KeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear; - - /** - * A Track of Boolean keyframe values. - */ - - class BooleanKeyframeTrack extends KeyframeTrack {} - - BooleanKeyframeTrack.prototype.ValueTypeName = 'bool'; - BooleanKeyframeTrack.prototype.ValueBufferType = Array; - BooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete; - BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined; - BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; // Note: Actually this track could have a optimized / compressed - - /** - * A Track of keyframe values that represent color. - */ - - class ColorKeyframeTrack extends KeyframeTrack {} - - ColorKeyframeTrack.prototype.ValueTypeName = 'color'; // ValueBufferType is inherited - - /** - * A Track of numeric keyframe values. - */ - - class NumberKeyframeTrack extends KeyframeTrack {} - - NumberKeyframeTrack.prototype.ValueTypeName = 'number'; // ValueBufferType is inherited - - /** - * Spherical linear unit quaternion interpolant. - */ - - class QuaternionLinearInterpolant extends Interpolant { - constructor(parameterPositions, sampleValues, sampleSize, resultBuffer) { - super(parameterPositions, sampleValues, sampleSize, resultBuffer); - } - - interpolate_(i1, t0, t, t1) { - const result = this.resultBuffer, - values = this.sampleValues, - stride = this.valueSize, - alpha = (t - t0) / (t1 - t0); - let offset = i1 * stride; - - for (let end = offset + stride; offset !== end; offset += 4) { - Quaternion.slerpFlat(result, 0, values, offset - stride, values, offset, alpha); - } - - return result; - } - - } - - /** - * A Track of quaternion keyframe values. - */ - - class QuaternionKeyframeTrack extends KeyframeTrack { - InterpolantFactoryMethodLinear(result) { - return new QuaternionLinearInterpolant(this.times, this.values, this.getValueSize(), result); - } - - } - - QuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion'; // ValueBufferType is inherited - - QuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear; - QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; - - /** - * A Track that interpolates Strings - */ - - class StringKeyframeTrack extends KeyframeTrack {} - - StringKeyframeTrack.prototype.ValueTypeName = 'string'; - StringKeyframeTrack.prototype.ValueBufferType = Array; - StringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete; - StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined; - StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; - - /** - * A Track of vectored keyframe values. - */ - - class VectorKeyframeTrack extends KeyframeTrack {} - - VectorKeyframeTrack.prototype.ValueTypeName = 'vector'; // ValueBufferType is inherited - - class AnimationClip { - constructor(name, duration = -1, tracks, blendMode = NormalAnimationBlendMode) { - this.name = name; - this.tracks = tracks; - this.duration = duration; - this.blendMode = blendMode; - this.uuid = generateUUID(); // this means it should figure out its duration by scanning the tracks - - if (this.duration < 0) { - this.resetDuration(); - } - } - - static parse(json) { - const tracks = [], - jsonTracks = json.tracks, - frameTime = 1.0 / (json.fps || 1.0); - - for (let i = 0, n = jsonTracks.length; i !== n; ++i) { - tracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime)); - } - - const clip = new this(json.name, json.duration, tracks, json.blendMode); - clip.uuid = json.uuid; - return clip; - } - - static toJSON(clip) { - const tracks = [], - clipTracks = clip.tracks; - const json = { - 'name': clip.name, - 'duration': clip.duration, - 'tracks': tracks, - 'uuid': clip.uuid, - 'blendMode': clip.blendMode - }; - - for (let i = 0, n = clipTracks.length; i !== n; ++i) { - tracks.push(KeyframeTrack.toJSON(clipTracks[i])); - } - - return json; - } - - static CreateFromMorphTargetSequence(name, morphTargetSequence, fps, noLoop) { - const numMorphTargets = morphTargetSequence.length; - const tracks = []; - - for (let i = 0; i < numMorphTargets; i++) { - let times = []; - let values = []; - times.push((i + numMorphTargets - 1) % numMorphTargets, i, (i + 1) % numMorphTargets); - values.push(0, 1, 0); - const order = AnimationUtils.getKeyframeOrder(times); - times = AnimationUtils.sortedArray(times, 1, order); - values = AnimationUtils.sortedArray(values, 1, order); // if there is a key at the first frame, duplicate it as the - // last frame as well for perfect loop. - - if (!noLoop && times[0] === 0) { - times.push(numMorphTargets); - values.push(values[0]); - } - - tracks.push(new NumberKeyframeTrack('.morphTargetInfluences[' + morphTargetSequence[i].name + ']', times, values).scale(1.0 / fps)); - } - - return new this(name, -1, tracks); - } - - static findByName(objectOrClipArray, name) { - let clipArray = objectOrClipArray; - - if (!Array.isArray(objectOrClipArray)) { - const o = objectOrClipArray; - clipArray = o.geometry && o.geometry.animations || o.animations; - } - - for (let i = 0; i < clipArray.length; i++) { - if (clipArray[i].name === name) { - return clipArray[i]; - } - } - - return null; - } - - static CreateClipsFromMorphTargetSequences(morphTargets, fps, noLoop) { - const animationToMorphTargets = {}; // tested with https://regex101.com/ on trick sequences - // such flamingo_flyA_003, flamingo_run1_003, crdeath0059 - - const pattern = /^([\w-]*?)([\d]+)$/; // sort morph target names into animation groups based - // patterns like Walk_001, Walk_002, Run_001, Run_002 - - for (let i = 0, il = morphTargets.length; i < il; i++) { - const morphTarget = morphTargets[i]; - const parts = morphTarget.name.match(pattern); - - if (parts && parts.length > 1) { - const name = parts[1]; - let animationMorphTargets = animationToMorphTargets[name]; - - if (!animationMorphTargets) { - animationToMorphTargets[name] = animationMorphTargets = []; - } - - animationMorphTargets.push(morphTarget); - } - } - - const clips = []; - - for (const name in animationToMorphTargets) { - clips.push(this.CreateFromMorphTargetSequence(name, animationToMorphTargets[name], fps, noLoop)); - } - - return clips; - } // parse the animation.hierarchy format - - - static parseAnimation(animation, bones) { - if (!animation) { - console.error('THREE.AnimationClip: No animation in JSONLoader data.'); - return null; - } - - const addNonemptyTrack = function (trackType, trackName, animationKeys, propertyName, destTracks) { - // only return track if there are actually keys. - if (animationKeys.length !== 0) { - const times = []; - const values = []; - AnimationUtils.flattenJSON(animationKeys, times, values, propertyName); // empty keys are filtered out, so check again - - if (times.length !== 0) { - destTracks.push(new trackType(trackName, times, values)); - } - } - }; - - const tracks = []; - const clipName = animation.name || 'default'; - const fps = animation.fps || 30; - const blendMode = animation.blendMode; // automatic length determination in AnimationClip. - - let duration = animation.length || -1; - const hierarchyTracks = animation.hierarchy || []; - - for (let h = 0; h < hierarchyTracks.length; h++) { - const animationKeys = hierarchyTracks[h].keys; // skip empty tracks - - if (!animationKeys || animationKeys.length === 0) continue; // process morph targets - - if (animationKeys[0].morphTargets) { - // figure out all morph targets used in this track - const morphTargetNames = {}; - let k; - - for (k = 0; k < animationKeys.length; k++) { - if (animationKeys[k].morphTargets) { - for (let m = 0; m < animationKeys[k].morphTargets.length; m++) { - morphTargetNames[animationKeys[k].morphTargets[m]] = -1; - } - } - } // create a track for each morph target with all zero - // morphTargetInfluences except for the keys in which - // the morphTarget is named. - - - for (const morphTargetName in morphTargetNames) { - const times = []; - const values = []; - - for (let m = 0; m !== animationKeys[k].morphTargets.length; ++m) { - const animationKey = animationKeys[k]; - times.push(animationKey.time); - values.push(animationKey.morphTarget === morphTargetName ? 1 : 0); - } - - tracks.push(new NumberKeyframeTrack('.morphTargetInfluence[' + morphTargetName + ']', times, values)); - } - - duration = morphTargetNames.length * (fps || 1.0); - } else { - // ...assume skeletal animation - const boneName = '.bones[' + bones[h].name + ']'; - addNonemptyTrack(VectorKeyframeTrack, boneName + '.position', animationKeys, 'pos', tracks); - addNonemptyTrack(QuaternionKeyframeTrack, boneName + '.quaternion', animationKeys, 'rot', tracks); - addNonemptyTrack(VectorKeyframeTrack, boneName + '.scale', animationKeys, 'scl', tracks); - } - } - - if (tracks.length === 0) { - return null; - } - - const clip = new this(clipName, duration, tracks, blendMode); - return clip; - } - - resetDuration() { - const tracks = this.tracks; - let duration = 0; - - for (let i = 0, n = tracks.length; i !== n; ++i) { - const track = this.tracks[i]; - duration = Math.max(duration, track.times[track.times.length - 1]); - } - - this.duration = duration; - return this; - } - - trim() { - for (let i = 0; i < this.tracks.length; i++) { - this.tracks[i].trim(0, this.duration); - } - - return this; - } - - validate() { - let valid = true; - - for (let i = 0; i < this.tracks.length; i++) { - valid = valid && this.tracks[i].validate(); - } - - return valid; - } - - optimize() { - for (let i = 0; i < this.tracks.length; i++) { - this.tracks[i].optimize(); - } - - return this; - } - - clone() { - const tracks = []; - - for (let i = 0; i < this.tracks.length; i++) { - tracks.push(this.tracks[i].clone()); - } - - return new this.constructor(this.name, this.duration, tracks, this.blendMode); - } - - toJSON() { - return this.constructor.toJSON(this); - } - - } - - function getTrackTypeForValueTypeName(typeName) { - switch (typeName.toLowerCase()) { - case 'scalar': - case 'double': - case 'float': - case 'number': - case 'integer': - return NumberKeyframeTrack; - - case 'vector': - case 'vector2': - case 'vector3': - case 'vector4': - return VectorKeyframeTrack; - - case 'color': - return ColorKeyframeTrack; - - case 'quaternion': - return QuaternionKeyframeTrack; - - case 'bool': - case 'boolean': - return BooleanKeyframeTrack; - - case 'string': - return StringKeyframeTrack; - } - - throw new Error('THREE.KeyframeTrack: Unsupported typeName: ' + typeName); - } - - function parseKeyframeTrack(json) { - if (json.type === undefined) { - throw new Error('THREE.KeyframeTrack: track type undefined, can not parse'); - } - - const trackType = getTrackTypeForValueTypeName(json.type); - - if (json.times === undefined) { - const times = [], - values = []; - AnimationUtils.flattenJSON(json.keys, times, values, 'value'); - json.times = times; - json.values = values; - } // derived classes can define a static parse method - - - if (trackType.parse !== undefined) { - return trackType.parse(json); - } else { - // by default, we assume a constructor compatible with the base - return new trackType(json.name, json.times, json.values, json.interpolation); - } - } - - const Cache = { - enabled: false, - files: {}, - add: function (key, file) { - if (this.enabled === false) return; // console.log( 'THREE.Cache', 'Adding key:', key ); - - this.files[key] = file; - }, - get: function (key) { - if (this.enabled === false) return; // console.log( 'THREE.Cache', 'Checking key:', key ); - - return this.files[key]; - }, - remove: function (key) { - delete this.files[key]; - }, - clear: function () { - this.files = {}; - } - }; - - class LoadingManager { - constructor(onLoad, onProgress, onError) { - const scope = this; - let isLoading = false; - let itemsLoaded = 0; - let itemsTotal = 0; - let urlModifier = undefined; - const handlers = []; // Refer to #5689 for the reason why we don't set .onStart - // in the constructor - - this.onStart = undefined; - this.onLoad = onLoad; - this.onProgress = onProgress; - this.onError = onError; - - this.itemStart = function (url) { - itemsTotal++; - - if (isLoading === false) { - if (scope.onStart !== undefined) { - scope.onStart(url, itemsLoaded, itemsTotal); - } - } - - isLoading = true; - }; - - this.itemEnd = function (url) { - itemsLoaded++; - - if (scope.onProgress !== undefined) { - scope.onProgress(url, itemsLoaded, itemsTotal); - } - - if (itemsLoaded === itemsTotal) { - isLoading = false; - - if (scope.onLoad !== undefined) { - scope.onLoad(); - } - } - }; - - this.itemError = function (url) { - if (scope.onError !== undefined) { - scope.onError(url); - } - }; - - this.resolveURL = function (url) { - if (urlModifier) { - return urlModifier(url); - } - - return url; - }; - - this.setURLModifier = function (transform) { - urlModifier = transform; - return this; - }; - - this.addHandler = function (regex, loader) { - handlers.push(regex, loader); - return this; - }; - - this.removeHandler = function (regex) { - const index = handlers.indexOf(regex); - - if (index !== -1) { - handlers.splice(index, 2); - } - - return this; - }; - - this.getHandler = function (file) { - for (let i = 0, l = handlers.length; i < l; i += 2) { - const regex = handlers[i]; - const loader = handlers[i + 1]; - if (regex.global) regex.lastIndex = 0; // see #17920 - - if (regex.test(file)) { - return loader; - } - } - - return null; - }; - } - - } - - const DefaultLoadingManager = new LoadingManager(); - - class Loader { - constructor(manager) { - this.manager = manager !== undefined ? manager : DefaultLoadingManager; - this.crossOrigin = 'anonymous'; - this.withCredentials = false; - this.path = ''; - this.resourcePath = ''; - this.requestHeader = {}; - } - - load() - /* url, onLoad, onProgress, onError */ - {} - - loadAsync(url, onProgress) { - const scope = this; - return new Promise(function (resolve, reject) { - scope.load(url, resolve, onProgress, reject); - }); - } - - parse() - /* data */ - {} - - setCrossOrigin(crossOrigin) { - this.crossOrigin = crossOrigin; - return this; - } - - setWithCredentials(value) { - this.withCredentials = value; - return this; - } - - setPath(path) { - this.path = path; - return this; - } - - setResourcePath(resourcePath) { - this.resourcePath = resourcePath; - return this; - } - - setRequestHeader(requestHeader) { - this.requestHeader = requestHeader; - return this; - } - - } - - const loading = {}; - - class FileLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - if (url === undefined) url = ''; - if (this.path !== undefined) url = this.path + url; - url = this.manager.resolveURL(url); - const scope = this; - const cached = Cache.get(url); - - if (cached !== undefined) { - scope.manager.itemStart(url); - setTimeout(function () { - if (onLoad) onLoad(cached); - scope.manager.itemEnd(url); - }, 0); - return cached; - } // Check if request is duplicate - - - if (loading[url] !== undefined) { - loading[url].push({ - onLoad: onLoad, - onProgress: onProgress, - onError: onError - }); - return; - } // Check for data: URI - - - const dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/; - const dataUriRegexResult = url.match(dataUriRegex); - let request; // Safari can not handle Data URIs through XMLHttpRequest so process manually - - if (dataUriRegexResult) { - const mimeType = dataUriRegexResult[1]; - const isBase64 = !!dataUriRegexResult[2]; - let data = dataUriRegexResult[3]; - data = decodeURIComponent(data); - if (isBase64) data = atob(data); - - try { - let response; - const responseType = (this.responseType || '').toLowerCase(); - - switch (responseType) { - case 'arraybuffer': - case 'blob': - const view = new Uint8Array(data.length); - - for (let i = 0; i < data.length; i++) { - view[i] = data.charCodeAt(i); - } - - if (responseType === 'blob') { - response = new Blob([view.buffer], { - type: mimeType - }); - } else { - response = view.buffer; - } - - break; - - case 'document': - const parser = new DOMParser(); - response = parser.parseFromString(data, mimeType); - break; - - case 'json': - response = JSON.parse(data); - break; - - default: - // 'text' or other - response = data; - break; - } // Wait for next browser tick like standard XMLHttpRequest event dispatching does - - - setTimeout(function () { - if (onLoad) onLoad(response); - scope.manager.itemEnd(url); - }, 0); - } catch (error) { - // Wait for next browser tick like standard XMLHttpRequest event dispatching does - setTimeout(function () { - if (onError) onError(error); - scope.manager.itemError(url); - scope.manager.itemEnd(url); - }, 0); - } - } else { - // Initialise array for duplicate requests - loading[url] = []; - loading[url].push({ - onLoad: onLoad, - onProgress: onProgress, - onError: onError - }); - request = new XMLHttpRequest(); - request.open('GET', url, true); - request.addEventListener('load', function (event) { - const response = this.response; - const callbacks = loading[url]; - delete loading[url]; - - if (this.status === 200 || this.status === 0) { - // Some browsers return HTTP Status 0 when using non-http protocol - // e.g. 'file://' or 'data://'. Handle as success. - if (this.status === 0) console.warn('THREE.FileLoader: HTTP Status 0 received.'); // Add to cache only on HTTP success, so that we do not cache - // error response bodies as proper responses to requests. - - Cache.add(url, response); - - for (let i = 0, il = callbacks.length; i < il; i++) { - const callback = callbacks[i]; - if (callback.onLoad) callback.onLoad(response); - } - - scope.manager.itemEnd(url); - } else { - for (let i = 0, il = callbacks.length; i < il; i++) { - const callback = callbacks[i]; - if (callback.onError) callback.onError(event); - } - - scope.manager.itemError(url); - scope.manager.itemEnd(url); - } - }, false); - request.addEventListener('progress', function (event) { - const callbacks = loading[url]; - - for (let i = 0, il = callbacks.length; i < il; i++) { - const callback = callbacks[i]; - if (callback.onProgress) callback.onProgress(event); - } - }, false); - request.addEventListener('error', function (event) { - const callbacks = loading[url]; - delete loading[url]; - - for (let i = 0, il = callbacks.length; i < il; i++) { - const callback = callbacks[i]; - if (callback.onError) callback.onError(event); - } - - scope.manager.itemError(url); - scope.manager.itemEnd(url); - }, false); - request.addEventListener('abort', function (event) { - const callbacks = loading[url]; - delete loading[url]; - - for (let i = 0, il = callbacks.length; i < il; i++) { - const callback = callbacks[i]; - if (callback.onError) callback.onError(event); - } - - scope.manager.itemError(url); - scope.manager.itemEnd(url); - }, false); - if (this.responseType !== undefined) request.responseType = this.responseType; - if (this.withCredentials !== undefined) request.withCredentials = this.withCredentials; - if (request.overrideMimeType) request.overrideMimeType(this.mimeType !== undefined ? this.mimeType : 'text/plain'); - - for (const header in this.requestHeader) { - request.setRequestHeader(header, this.requestHeader[header]); - } - - request.send(null); - } - - scope.manager.itemStart(url); - return request; - } - - setResponseType(value) { - this.responseType = value; - return this; - } - - setMimeType(value) { - this.mimeType = value; - return this; - } - - } - - class AnimationLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - const scope = this; - const loader = new FileLoader(this.manager); - loader.setPath(this.path); - loader.setRequestHeader(this.requestHeader); - loader.setWithCredentials(this.withCredentials); - loader.load(url, function (text) { - try { - onLoad(scope.parse(JSON.parse(text))); - } catch (e) { - if (onError) { - onError(e); - } else { - console.error(e); - } - - scope.manager.itemError(url); - } - }, onProgress, onError); - } - - parse(json) { - const animations = []; - - for (let i = 0; i < json.length; i++) { - const clip = AnimationClip.parse(json[i]); - animations.push(clip); - } - - return animations; - } - - } - - /** - * Abstract Base class to block based textures loader (dds, pvr, ...) - * - * Sub classes have to implement the parse() method which will be used in load(). - */ - - class CompressedTextureLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - const scope = this; - const images = []; - const texture = new CompressedTexture(); - const loader = new FileLoader(this.manager); - loader.setPath(this.path); - loader.setResponseType('arraybuffer'); - loader.setRequestHeader(this.requestHeader); - loader.setWithCredentials(scope.withCredentials); - let loaded = 0; - - function loadTexture(i) { - loader.load(url[i], function (buffer) { - const texDatas = scope.parse(buffer, true); - images[i] = { - width: texDatas.width, - height: texDatas.height, - format: texDatas.format, - mipmaps: texDatas.mipmaps - }; - loaded += 1; - - if (loaded === 6) { - if (texDatas.mipmapCount === 1) texture.minFilter = LinearFilter; - texture.image = images; - texture.format = texDatas.format; - texture.needsUpdate = true; - if (onLoad) onLoad(texture); - } - }, onProgress, onError); - } - - if (Array.isArray(url)) { - for (let i = 0, il = url.length; i < il; ++i) { - loadTexture(i); - } - } else { - // compressed cubemap texture stored in a single DDS file - loader.load(url, function (buffer) { - const texDatas = scope.parse(buffer, true); - - if (texDatas.isCubemap) { - const faces = texDatas.mipmaps.length / texDatas.mipmapCount; - - for (let f = 0; f < faces; f++) { - images[f] = { - mipmaps: [] - }; - - for (let i = 0; i < texDatas.mipmapCount; i++) { - images[f].mipmaps.push(texDatas.mipmaps[f * texDatas.mipmapCount + i]); - images[f].format = texDatas.format; - images[f].width = texDatas.width; - images[f].height = texDatas.height; - } - } - - texture.image = images; - } else { - texture.image.width = texDatas.width; - texture.image.height = texDatas.height; - texture.mipmaps = texDatas.mipmaps; - } - - if (texDatas.mipmapCount === 1) { - texture.minFilter = LinearFilter; - } - - texture.format = texDatas.format; - texture.needsUpdate = true; - if (onLoad) onLoad(texture); - }, onProgress, onError); - } - - return texture; - } - - } - - class ImageLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - if (this.path !== undefined) url = this.path + url; - url = this.manager.resolveURL(url); - const scope = this; - const cached = Cache.get(url); - - if (cached !== undefined) { - scope.manager.itemStart(url); - setTimeout(function () { - if (onLoad) onLoad(cached); - scope.manager.itemEnd(url); - }, 0); - return cached; - } - - const image = document.createElementNS('http://www.w3.org/1999/xhtml', 'img'); - - function onImageLoad() { - image.removeEventListener('load', onImageLoad, false); - image.removeEventListener('error', onImageError, false); - Cache.add(url, this); - if (onLoad) onLoad(this); - scope.manager.itemEnd(url); - } - - function onImageError(event) { - image.removeEventListener('load', onImageLoad, false); - image.removeEventListener('error', onImageError, false); - if (onError) onError(event); - scope.manager.itemError(url); - scope.manager.itemEnd(url); - } - - image.addEventListener('load', onImageLoad, false); - image.addEventListener('error', onImageError, false); - - if (url.substr(0, 5) !== 'data:') { - if (this.crossOrigin !== undefined) image.crossOrigin = this.crossOrigin; - } - - scope.manager.itemStart(url); - image.src = url; - return image; - } - - } - - class CubeTextureLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(urls, onLoad, onProgress, onError) { - const texture = new CubeTexture(); - const loader = new ImageLoader(this.manager); - loader.setCrossOrigin(this.crossOrigin); - loader.setPath(this.path); - let loaded = 0; - - function loadTexture(i) { - loader.load(urls[i], function (image) { - texture.images[i] = image; - loaded++; - - if (loaded === 6) { - texture.needsUpdate = true; - if (onLoad) onLoad(texture); - } - }, undefined, onError); - } - - for (let i = 0; i < urls.length; ++i) { - loadTexture(i); - } - - return texture; - } - - } - - /** - * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...) - * - * Sub classes have to implement the parse() method which will be used in load(). - */ - - class DataTextureLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - const scope = this; - const texture = new DataTexture(); - const loader = new FileLoader(this.manager); - loader.setResponseType('arraybuffer'); - loader.setRequestHeader(this.requestHeader); - loader.setPath(this.path); - loader.setWithCredentials(scope.withCredentials); - loader.load(url, function (buffer) { - const texData = scope.parse(buffer); - if (!texData) return; - - if (texData.image !== undefined) { - texture.image = texData.image; - } else if (texData.data !== undefined) { - texture.image.width = texData.width; - texture.image.height = texData.height; - texture.image.data = texData.data; - } - - texture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping; - texture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping; - texture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter; - texture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter; - texture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1; - - if (texData.encoding !== undefined) { - texture.encoding = texData.encoding; - } - - if (texData.flipY !== undefined) { - texture.flipY = texData.flipY; - } - - if (texData.format !== undefined) { - texture.format = texData.format; - } - - if (texData.type !== undefined) { - texture.type = texData.type; - } - - if (texData.mipmaps !== undefined) { - texture.mipmaps = texData.mipmaps; - texture.minFilter = LinearMipmapLinearFilter; // presumably... - } - - if (texData.mipmapCount === 1) { - texture.minFilter = LinearFilter; - } - - if (texData.generateMipmaps !== undefined) { - texture.generateMipmaps = texData.generateMipmaps; - } - - texture.needsUpdate = true; - if (onLoad) onLoad(texture, texData); - }, onProgress, onError); - return texture; - } - - } - - class TextureLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - const texture = new Texture(); - const loader = new ImageLoader(this.manager); - loader.setCrossOrigin(this.crossOrigin); - loader.setPath(this.path); - loader.load(url, function (image) { - texture.image = image; // JPEGs can't have an alpha channel, so memory can be saved by storing them as RGB. - - const isJPEG = url.search(/\.jpe?g($|\?)/i) > 0 || url.search(/^data\:image\/jpeg/) === 0; - texture.format = isJPEG ? RGBFormat : RGBAFormat; - texture.needsUpdate = true; - - if (onLoad !== undefined) { - onLoad(texture); - } - }, onProgress, onError); - return texture; - } - - } - - /************************************************************** - * Curved Path - a curve path is simply a array of connected - * curves, but retains the api of a curve - **************************************************************/ - - class CurvePath extends Curve { - constructor() { - super(); - this.type = 'CurvePath'; - this.curves = []; - this.autoClose = false; // Automatically closes the path - } - - add(curve) { - this.curves.push(curve); - } - - closePath() { - // Add a line curve if start and end of lines are not connected - const startPoint = this.curves[0].getPoint(0); - const endPoint = this.curves[this.curves.length - 1].getPoint(1); - - if (!startPoint.equals(endPoint)) { - this.curves.push(new LineCurve(endPoint, startPoint)); - } - } // To get accurate point with reference to - // entire path distance at time t, - // following has to be done: - // 1. Length of each sub path have to be known - // 2. Locate and identify type of curve - // 3. Get t for the curve - // 4. Return curve.getPointAt(t') - - - getPoint(t) { - const d = t * this.getLength(); - const curveLengths = this.getCurveLengths(); - let i = 0; // To think about boundaries points. - - while (i < curveLengths.length) { - if (curveLengths[i] >= d) { - const diff = curveLengths[i] - d; - const curve = this.curves[i]; - const segmentLength = curve.getLength(); - const u = segmentLength === 0 ? 0 : 1 - diff / segmentLength; - return curve.getPointAt(u); - } - - i++; - } - - return null; // loop where sum != 0, sum > d , sum+1 1 && !points[points.length - 1].equals(points[0])) { - points.push(points[0]); - } - - return points; - } - - copy(source) { - super.copy(source); - this.curves = []; - - for (let i = 0, l = source.curves.length; i < l; i++) { - const curve = source.curves[i]; - this.curves.push(curve.clone()); - } - - this.autoClose = source.autoClose; - return this; - } - - toJSON() { - const data = super.toJSON(); - data.autoClose = this.autoClose; - data.curves = []; - - for (let i = 0, l = this.curves.length; i < l; i++) { - const curve = this.curves[i]; - data.curves.push(curve.toJSON()); - } - - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.autoClose = json.autoClose; - this.curves = []; - - for (let i = 0, l = json.curves.length; i < l; i++) { - const curve = json.curves[i]; - this.curves.push(new Curves[curve.type]().fromJSON(curve)); - } - - return this; - } - - } - - class Path extends CurvePath { - constructor(points) { - super(); - this.type = 'Path'; - this.currentPoint = new Vector2(); - - if (points) { - this.setFromPoints(points); - } - } - - setFromPoints(points) { - this.moveTo(points[0].x, points[0].y); - - for (let i = 1, l = points.length; i < l; i++) { - this.lineTo(points[i].x, points[i].y); - } - - return this; - } - - moveTo(x, y) { - this.currentPoint.set(x, y); // TODO consider referencing vectors instead of copying? - - return this; - } - - lineTo(x, y) { - const curve = new LineCurve(this.currentPoint.clone(), new Vector2(x, y)); - this.curves.push(curve); - this.currentPoint.set(x, y); - return this; - } - - quadraticCurveTo(aCPx, aCPy, aX, aY) { - const curve = new QuadraticBezierCurve(this.currentPoint.clone(), new Vector2(aCPx, aCPy), new Vector2(aX, aY)); - this.curves.push(curve); - this.currentPoint.set(aX, aY); - return this; - } - - bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) { - const curve = new CubicBezierCurve(this.currentPoint.clone(), new Vector2(aCP1x, aCP1y), new Vector2(aCP2x, aCP2y), new Vector2(aX, aY)); - this.curves.push(curve); - this.currentPoint.set(aX, aY); - return this; - } - - splineThru(pts - /*Array of Vector*/ - ) { - const npts = [this.currentPoint.clone()].concat(pts); - const curve = new SplineCurve(npts); - this.curves.push(curve); - this.currentPoint.copy(pts[pts.length - 1]); - return this; - } - - arc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) { - const x0 = this.currentPoint.x; - const y0 = this.currentPoint.y; - this.absarc(aX + x0, aY + y0, aRadius, aStartAngle, aEndAngle, aClockwise); - return this; - } - - absarc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) { - this.absellipse(aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise); - return this; - } - - ellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) { - const x0 = this.currentPoint.x; - const y0 = this.currentPoint.y; - this.absellipse(aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation); - return this; - } - - absellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) { - const curve = new EllipseCurve(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation); - - if (this.curves.length > 0) { - // if a previous curve is present, attempt to join - const firstPoint = curve.getPoint(0); - - if (!firstPoint.equals(this.currentPoint)) { - this.lineTo(firstPoint.x, firstPoint.y); - } - } - - this.curves.push(curve); - const lastPoint = curve.getPoint(1); - this.currentPoint.copy(lastPoint); - return this; - } - - copy(source) { - super.copy(source); - this.currentPoint.copy(source.currentPoint); - return this; - } - - toJSON() { - const data = super.toJSON(); - data.currentPoint = this.currentPoint.toArray(); - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.currentPoint.fromArray(json.currentPoint); - return this; - } - - } - - class Shape extends Path { - constructor(points) { - super(points); - this.uuid = generateUUID(); - this.type = 'Shape'; - this.holes = []; - } - - getPointsHoles(divisions) { - const holesPts = []; - - for (let i = 0, l = this.holes.length; i < l; i++) { - holesPts[i] = this.holes[i].getPoints(divisions); - } - - return holesPts; - } // get points of shape and holes (keypoints based on segments parameter) - - - extractPoints(divisions) { - return { - shape: this.getPoints(divisions), - holes: this.getPointsHoles(divisions) - }; - } - - copy(source) { - super.copy(source); - this.holes = []; - - for (let i = 0, l = source.holes.length; i < l; i++) { - const hole = source.holes[i]; - this.holes.push(hole.clone()); - } - - return this; - } - - toJSON() { - const data = super.toJSON(); - data.uuid = this.uuid; - data.holes = []; - - for (let i = 0, l = this.holes.length; i < l; i++) { - const hole = this.holes[i]; - data.holes.push(hole.toJSON()); - } - - return data; - } - - fromJSON(json) { - super.fromJSON(json); - this.uuid = json.uuid; - this.holes = []; - - for (let i = 0, l = json.holes.length; i < l; i++) { - const hole = json.holes[i]; - this.holes.push(new Path().fromJSON(hole)); - } - - return this; - } - - } - - class Light extends Object3D { - constructor(color, intensity = 1) { - super(); - this.type = 'Light'; - this.color = new Color(color); - this.intensity = intensity; - } - - dispose() {// Empty here in base class; some subclasses override. - } - - copy(source) { - super.copy(source); - this.color.copy(source.color); - this.intensity = source.intensity; - return this; - } - - toJSON(meta) { - const data = super.toJSON(meta); - data.object.color = this.color.getHex(); - data.object.intensity = this.intensity; - if (this.groundColor !== undefined) data.object.groundColor = this.groundColor.getHex(); - if (this.distance !== undefined) data.object.distance = this.distance; - if (this.angle !== undefined) data.object.angle = this.angle; - if (this.decay !== undefined) data.object.decay = this.decay; - if (this.penumbra !== undefined) data.object.penumbra = this.penumbra; - if (this.shadow !== undefined) data.object.shadow = this.shadow.toJSON(); - return data; - } - - } - - Light.prototype.isLight = true; - - class HemisphereLight extends Light { - constructor(skyColor, groundColor, intensity) { - super(skyColor, intensity); - this.type = 'HemisphereLight'; - this.position.copy(Object3D.DefaultUp); - this.updateMatrix(); - this.groundColor = new Color(groundColor); - } - - copy(source) { - Light.prototype.copy.call(this, source); - this.groundColor.copy(source.groundColor); - return this; - } - - } - - HemisphereLight.prototype.isHemisphereLight = true; - - const _projScreenMatrix$1 = /*@__PURE__*/new Matrix4(); - - const _lightPositionWorld$1 = /*@__PURE__*/new Vector3(); - - const _lookTarget$1 = /*@__PURE__*/new Vector3(); - - class LightShadow { - constructor(camera) { - this.camera = camera; - this.bias = 0; - this.normalBias = 0; - this.radius = 1; - this.mapSize = new Vector2(512, 512); - this.map = null; - this.mapPass = null; - this.matrix = new Matrix4(); - this.autoUpdate = true; - this.needsUpdate = false; - this._frustum = new Frustum(); - this._frameExtents = new Vector2(1, 1); - this._viewportCount = 1; - this._viewports = [new Vector4(0, 0, 1, 1)]; - } - - getViewportCount() { - return this._viewportCount; - } - - getFrustum() { - return this._frustum; - } - - updateMatrices(light) { - const shadowCamera = this.camera; - const shadowMatrix = this.matrix; - - _lightPositionWorld$1.setFromMatrixPosition(light.matrixWorld); - - shadowCamera.position.copy(_lightPositionWorld$1); - - _lookTarget$1.setFromMatrixPosition(light.target.matrixWorld); - - shadowCamera.lookAt(_lookTarget$1); - shadowCamera.updateMatrixWorld(); - - _projScreenMatrix$1.multiplyMatrices(shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse); - - this._frustum.setFromProjectionMatrix(_projScreenMatrix$1); - - shadowMatrix.set(0.5, 0.0, 0.0, 0.5, 0.0, 0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0); - shadowMatrix.multiply(shadowCamera.projectionMatrix); - shadowMatrix.multiply(shadowCamera.matrixWorldInverse); - } - - getViewport(viewportIndex) { - return this._viewports[viewportIndex]; - } - - getFrameExtents() { - return this._frameExtents; - } - - dispose() { - if (this.map) { - this.map.dispose(); - } - - if (this.mapPass) { - this.mapPass.dispose(); - } - } - - copy(source) { - this.camera = source.camera.clone(); - this.bias = source.bias; - this.radius = source.radius; - this.mapSize.copy(source.mapSize); - return this; - } - - clone() { - return new this.constructor().copy(this); - } - - toJSON() { - const object = {}; - if (this.bias !== 0) object.bias = this.bias; - if (this.normalBias !== 0) object.normalBias = this.normalBias; - if (this.radius !== 1) object.radius = this.radius; - if (this.mapSize.x !== 512 || this.mapSize.y !== 512) object.mapSize = this.mapSize.toArray(); - object.camera = this.camera.toJSON(false).object; - delete object.camera.matrix; - return object; - } - - } - - class SpotLightShadow extends LightShadow { - constructor() { - super(new PerspectiveCamera(50, 1, 0.5, 500)); - this.focus = 1; - } - - updateMatrices(light) { - const camera = this.camera; - const fov = RAD2DEG * 2 * light.angle * this.focus; - const aspect = this.mapSize.width / this.mapSize.height; - const far = light.distance || camera.far; - - if (fov !== camera.fov || aspect !== camera.aspect || far !== camera.far) { - camera.fov = fov; - camera.aspect = aspect; - camera.far = far; - camera.updateProjectionMatrix(); - } - - super.updateMatrices(light); - } - - copy(source) { - super.copy(source); - this.focus = source.focus; - return this; - } - - } - - SpotLightShadow.prototype.isSpotLightShadow = true; - - class SpotLight extends Light { - constructor(color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 1) { - super(color, intensity); - this.type = 'SpotLight'; - this.position.copy(Object3D.DefaultUp); - this.updateMatrix(); - this.target = new Object3D(); - this.distance = distance; - this.angle = angle; - this.penumbra = penumbra; - this.decay = decay; // for physically correct lights, should be 2. - - this.shadow = new SpotLightShadow(); - } - - get power() { - // intensity = power per solid angle. - // ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf - return this.intensity * Math.PI; - } - - set power(power) { - // intensity = power per solid angle. - // ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf - this.intensity = power / Math.PI; - } - - dispose() { - this.shadow.dispose(); - } - - copy(source) { - super.copy(source); - this.distance = source.distance; - this.angle = source.angle; - this.penumbra = source.penumbra; - this.decay = source.decay; - this.target = source.target.clone(); - this.shadow = source.shadow.clone(); - return this; - } - - } - - SpotLight.prototype.isSpotLight = true; - - const _projScreenMatrix = /*@__PURE__*/new Matrix4(); - - const _lightPositionWorld = /*@__PURE__*/new Vector3(); - - const _lookTarget = /*@__PURE__*/new Vector3(); - - class PointLightShadow extends LightShadow { - constructor() { - super(new PerspectiveCamera(90, 1, 0.5, 500)); - this._frameExtents = new Vector2(4, 2); - this._viewportCount = 6; - this._viewports = [// These viewports map a cube-map onto a 2D texture with the - // following orientation: - // - // xzXZ - // y Y - // - // X - Positive x direction - // x - Negative x direction - // Y - Positive y direction - // y - Negative y direction - // Z - Positive z direction - // z - Negative z direction - // positive X - new Vector4(2, 1, 1, 1), // negative X - new Vector4(0, 1, 1, 1), // positive Z - new Vector4(3, 1, 1, 1), // negative Z - new Vector4(1, 1, 1, 1), // positive Y - new Vector4(3, 0, 1, 1), // negative Y - new Vector4(1, 0, 1, 1)]; - this._cubeDirections = [new Vector3(1, 0, 0), new Vector3(-1, 0, 0), new Vector3(0, 0, 1), new Vector3(0, 0, -1), new Vector3(0, 1, 0), new Vector3(0, -1, 0)]; - this._cubeUps = [new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 0, 1), new Vector3(0, 0, -1)]; - } - - updateMatrices(light, viewportIndex = 0) { - const camera = this.camera; - const shadowMatrix = this.matrix; - const far = light.distance || camera.far; - - if (far !== camera.far) { - camera.far = far; - camera.updateProjectionMatrix(); - } - - _lightPositionWorld.setFromMatrixPosition(light.matrixWorld); - - camera.position.copy(_lightPositionWorld); - - _lookTarget.copy(camera.position); - - _lookTarget.add(this._cubeDirections[viewportIndex]); - - camera.up.copy(this._cubeUps[viewportIndex]); - camera.lookAt(_lookTarget); - camera.updateMatrixWorld(); - shadowMatrix.makeTranslation(-_lightPositionWorld.x, -_lightPositionWorld.y, -_lightPositionWorld.z); - - _projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse); - - this._frustum.setFromProjectionMatrix(_projScreenMatrix); - } - - } - - PointLightShadow.prototype.isPointLightShadow = true; - - class PointLight extends Light { - constructor(color, intensity, distance = 0, decay = 1) { - super(color, intensity); - this.type = 'PointLight'; - this.distance = distance; - this.decay = decay; // for physically correct lights, should be 2. - - this.shadow = new PointLightShadow(); - } - - get power() { - // intensity = power per solid angle. - // ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf - return this.intensity * 4 * Math.PI; - } - - set power(power) { - // intensity = power per solid angle. - // ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf - this.intensity = power / (4 * Math.PI); - } - - dispose() { - this.shadow.dispose(); - } - - copy(source) { - super.copy(source); - this.distance = source.distance; - this.decay = source.decay; - this.shadow = source.shadow.clone(); - return this; - } - - } - - PointLight.prototype.isPointLight = true; - - class OrthographicCamera extends Camera { - constructor(left = -1, right = 1, top = 1, bottom = -1, near = 0.1, far = 2000) { - super(); - this.type = 'OrthographicCamera'; - this.zoom = 1; - this.view = null; - this.left = left; - this.right = right; - this.top = top; - this.bottom = bottom; - this.near = near; - this.far = far; - this.updateProjectionMatrix(); - } - - copy(source, recursive) { - super.copy(source, recursive); - this.left = source.left; - this.right = source.right; - this.top = source.top; - this.bottom = source.bottom; - this.near = source.near; - this.far = source.far; - this.zoom = source.zoom; - this.view = source.view === null ? null : Object.assign({}, source.view); - return this; - } - - setViewOffset(fullWidth, fullHeight, x, y, width, height) { - if (this.view === null) { - this.view = { - enabled: true, - fullWidth: 1, - fullHeight: 1, - offsetX: 0, - offsetY: 0, - width: 1, - height: 1 - }; - } - - this.view.enabled = true; - this.view.fullWidth = fullWidth; - this.view.fullHeight = fullHeight; - this.view.offsetX = x; - this.view.offsetY = y; - this.view.width = width; - this.view.height = height; - this.updateProjectionMatrix(); - } - - clearViewOffset() { - if (this.view !== null) { - this.view.enabled = false; - } - - this.updateProjectionMatrix(); - } - - updateProjectionMatrix() { - const dx = (this.right - this.left) / (2 * this.zoom); - const dy = (this.top - this.bottom) / (2 * this.zoom); - const cx = (this.right + this.left) / 2; - const cy = (this.top + this.bottom) / 2; - let left = cx - dx; - let right = cx + dx; - let top = cy + dy; - let bottom = cy - dy; - - if (this.view !== null && this.view.enabled) { - const scaleW = (this.right - this.left) / this.view.fullWidth / this.zoom; - const scaleH = (this.top - this.bottom) / this.view.fullHeight / this.zoom; - left += scaleW * this.view.offsetX; - right = left + scaleW * this.view.width; - top -= scaleH * this.view.offsetY; - bottom = top - scaleH * this.view.height; - } - - this.projectionMatrix.makeOrthographic(left, right, top, bottom, this.near, this.far); - this.projectionMatrixInverse.copy(this.projectionMatrix).invert(); - } - - toJSON(meta) { - const data = super.toJSON(meta); - data.object.zoom = this.zoom; - data.object.left = this.left; - data.object.right = this.right; - data.object.top = this.top; - data.object.bottom = this.bottom; - data.object.near = this.near; - data.object.far = this.far; - if (this.view !== null) data.object.view = Object.assign({}, this.view); - return data; - } - - } - - OrthographicCamera.prototype.isOrthographicCamera = true; - - class DirectionalLightShadow extends LightShadow { - constructor() { - super(new OrthographicCamera(-5, 5, 5, -5, 0.5, 500)); - } - - } - - DirectionalLightShadow.prototype.isDirectionalLightShadow = true; - - class DirectionalLight extends Light { - constructor(color, intensity) { - super(color, intensity); - this.type = 'DirectionalLight'; - this.position.copy(Object3D.DefaultUp); - this.updateMatrix(); - this.target = new Object3D(); - this.shadow = new DirectionalLightShadow(); - } - - dispose() { - this.shadow.dispose(); - } - - copy(source) { - super.copy(source); - this.target = source.target.clone(); - this.shadow = source.shadow.clone(); - return this; - } - - } - - DirectionalLight.prototype.isDirectionalLight = true; - - class AmbientLight extends Light { - constructor(color, intensity) { - super(color, intensity); - this.type = 'AmbientLight'; - } - - } - - AmbientLight.prototype.isAmbientLight = true; - - class RectAreaLight extends Light { - constructor(color, intensity, width = 10, height = 10) { - super(color, intensity); - this.type = 'RectAreaLight'; - this.width = width; - this.height = height; - } - - copy(source) { - super.copy(source); - this.width = source.width; - this.height = source.height; - return this; - } - - toJSON(meta) { - const data = super.toJSON(meta); - data.object.width = this.width; - data.object.height = this.height; - return data; - } - - } - - RectAreaLight.prototype.isRectAreaLight = true; - - /** - * Primary reference: - * https://graphics.stanford.edu/papers/envmap/envmap.pdf - * - * Secondary reference: - * https://www.ppsloan.org/publications/StupidSH36.pdf - */ - // 3-band SH defined by 9 coefficients - - class SphericalHarmonics3 { - constructor() { - this.coefficients = []; - - for (let i = 0; i < 9; i++) { - this.coefficients.push(new Vector3()); - } - } - - set(coefficients) { - for (let i = 0; i < 9; i++) { - this.coefficients[i].copy(coefficients[i]); - } - - return this; - } - - zero() { - for (let i = 0; i < 9; i++) { - this.coefficients[i].set(0, 0, 0); - } - - return this; - } // get the radiance in the direction of the normal - // target is a Vector3 - - - getAt(normal, target) { - // normal is assumed to be unit length - const x = normal.x, - y = normal.y, - z = normal.z; - const coeff = this.coefficients; // band 0 - - target.copy(coeff[0]).multiplyScalar(0.282095); // band 1 - - target.addScaledVector(coeff[1], 0.488603 * y); - target.addScaledVector(coeff[2], 0.488603 * z); - target.addScaledVector(coeff[3], 0.488603 * x); // band 2 - - target.addScaledVector(coeff[4], 1.092548 * (x * y)); - target.addScaledVector(coeff[5], 1.092548 * (y * z)); - target.addScaledVector(coeff[6], 0.315392 * (3.0 * z * z - 1.0)); - target.addScaledVector(coeff[7], 1.092548 * (x * z)); - target.addScaledVector(coeff[8], 0.546274 * (x * x - y * y)); - return target; - } // get the irradiance (radiance convolved with cosine lobe) in the direction of the normal - // target is a Vector3 - // https://graphics.stanford.edu/papers/envmap/envmap.pdf - - - getIrradianceAt(normal, target) { - // normal is assumed to be unit length - const x = normal.x, - y = normal.y, - z = normal.z; - const coeff = this.coefficients; // band 0 - - target.copy(coeff[0]).multiplyScalar(0.886227); // π * 0.282095 - // band 1 - - target.addScaledVector(coeff[1], 2.0 * 0.511664 * y); // ( 2 * π / 3 ) * 0.488603 - - target.addScaledVector(coeff[2], 2.0 * 0.511664 * z); - target.addScaledVector(coeff[3], 2.0 * 0.511664 * x); // band 2 - - target.addScaledVector(coeff[4], 2.0 * 0.429043 * x * y); // ( π / 4 ) * 1.092548 - - target.addScaledVector(coeff[5], 2.0 * 0.429043 * y * z); - target.addScaledVector(coeff[6], 0.743125 * z * z - 0.247708); // ( π / 4 ) * 0.315392 * 3 - - target.addScaledVector(coeff[7], 2.0 * 0.429043 * x * z); - target.addScaledVector(coeff[8], 0.429043 * (x * x - y * y)); // ( π / 4 ) * 0.546274 - - return target; - } - - add(sh) { - for (let i = 0; i < 9; i++) { - this.coefficients[i].add(sh.coefficients[i]); - } - - return this; - } - - addScaledSH(sh, s) { - for (let i = 0; i < 9; i++) { - this.coefficients[i].addScaledVector(sh.coefficients[i], s); - } - - return this; - } - - scale(s) { - for (let i = 0; i < 9; i++) { - this.coefficients[i].multiplyScalar(s); - } - - return this; - } - - lerp(sh, alpha) { - for (let i = 0; i < 9; i++) { - this.coefficients[i].lerp(sh.coefficients[i], alpha); - } - - return this; - } - - equals(sh) { - for (let i = 0; i < 9; i++) { - if (!this.coefficients[i].equals(sh.coefficients[i])) { - return false; - } - } - - return true; - } - - copy(sh) { - return this.set(sh.coefficients); - } - - clone() { - return new this.constructor().copy(this); - } - - fromArray(array, offset = 0) { - const coefficients = this.coefficients; - - for (let i = 0; i < 9; i++) { - coefficients[i].fromArray(array, offset + i * 3); - } - - return this; - } - - toArray(array = [], offset = 0) { - const coefficients = this.coefficients; - - for (let i = 0; i < 9; i++) { - coefficients[i].toArray(array, offset + i * 3); - } - - return array; - } // evaluate the basis functions - // shBasis is an Array[ 9 ] - - - static getBasisAt(normal, shBasis) { - // normal is assumed to be unit length - const x = normal.x, - y = normal.y, - z = normal.z; // band 0 - - shBasis[0] = 0.282095; // band 1 - - shBasis[1] = 0.488603 * y; - shBasis[2] = 0.488603 * z; - shBasis[3] = 0.488603 * x; // band 2 - - shBasis[4] = 1.092548 * x * y; - shBasis[5] = 1.092548 * y * z; - shBasis[6] = 0.315392 * (3 * z * z - 1); - shBasis[7] = 1.092548 * x * z; - shBasis[8] = 0.546274 * (x * x - y * y); - } - - } - - SphericalHarmonics3.prototype.isSphericalHarmonics3 = true; - - class LightProbe extends Light { - constructor(sh = new SphericalHarmonics3(), intensity = 1) { - super(undefined, intensity); - this.sh = sh; - } - - copy(source) { - super.copy(source); - this.sh.copy(source.sh); - return this; - } - - fromJSON(json) { - this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON(); - - this.sh.fromArray(json.sh); - return this; - } - - toJSON(meta) { - const data = super.toJSON(meta); - data.object.sh = this.sh.toArray(); - return data; - } - - } - - LightProbe.prototype.isLightProbe = true; - - class MaterialLoader extends Loader { - constructor(manager) { - super(manager); - this.textures = {}; - } - - load(url, onLoad, onProgress, onError) { - const scope = this; - const loader = new FileLoader(scope.manager); - loader.setPath(scope.path); - loader.setRequestHeader(scope.requestHeader); - loader.setWithCredentials(scope.withCredentials); - loader.load(url, function (text) { - try { - onLoad(scope.parse(JSON.parse(text))); - } catch (e) { - if (onError) { - onError(e); - } else { - console.error(e); - } - - scope.manager.itemError(url); - } - }, onProgress, onError); - } - - parse(json) { - const textures = this.textures; - - function getTexture(name) { - if (textures[name] === undefined) { - console.warn('THREE.MaterialLoader: Undefined texture', name); - } - - return textures[name]; - } - - const material = new Materials[json.type](); - if (json.uuid !== undefined) material.uuid = json.uuid; - if (json.name !== undefined) material.name = json.name; - if (json.color !== undefined && material.color !== undefined) material.color.setHex(json.color); - if (json.roughness !== undefined) material.roughness = json.roughness; - if (json.metalness !== undefined) material.metalness = json.metalness; - if (json.sheen !== undefined) material.sheen = new Color().setHex(json.sheen); - if (json.emissive !== undefined && material.emissive !== undefined) material.emissive.setHex(json.emissive); - if (json.specular !== undefined && material.specular !== undefined) material.specular.setHex(json.specular); - if (json.shininess !== undefined) material.shininess = json.shininess; - if (json.clearcoat !== undefined) material.clearcoat = json.clearcoat; - if (json.clearcoatRoughness !== undefined) material.clearcoatRoughness = json.clearcoatRoughness; - if (json.transmission !== undefined) material.transmission = json.transmission; - if (json.thickness !== undefined) material.thickness = json.thickness; - if (json.attenuationDistance !== undefined) material.attenuationDistance = json.attenuationDistance; - if (json.attenuationColor !== undefined && material.attenuationColor !== undefined) material.attenuationColor.setHex(json.attenuationColor); - if (json.fog !== undefined) material.fog = json.fog; - if (json.flatShading !== undefined) material.flatShading = json.flatShading; - if (json.blending !== undefined) material.blending = json.blending; - if (json.combine !== undefined) material.combine = json.combine; - if (json.side !== undefined) material.side = json.side; - if (json.shadowSide !== undefined) material.shadowSide = json.shadowSide; - if (json.opacity !== undefined) material.opacity = json.opacity; - if (json.transparent !== undefined) material.transparent = json.transparent; - if (json.alphaTest !== undefined) material.alphaTest = json.alphaTest; - if (json.depthTest !== undefined) material.depthTest = json.depthTest; - if (json.depthWrite !== undefined) material.depthWrite = json.depthWrite; - if (json.colorWrite !== undefined) material.colorWrite = json.colorWrite; - if (json.stencilWrite !== undefined) material.stencilWrite = json.stencilWrite; - if (json.stencilWriteMask !== undefined) material.stencilWriteMask = json.stencilWriteMask; - if (json.stencilFunc !== undefined) material.stencilFunc = json.stencilFunc; - if (json.stencilRef !== undefined) material.stencilRef = json.stencilRef; - if (json.stencilFuncMask !== undefined) material.stencilFuncMask = json.stencilFuncMask; - if (json.stencilFail !== undefined) material.stencilFail = json.stencilFail; - if (json.stencilZFail !== undefined) material.stencilZFail = json.stencilZFail; - if (json.stencilZPass !== undefined) material.stencilZPass = json.stencilZPass; - if (json.wireframe !== undefined) material.wireframe = json.wireframe; - if (json.wireframeLinewidth !== undefined) material.wireframeLinewidth = json.wireframeLinewidth; - if (json.wireframeLinecap !== undefined) material.wireframeLinecap = json.wireframeLinecap; - if (json.wireframeLinejoin !== undefined) material.wireframeLinejoin = json.wireframeLinejoin; - if (json.rotation !== undefined) material.rotation = json.rotation; - if (json.linewidth !== 1) material.linewidth = json.linewidth; - if (json.dashSize !== undefined) material.dashSize = json.dashSize; - if (json.gapSize !== undefined) material.gapSize = json.gapSize; - if (json.scale !== undefined) material.scale = json.scale; - if (json.polygonOffset !== undefined) material.polygonOffset = json.polygonOffset; - if (json.polygonOffsetFactor !== undefined) material.polygonOffsetFactor = json.polygonOffsetFactor; - if (json.polygonOffsetUnits !== undefined) material.polygonOffsetUnits = json.polygonOffsetUnits; - if (json.morphTargets !== undefined) material.morphTargets = json.morphTargets; - if (json.morphNormals !== undefined) material.morphNormals = json.morphNormals; - if (json.dithering !== undefined) material.dithering = json.dithering; - if (json.alphaToCoverage !== undefined) material.alphaToCoverage = json.alphaToCoverage; - if (json.premultipliedAlpha !== undefined) material.premultipliedAlpha = json.premultipliedAlpha; - if (json.vertexTangents !== undefined) material.vertexTangents = json.vertexTangents; - if (json.visible !== undefined) material.visible = json.visible; - if (json.toneMapped !== undefined) material.toneMapped = json.toneMapped; - if (json.userData !== undefined) material.userData = json.userData; - - if (json.vertexColors !== undefined) { - if (typeof json.vertexColors === 'number') { - material.vertexColors = json.vertexColors > 0 ? true : false; - } else { - material.vertexColors = json.vertexColors; - } - } // Shader Material - - - if (json.uniforms !== undefined) { - for (const name in json.uniforms) { - const uniform = json.uniforms[name]; - material.uniforms[name] = {}; - - switch (uniform.type) { - case 't': - material.uniforms[name].value = getTexture(uniform.value); - break; - - case 'c': - material.uniforms[name].value = new Color().setHex(uniform.value); - break; - - case 'v2': - material.uniforms[name].value = new Vector2().fromArray(uniform.value); - break; - - case 'v3': - material.uniforms[name].value = new Vector3().fromArray(uniform.value); - break; - - case 'v4': - material.uniforms[name].value = new Vector4().fromArray(uniform.value); - break; - - case 'm3': - material.uniforms[name].value = new Matrix3().fromArray(uniform.value); - break; - - case 'm4': - material.uniforms[name].value = new Matrix4().fromArray(uniform.value); - break; - - default: - material.uniforms[name].value = uniform.value; - } - } - } - - if (json.defines !== undefined) material.defines = json.defines; - if (json.vertexShader !== undefined) material.vertexShader = json.vertexShader; - if (json.fragmentShader !== undefined) material.fragmentShader = json.fragmentShader; - - if (json.extensions !== undefined) { - for (const key in json.extensions) { - material.extensions[key] = json.extensions[key]; - } - } // Deprecated - - - if (json.shading !== undefined) material.flatShading = json.shading === 1; // THREE.FlatShading - // for PointsMaterial - - if (json.size !== undefined) material.size = json.size; - if (json.sizeAttenuation !== undefined) material.sizeAttenuation = json.sizeAttenuation; // maps - - if (json.map !== undefined) material.map = getTexture(json.map); - if (json.matcap !== undefined) material.matcap = getTexture(json.matcap); - if (json.alphaMap !== undefined) material.alphaMap = getTexture(json.alphaMap); - if (json.bumpMap !== undefined) material.bumpMap = getTexture(json.bumpMap); - if (json.bumpScale !== undefined) material.bumpScale = json.bumpScale; - if (json.normalMap !== undefined) material.normalMap = getTexture(json.normalMap); - if (json.normalMapType !== undefined) material.normalMapType = json.normalMapType; - - if (json.normalScale !== undefined) { - let normalScale = json.normalScale; - - if (Array.isArray(normalScale) === false) { - // Blender exporter used to export a scalar. See #7459 - normalScale = [normalScale, normalScale]; - } - - material.normalScale = new Vector2().fromArray(normalScale); - } - - if (json.displacementMap !== undefined) material.displacementMap = getTexture(json.displacementMap); - if (json.displacementScale !== undefined) material.displacementScale = json.displacementScale; - if (json.displacementBias !== undefined) material.displacementBias = json.displacementBias; - if (json.roughnessMap !== undefined) material.roughnessMap = getTexture(json.roughnessMap); - if (json.metalnessMap !== undefined) material.metalnessMap = getTexture(json.metalnessMap); - if (json.emissiveMap !== undefined) material.emissiveMap = getTexture(json.emissiveMap); - if (json.emissiveIntensity !== undefined) material.emissiveIntensity = json.emissiveIntensity; - if (json.specularMap !== undefined) material.specularMap = getTexture(json.specularMap); - if (json.envMap !== undefined) material.envMap = getTexture(json.envMap); - if (json.envMapIntensity !== undefined) material.envMapIntensity = json.envMapIntensity; - if (json.reflectivity !== undefined) material.reflectivity = json.reflectivity; - if (json.refractionRatio !== undefined) material.refractionRatio = json.refractionRatio; - if (json.lightMap !== undefined) material.lightMap = getTexture(json.lightMap); - if (json.lightMapIntensity !== undefined) material.lightMapIntensity = json.lightMapIntensity; - if (json.aoMap !== undefined) material.aoMap = getTexture(json.aoMap); - if (json.aoMapIntensity !== undefined) material.aoMapIntensity = json.aoMapIntensity; - if (json.gradientMap !== undefined) material.gradientMap = getTexture(json.gradientMap); - if (json.clearcoatMap !== undefined) material.clearcoatMap = getTexture(json.clearcoatMap); - if (json.clearcoatRoughnessMap !== undefined) material.clearcoatRoughnessMap = getTexture(json.clearcoatRoughnessMap); - if (json.clearcoatNormalMap !== undefined) material.clearcoatNormalMap = getTexture(json.clearcoatNormalMap); - if (json.clearcoatNormalScale !== undefined) material.clearcoatNormalScale = new Vector2().fromArray(json.clearcoatNormalScale); - if (json.transmissionMap !== undefined) material.transmissionMap = getTexture(json.transmissionMap); - if (json.thicknessMap !== undefined) material.thicknessMap = getTexture(json.thicknessMap); - return material; - } - - setTextures(value) { - this.textures = value; - return this; - } - - } - - class LoaderUtils { - static decodeText(array) { - if (typeof TextDecoder !== 'undefined') { - return new TextDecoder().decode(array); - } // Avoid the String.fromCharCode.apply(null, array) shortcut, which - // throws a "maximum call stack size exceeded" error for large arrays. - - - let s = ''; - - for (let i = 0, il = array.length; i < il; i++) { - // Implicitly assumes little-endian. - s += String.fromCharCode(array[i]); - } - - try { - // merges multi-byte utf-8 characters. - return decodeURIComponent(escape(s)); - } catch (e) { - // see #16358 - return s; - } - } - - static extractUrlBase(url) { - const index = url.lastIndexOf('/'); - if (index === -1) return './'; - return url.substr(0, index + 1); - } - - } - - class InstancedBufferGeometry extends BufferGeometry { - constructor() { - super(); - this.type = 'InstancedBufferGeometry'; - this.instanceCount = Infinity; - } - - copy(source) { - super.copy(source); - this.instanceCount = source.instanceCount; - return this; - } - - clone() { - return new this.constructor().copy(this); - } - - toJSON() { - const data = super.toJSON(this); - data.instanceCount = this.instanceCount; - data.isInstancedBufferGeometry = true; - return data; - } - - } - - InstancedBufferGeometry.prototype.isInstancedBufferGeometry = true; - - class InstancedBufferAttribute extends BufferAttribute { - constructor(array, itemSize, normalized, meshPerAttribute = 1) { - if (typeof normalized === 'number') { - meshPerAttribute = normalized; - normalized = false; - console.error('THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.'); - } - - super(array, itemSize, normalized); - this.meshPerAttribute = meshPerAttribute; - } - - copy(source) { - super.copy(source); - this.meshPerAttribute = source.meshPerAttribute; - return this; - } - - toJSON() { - const data = super.toJSON(); - data.meshPerAttribute = this.meshPerAttribute; - data.isInstancedBufferAttribute = true; - return data; - } - - } - - InstancedBufferAttribute.prototype.isInstancedBufferAttribute = true; - - class BufferGeometryLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - const scope = this; - const loader = new FileLoader(scope.manager); - loader.setPath(scope.path); - loader.setRequestHeader(scope.requestHeader); - loader.setWithCredentials(scope.withCredentials); - loader.load(url, function (text) { - try { - onLoad(scope.parse(JSON.parse(text))); - } catch (e) { - if (onError) { - onError(e); - } else { - console.error(e); - } - - scope.manager.itemError(url); - } - }, onProgress, onError); - } - - parse(json) { - const interleavedBufferMap = {}; - const arrayBufferMap = {}; - - function getInterleavedBuffer(json, uuid) { - if (interleavedBufferMap[uuid] !== undefined) return interleavedBufferMap[uuid]; - const interleavedBuffers = json.interleavedBuffers; - const interleavedBuffer = interleavedBuffers[uuid]; - const buffer = getArrayBuffer(json, interleavedBuffer.buffer); - const array = getTypedArray(interleavedBuffer.type, buffer); - const ib = new InterleavedBuffer(array, interleavedBuffer.stride); - ib.uuid = interleavedBuffer.uuid; - interleavedBufferMap[uuid] = ib; - return ib; - } - - function getArrayBuffer(json, uuid) { - if (arrayBufferMap[uuid] !== undefined) return arrayBufferMap[uuid]; - const arrayBuffers = json.arrayBuffers; - const arrayBuffer = arrayBuffers[uuid]; - const ab = new Uint32Array(arrayBuffer).buffer; - arrayBufferMap[uuid] = ab; - return ab; - } - - const geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry(); - const index = json.data.index; - - if (index !== undefined) { - const typedArray = getTypedArray(index.type, index.array); - geometry.setIndex(new BufferAttribute(typedArray, 1)); - } - - const attributes = json.data.attributes; - - for (const key in attributes) { - const attribute = attributes[key]; - let bufferAttribute; - - if (attribute.isInterleavedBufferAttribute) { - const interleavedBuffer = getInterleavedBuffer(json.data, attribute.data); - bufferAttribute = new InterleavedBufferAttribute(interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized); - } else { - const typedArray = getTypedArray(attribute.type, attribute.array); - const bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute; - bufferAttribute = new bufferAttributeConstr(typedArray, attribute.itemSize, attribute.normalized); - } - - if (attribute.name !== undefined) bufferAttribute.name = attribute.name; - if (attribute.usage !== undefined) bufferAttribute.setUsage(attribute.usage); - - if (attribute.updateRange !== undefined) { - bufferAttribute.updateRange.offset = attribute.updateRange.offset; - bufferAttribute.updateRange.count = attribute.updateRange.count; - } - - geometry.setAttribute(key, bufferAttribute); - } - - const morphAttributes = json.data.morphAttributes; - - if (morphAttributes) { - for (const key in morphAttributes) { - const attributeArray = morphAttributes[key]; - const array = []; - - for (let i = 0, il = attributeArray.length; i < il; i++) { - const attribute = attributeArray[i]; - let bufferAttribute; - - if (attribute.isInterleavedBufferAttribute) { - const interleavedBuffer = getInterleavedBuffer(json.data, attribute.data); - bufferAttribute = new InterleavedBufferAttribute(interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized); - } else { - const typedArray = getTypedArray(attribute.type, attribute.array); - bufferAttribute = new BufferAttribute(typedArray, attribute.itemSize, attribute.normalized); - } - - if (attribute.name !== undefined) bufferAttribute.name = attribute.name; - array.push(bufferAttribute); - } - - geometry.morphAttributes[key] = array; - } - } - - const morphTargetsRelative = json.data.morphTargetsRelative; - - if (morphTargetsRelative) { - geometry.morphTargetsRelative = true; - } - - const groups = json.data.groups || json.data.drawcalls || json.data.offsets; - - if (groups !== undefined) { - for (let i = 0, n = groups.length; i !== n; ++i) { - const group = groups[i]; - geometry.addGroup(group.start, group.count, group.materialIndex); - } - } - - const boundingSphere = json.data.boundingSphere; - - if (boundingSphere !== undefined) { - const center = new Vector3(); - - if (boundingSphere.center !== undefined) { - center.fromArray(boundingSphere.center); - } - - geometry.boundingSphere = new Sphere(center, boundingSphere.radius); - } - - if (json.name) geometry.name = json.name; - if (json.userData) geometry.userData = json.userData; - return geometry; - } - - } - - class ObjectLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - const scope = this; - const path = this.path === '' ? LoaderUtils.extractUrlBase(url) : this.path; - this.resourcePath = this.resourcePath || path; - const loader = new FileLoader(this.manager); - loader.setPath(this.path); - loader.setRequestHeader(this.requestHeader); - loader.setWithCredentials(this.withCredentials); - loader.load(url, function (text) { - let json = null; - - try { - json = JSON.parse(text); - } catch (error) { - if (onError !== undefined) onError(error); - console.error('THREE:ObjectLoader: Can\'t parse ' + url + '.', error.message); - return; - } - - const metadata = json.metadata; - - if (metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry') { - console.error('THREE.ObjectLoader: Can\'t load ' + url); - return; - } - - scope.parse(json, onLoad); - }, onProgress, onError); - } - - async loadAsync(url, onProgress) { - const scope = this; - const path = this.path === '' ? LoaderUtils.extractUrlBase(url) : this.path; - this.resourcePath = this.resourcePath || path; - const loader = new FileLoader(this.manager); - loader.setPath(this.path); - loader.setRequestHeader(this.requestHeader); - loader.setWithCredentials(this.withCredentials); - const text = await loader.loadAsync(url, onProgress); - const json = JSON.parse(text); - const metadata = json.metadata; - - if (metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry') { - throw new Error('THREE.ObjectLoader: Can\'t load ' + url); - } - - return await scope.parseAsync(json); - } - - parse(json, onLoad) { - const animations = this.parseAnimations(json.animations); - const shapes = this.parseShapes(json.shapes); - const geometries = this.parseGeometries(json.geometries, shapes); - const images = this.parseImages(json.images, function () { - if (onLoad !== undefined) onLoad(object); - }); - const textures = this.parseTextures(json.textures, images); - const materials = this.parseMaterials(json.materials, textures); - const object = this.parseObject(json.object, geometries, materials, textures, animations); - const skeletons = this.parseSkeletons(json.skeletons, object); - this.bindSkeletons(object, skeletons); // - - if (onLoad !== undefined) { - let hasImages = false; - - for (const uuid in images) { - if (images[uuid] instanceof HTMLImageElement) { - hasImages = true; - break; - } - } - - if (hasImages === false) onLoad(object); - } - - return object; - } - - async parseAsync(json) { - const animations = this.parseAnimations(json.animations); - const shapes = this.parseShapes(json.shapes); - const geometries = this.parseGeometries(json.geometries, shapes); - const images = await this.parseImagesAsync(json.images); - const textures = this.parseTextures(json.textures, images); - const materials = this.parseMaterials(json.materials, textures); - const object = this.parseObject(json.object, geometries, materials, textures, animations); - const skeletons = this.parseSkeletons(json.skeletons, object); - this.bindSkeletons(object, skeletons); - return object; - } - - parseShapes(json) { - const shapes = {}; - - if (json !== undefined) { - for (let i = 0, l = json.length; i < l; i++) { - const shape = new Shape().fromJSON(json[i]); - shapes[shape.uuid] = shape; - } - } - - return shapes; - } - - parseSkeletons(json, object) { - const skeletons = {}; - const bones = {}; // generate bone lookup table - - object.traverse(function (child) { - if (child.isBone) bones[child.uuid] = child; - }); // create skeletons - - if (json !== undefined) { - for (let i = 0, l = json.length; i < l; i++) { - const skeleton = new Skeleton().fromJSON(json[i], bones); - skeletons[skeleton.uuid] = skeleton; - } - } - - return skeletons; - } - - parseGeometries(json, shapes) { - const geometries = {}; - - if (json !== undefined) { - const bufferGeometryLoader = new BufferGeometryLoader(); - - for (let i = 0, l = json.length; i < l; i++) { - let geometry; - const data = json[i]; - - switch (data.type) { - case 'BufferGeometry': - case 'InstancedBufferGeometry': - geometry = bufferGeometryLoader.parse(data); - break; - - case 'Geometry': - console.error('THREE.ObjectLoader: The legacy Geometry type is no longer supported.'); - break; - - default: - if (data.type in Geometries) { - geometry = Geometries[data.type].fromJSON(data, shapes); - } else { - console.warn(`THREE.ObjectLoader: Unsupported geometry type "${data.type}"`); - } - - } - - geometry.uuid = data.uuid; - if (data.name !== undefined) geometry.name = data.name; - if (geometry.isBufferGeometry === true && data.userData !== undefined) geometry.userData = data.userData; - geometries[data.uuid] = geometry; - } - } - - return geometries; - } - - parseMaterials(json, textures) { - const cache = {}; // MultiMaterial - - const materials = {}; - - if (json !== undefined) { - const loader = new MaterialLoader(); - loader.setTextures(textures); - - for (let i = 0, l = json.length; i < l; i++) { - const data = json[i]; - - if (data.type === 'MultiMaterial') { - // Deprecated - const array = []; - - for (let j = 0; j < data.materials.length; j++) { - const material = data.materials[j]; - - if (cache[material.uuid] === undefined) { - cache[material.uuid] = loader.parse(material); - } - - array.push(cache[material.uuid]); - } - - materials[data.uuid] = array; - } else { - if (cache[data.uuid] === undefined) { - cache[data.uuid] = loader.parse(data); - } - - materials[data.uuid] = cache[data.uuid]; - } - } - } - - return materials; - } - - parseAnimations(json) { - const animations = {}; - - if (json !== undefined) { - for (let i = 0; i < json.length; i++) { - const data = json[i]; - const clip = AnimationClip.parse(data); - animations[clip.uuid] = clip; - } - } - - return animations; - } - - parseImages(json, onLoad) { - const scope = this; - const images = {}; - let loader; - - function loadImage(url) { - scope.manager.itemStart(url); - return loader.load(url, function () { - scope.manager.itemEnd(url); - }, undefined, function () { - scope.manager.itemError(url); - scope.manager.itemEnd(url); - }); - } - - function deserializeImage(image) { - if (typeof image === 'string') { - const url = image; - const path = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(url) ? url : scope.resourcePath + url; - return loadImage(path); - } else { - if (image.data) { - return { - data: getTypedArray(image.type, image.data), - width: image.width, - height: image.height - }; - } else { - return null; - } - } - } - - if (json !== undefined && json.length > 0) { - const manager = new LoadingManager(onLoad); - loader = new ImageLoader(manager); - loader.setCrossOrigin(this.crossOrigin); - - for (let i = 0, il = json.length; i < il; i++) { - const image = json[i]; - const url = image.url; - - if (Array.isArray(url)) { - // load array of images e.g CubeTexture - images[image.uuid] = []; - - for (let j = 0, jl = url.length; j < jl; j++) { - const currentUrl = url[j]; - const deserializedImage = deserializeImage(currentUrl); - - if (deserializedImage !== null) { - if (deserializedImage instanceof HTMLImageElement) { - images[image.uuid].push(deserializedImage); - } else { - // special case: handle array of data textures for cube textures - images[image.uuid].push(new DataTexture(deserializedImage.data, deserializedImage.width, deserializedImage.height)); - } - } - } - } else { - // load single image - const deserializedImage = deserializeImage(image.url); - - if (deserializedImage !== null) { - images[image.uuid] = deserializedImage; - } - } - } - } - - return images; - } - - async parseImagesAsync(json) { - const scope = this; - const images = {}; - let loader; - - async function deserializeImage(image) { - if (typeof image === 'string') { - const url = image; - const path = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(url) ? url : scope.resourcePath + url; - return await loader.loadAsync(path); - } else { - if (image.data) { - return { - data: getTypedArray(image.type, image.data), - width: image.width, - height: image.height - }; - } else { - return null; - } - } - } - - if (json !== undefined && json.length > 0) { - loader = new ImageLoader(this.manager); - loader.setCrossOrigin(this.crossOrigin); - - for (let i = 0, il = json.length; i < il; i++) { - const image = json[i]; - const url = image.url; - - if (Array.isArray(url)) { - // load array of images e.g CubeTexture - images[image.uuid] = []; - - for (let j = 0, jl = url.length; j < jl; j++) { - const currentUrl = url[j]; - const deserializedImage = await deserializeImage(currentUrl); - - if (deserializedImage !== null) { - if (deserializedImage instanceof HTMLImageElement) { - images[image.uuid].push(deserializedImage); - } else { - // special case: handle array of data textures for cube textures - images[image.uuid].push(new DataTexture(deserializedImage.data, deserializedImage.width, deserializedImage.height)); - } - } - } - } else { - // load single image - const deserializedImage = await deserializeImage(image.url); - - if (deserializedImage !== null) { - images[image.uuid] = deserializedImage; - } - } - } - } - - return images; - } - - parseTextures(json, images) { - function parseConstant(value, type) { - if (typeof value === 'number') return value; - console.warn('THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value); - return type[value]; - } - - const textures = {}; - - if (json !== undefined) { - for (let i = 0, l = json.length; i < l; i++) { - const data = json[i]; - - if (data.image === undefined) { - console.warn('THREE.ObjectLoader: No "image" specified for', data.uuid); - } - - if (images[data.image] === undefined) { - console.warn('THREE.ObjectLoader: Undefined image', data.image); - } - - let texture; - const image = images[data.image]; - - if (Array.isArray(image)) { - texture = new CubeTexture(image); - if (image.length === 6) texture.needsUpdate = true; - } else { - if (image && image.data) { - texture = new DataTexture(image.data, image.width, image.height); - } else { - texture = new Texture(image); - } - - if (image) texture.needsUpdate = true; // textures can have undefined image data - } - - texture.uuid = data.uuid; - if (data.name !== undefined) texture.name = data.name; - if (data.mapping !== undefined) texture.mapping = parseConstant(data.mapping, TEXTURE_MAPPING); - if (data.offset !== undefined) texture.offset.fromArray(data.offset); - if (data.repeat !== undefined) texture.repeat.fromArray(data.repeat); - if (data.center !== undefined) texture.center.fromArray(data.center); - if (data.rotation !== undefined) texture.rotation = data.rotation; - - if (data.wrap !== undefined) { - texture.wrapS = parseConstant(data.wrap[0], TEXTURE_WRAPPING); - texture.wrapT = parseConstant(data.wrap[1], TEXTURE_WRAPPING); - } - - if (data.format !== undefined) texture.format = data.format; - if (data.type !== undefined) texture.type = data.type; - if (data.encoding !== undefined) texture.encoding = data.encoding; - if (data.minFilter !== undefined) texture.minFilter = parseConstant(data.minFilter, TEXTURE_FILTER); - if (data.magFilter !== undefined) texture.magFilter = parseConstant(data.magFilter, TEXTURE_FILTER); - if (data.anisotropy !== undefined) texture.anisotropy = data.anisotropy; - if (data.flipY !== undefined) texture.flipY = data.flipY; - if (data.premultiplyAlpha !== undefined) texture.premultiplyAlpha = data.premultiplyAlpha; - if (data.unpackAlignment !== undefined) texture.unpackAlignment = data.unpackAlignment; - textures[data.uuid] = texture; - } - } - - return textures; - } - - parseObject(data, geometries, materials, textures, animations) { - let object; - - function getGeometry(name) { - if (geometries[name] === undefined) { - console.warn('THREE.ObjectLoader: Undefined geometry', name); - } - - return geometries[name]; - } - - function getMaterial(name) { - if (name === undefined) return undefined; - - if (Array.isArray(name)) { - const array = []; - - for (let i = 0, l = name.length; i < l; i++) { - const uuid = name[i]; - - if (materials[uuid] === undefined) { - console.warn('THREE.ObjectLoader: Undefined material', uuid); - } - - array.push(materials[uuid]); - } - - return array; - } - - if (materials[name] === undefined) { - console.warn('THREE.ObjectLoader: Undefined material', name); - } - - return materials[name]; - } - - function getTexture(uuid) { - if (textures[uuid] === undefined) { - console.warn('THREE.ObjectLoader: Undefined texture', uuid); - } - - return textures[uuid]; - } - - let geometry, material; - - switch (data.type) { - case 'Scene': - object = new Scene(); - - if (data.background !== undefined) { - if (Number.isInteger(data.background)) { - object.background = new Color(data.background); - } else { - object.background = getTexture(data.background); - } - } - - if (data.environment !== undefined) object.environment = getTexture(data.environment); - - if (data.fog !== undefined) { - if (data.fog.type === 'Fog') { - object.fog = new Fog(data.fog.color, data.fog.near, data.fog.far); - } else if (data.fog.type === 'FogExp2') { - object.fog = new FogExp2(data.fog.color, data.fog.density); - } - } - - break; - - case 'PerspectiveCamera': - object = new PerspectiveCamera(data.fov, data.aspect, data.near, data.far); - if (data.focus !== undefined) object.focus = data.focus; - if (data.zoom !== undefined) object.zoom = data.zoom; - if (data.filmGauge !== undefined) object.filmGauge = data.filmGauge; - if (data.filmOffset !== undefined) object.filmOffset = data.filmOffset; - if (data.view !== undefined) object.view = Object.assign({}, data.view); - break; - - case 'OrthographicCamera': - object = new OrthographicCamera(data.left, data.right, data.top, data.bottom, data.near, data.far); - if (data.zoom !== undefined) object.zoom = data.zoom; - if (data.view !== undefined) object.view = Object.assign({}, data.view); - break; - - case 'AmbientLight': - object = new AmbientLight(data.color, data.intensity); - break; - - case 'DirectionalLight': - object = new DirectionalLight(data.color, data.intensity); - break; - - case 'PointLight': - object = new PointLight(data.color, data.intensity, data.distance, data.decay); - break; - - case 'RectAreaLight': - object = new RectAreaLight(data.color, data.intensity, data.width, data.height); - break; - - case 'SpotLight': - object = new SpotLight(data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay); - break; - - case 'HemisphereLight': - object = new HemisphereLight(data.color, data.groundColor, data.intensity); - break; - - case 'LightProbe': - object = new LightProbe().fromJSON(data); - break; - - case 'SkinnedMesh': - geometry = getGeometry(data.geometry); - material = getMaterial(data.material); - object = new SkinnedMesh(geometry, material); - if (data.bindMode !== undefined) object.bindMode = data.bindMode; - if (data.bindMatrix !== undefined) object.bindMatrix.fromArray(data.bindMatrix); - if (data.skeleton !== undefined) object.skeleton = data.skeleton; - break; - - case 'Mesh': - geometry = getGeometry(data.geometry); - material = getMaterial(data.material); - object = new Mesh(geometry, material); - break; - - case 'InstancedMesh': - geometry = getGeometry(data.geometry); - material = getMaterial(data.material); - const count = data.count; - const instanceMatrix = data.instanceMatrix; - const instanceColor = data.instanceColor; - object = new InstancedMesh(geometry, material, count); - object.instanceMatrix = new BufferAttribute(new Float32Array(instanceMatrix.array), 16); - if (instanceColor !== undefined) object.instanceColor = new BufferAttribute(new Float32Array(instanceColor.array), instanceColor.itemSize); - break; - - case 'LOD': - object = new LOD(); - break; - - case 'Line': - object = new Line(getGeometry(data.geometry), getMaterial(data.material)); - break; - - case 'LineLoop': - object = new LineLoop(getGeometry(data.geometry), getMaterial(data.material)); - break; - - case 'LineSegments': - object = new LineSegments(getGeometry(data.geometry), getMaterial(data.material)); - break; - - case 'PointCloud': - case 'Points': - object = new Points(getGeometry(data.geometry), getMaterial(data.material)); - break; - - case 'Sprite': - object = new Sprite(getMaterial(data.material)); - break; - - case 'Group': - object = new Group(); - break; - - case 'Bone': - object = new Bone(); - break; - - default: - object = new Object3D(); - } - - object.uuid = data.uuid; - if (data.name !== undefined) object.name = data.name; - - if (data.matrix !== undefined) { - object.matrix.fromArray(data.matrix); - if (data.matrixAutoUpdate !== undefined) object.matrixAutoUpdate = data.matrixAutoUpdate; - if (object.matrixAutoUpdate) object.matrix.decompose(object.position, object.quaternion, object.scale); - } else { - if (data.position !== undefined) object.position.fromArray(data.position); - if (data.rotation !== undefined) object.rotation.fromArray(data.rotation); - if (data.quaternion !== undefined) object.quaternion.fromArray(data.quaternion); - if (data.scale !== undefined) object.scale.fromArray(data.scale); - } - - if (data.castShadow !== undefined) object.castShadow = data.castShadow; - if (data.receiveShadow !== undefined) object.receiveShadow = data.receiveShadow; - - if (data.shadow) { - if (data.shadow.bias !== undefined) object.shadow.bias = data.shadow.bias; - if (data.shadow.normalBias !== undefined) object.shadow.normalBias = data.shadow.normalBias; - if (data.shadow.radius !== undefined) object.shadow.radius = data.shadow.radius; - if (data.shadow.mapSize !== undefined) object.shadow.mapSize.fromArray(data.shadow.mapSize); - if (data.shadow.camera !== undefined) object.shadow.camera = this.parseObject(data.shadow.camera); - } - - if (data.visible !== undefined) object.visible = data.visible; - if (data.frustumCulled !== undefined) object.frustumCulled = data.frustumCulled; - if (data.renderOrder !== undefined) object.renderOrder = data.renderOrder; - if (data.userData !== undefined) object.userData = data.userData; - if (data.layers !== undefined) object.layers.mask = data.layers; - - if (data.children !== undefined) { - const children = data.children; - - for (let i = 0; i < children.length; i++) { - object.add(this.parseObject(children[i], geometries, materials, textures, animations)); - } - } - - if (data.animations !== undefined) { - const objectAnimations = data.animations; - - for (let i = 0; i < objectAnimations.length; i++) { - const uuid = objectAnimations[i]; - object.animations.push(animations[uuid]); - } - } - - if (data.type === 'LOD') { - if (data.autoUpdate !== undefined) object.autoUpdate = data.autoUpdate; - const levels = data.levels; - - for (let l = 0; l < levels.length; l++) { - const level = levels[l]; - const child = object.getObjectByProperty('uuid', level.object); - - if (child !== undefined) { - object.addLevel(child, level.distance); - } - } - } - - return object; - } - - bindSkeletons(object, skeletons) { - if (Object.keys(skeletons).length === 0) return; - object.traverse(function (child) { - if (child.isSkinnedMesh === true && child.skeleton !== undefined) { - const skeleton = skeletons[child.skeleton]; - - if (skeleton === undefined) { - console.warn('THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton); - } else { - child.bind(skeleton, child.bindMatrix); - } - } - }); - } - /* DEPRECATED */ - - - setTexturePath(value) { - console.warn('THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().'); - return this.setResourcePath(value); - } - - } - - const TEXTURE_MAPPING = { - UVMapping: UVMapping, - CubeReflectionMapping: CubeReflectionMapping, - CubeRefractionMapping: CubeRefractionMapping, - EquirectangularReflectionMapping: EquirectangularReflectionMapping, - EquirectangularRefractionMapping: EquirectangularRefractionMapping, - CubeUVReflectionMapping: CubeUVReflectionMapping, - CubeUVRefractionMapping: CubeUVRefractionMapping - }; - const TEXTURE_WRAPPING = { - RepeatWrapping: RepeatWrapping, - ClampToEdgeWrapping: ClampToEdgeWrapping, - MirroredRepeatWrapping: MirroredRepeatWrapping - }; - const TEXTURE_FILTER = { - NearestFilter: NearestFilter, - NearestMipmapNearestFilter: NearestMipmapNearestFilter, - NearestMipmapLinearFilter: NearestMipmapLinearFilter, - LinearFilter: LinearFilter, - LinearMipmapNearestFilter: LinearMipmapNearestFilter, - LinearMipmapLinearFilter: LinearMipmapLinearFilter - }; - - class ImageBitmapLoader extends Loader { - constructor(manager) { - super(manager); - - if (typeof createImageBitmap === 'undefined') { - console.warn('THREE.ImageBitmapLoader: createImageBitmap() not supported.'); - } - - if (typeof fetch === 'undefined') { - console.warn('THREE.ImageBitmapLoader: fetch() not supported.'); - } - - this.options = { - premultiplyAlpha: 'none' - }; - } - - setOptions(options) { - this.options = options; - return this; - } - - load(url, onLoad, onProgress, onError) { - if (url === undefined) url = ''; - if (this.path !== undefined) url = this.path + url; - url = this.manager.resolveURL(url); - const scope = this; - const cached = Cache.get(url); - - if (cached !== undefined) { - scope.manager.itemStart(url); - setTimeout(function () { - if (onLoad) onLoad(cached); - scope.manager.itemEnd(url); - }, 0); - return cached; - } - - const fetchOptions = {}; - fetchOptions.credentials = this.crossOrigin === 'anonymous' ? 'same-origin' : 'include'; - fetchOptions.headers = this.requestHeader; - fetch(url, fetchOptions).then(function (res) { - return res.blob(); - }).then(function (blob) { - return createImageBitmap(blob, Object.assign(scope.options, { - colorSpaceConversion: 'none' - })); - }).then(function (imageBitmap) { - Cache.add(url, imageBitmap); - if (onLoad) onLoad(imageBitmap); - scope.manager.itemEnd(url); - }).catch(function (e) { - if (onError) onError(e); - scope.manager.itemError(url); - scope.manager.itemEnd(url); - }); - scope.manager.itemStart(url); - } - - } - - ImageBitmapLoader.prototype.isImageBitmapLoader = true; - - class ShapePath { - constructor() { - this.type = 'ShapePath'; - this.color = new Color(); - this.subPaths = []; - this.currentPath = null; - } - - moveTo(x, y) { - this.currentPath = new Path(); - this.subPaths.push(this.currentPath); - this.currentPath.moveTo(x, y); - return this; - } - - lineTo(x, y) { - this.currentPath.lineTo(x, y); - return this; - } - - quadraticCurveTo(aCPx, aCPy, aX, aY) { - this.currentPath.quadraticCurveTo(aCPx, aCPy, aX, aY); - return this; - } - - bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) { - this.currentPath.bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY); - return this; - } - - splineThru(pts) { - this.currentPath.splineThru(pts); - return this; - } - - toShapes(isCCW, noHoles) { - function toShapesNoHoles(inSubpaths) { - const shapes = []; - - for (let i = 0, l = inSubpaths.length; i < l; i++) { - const tmpPath = inSubpaths[i]; - const tmpShape = new Shape(); - tmpShape.curves = tmpPath.curves; - shapes.push(tmpShape); - } - - return shapes; - } - - function isPointInsidePolygon(inPt, inPolygon) { - const polyLen = inPolygon.length; // inPt on polygon contour => immediate success or - // toggling of inside/outside at every single! intersection point of an edge - // with the horizontal line through inPt, left of inPt - // not counting lowerY endpoints of edges and whole edges on that line - - let inside = false; - - for (let p = polyLen - 1, q = 0; q < polyLen; p = q++) { - let edgeLowPt = inPolygon[p]; - let edgeHighPt = inPolygon[q]; - let edgeDx = edgeHighPt.x - edgeLowPt.x; - let edgeDy = edgeHighPt.y - edgeLowPt.y; - - if (Math.abs(edgeDy) > Number.EPSILON) { - // not parallel - if (edgeDy < 0) { - edgeLowPt = inPolygon[q]; - edgeDx = -edgeDx; - edgeHighPt = inPolygon[p]; - edgeDy = -edgeDy; - } - - if (inPt.y < edgeLowPt.y || inPt.y > edgeHighPt.y) continue; - - if (inPt.y === edgeLowPt.y) { - if (inPt.x === edgeLowPt.x) return true; // inPt is on contour ? - // continue; // no intersection or edgeLowPt => doesn't count !!! - } else { - const perpEdge = edgeDy * (inPt.x - edgeLowPt.x) - edgeDx * (inPt.y - edgeLowPt.y); - if (perpEdge === 0) return true; // inPt is on contour ? - - if (perpEdge < 0) continue; - inside = !inside; // true intersection left of inPt - } - } else { - // parallel or collinear - if (inPt.y !== edgeLowPt.y) continue; // parallel - // edge lies on the same horizontal line as inPt - - if (edgeHighPt.x <= inPt.x && inPt.x <= edgeLowPt.x || edgeLowPt.x <= inPt.x && inPt.x <= edgeHighPt.x) return true; // inPt: Point on contour ! - // continue; - } - } - - return inside; - } - - const isClockWise = ShapeUtils.isClockWise; - const subPaths = this.subPaths; - if (subPaths.length === 0) return []; - if (noHoles === true) return toShapesNoHoles(subPaths); - let solid, tmpPath, tmpShape; - const shapes = []; - - if (subPaths.length === 1) { - tmpPath = subPaths[0]; - tmpShape = new Shape(); - tmpShape.curves = tmpPath.curves; - shapes.push(tmpShape); - return shapes; - } - - let holesFirst = !isClockWise(subPaths[0].getPoints()); - holesFirst = isCCW ? !holesFirst : holesFirst; // console.log("Holes first", holesFirst); - - const betterShapeHoles = []; - const newShapes = []; - let newShapeHoles = []; - let mainIdx = 0; - let tmpPoints; - newShapes[mainIdx] = undefined; - newShapeHoles[mainIdx] = []; - - for (let i = 0, l = subPaths.length; i < l; i++) { - tmpPath = subPaths[i]; - tmpPoints = tmpPath.getPoints(); - solid = isClockWise(tmpPoints); - solid = isCCW ? !solid : solid; - - if (solid) { - if (!holesFirst && newShapes[mainIdx]) mainIdx++; - newShapes[mainIdx] = { - s: new Shape(), - p: tmpPoints - }; - newShapes[mainIdx].s.curves = tmpPath.curves; - if (holesFirst) mainIdx++; - newShapeHoles[mainIdx] = []; //console.log('cw', i); - } else { - newShapeHoles[mainIdx].push({ - h: tmpPath, - p: tmpPoints[0] - }); //console.log('ccw', i); - } - } // only Holes? -> probably all Shapes with wrong orientation - - - if (!newShapes[0]) return toShapesNoHoles(subPaths); - - if (newShapes.length > 1) { - let ambiguous = false; - const toChange = []; - - for (let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx++) { - betterShapeHoles[sIdx] = []; - } - - for (let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx++) { - const sho = newShapeHoles[sIdx]; - - for (let hIdx = 0; hIdx < sho.length; hIdx++) { - const ho = sho[hIdx]; - let hole_unassigned = true; - - for (let s2Idx = 0; s2Idx < newShapes.length; s2Idx++) { - if (isPointInsidePolygon(ho.p, newShapes[s2Idx].p)) { - if (sIdx !== s2Idx) toChange.push({ - froms: sIdx, - tos: s2Idx, - hole: hIdx - }); - - if (hole_unassigned) { - hole_unassigned = false; - betterShapeHoles[s2Idx].push(ho); - } else { - ambiguous = true; - } - } - } - - if (hole_unassigned) { - betterShapeHoles[sIdx].push(ho); - } - } - } // console.log("ambiguous: ", ambiguous); - - - if (toChange.length > 0) { - // console.log("to change: ", toChange); - if (!ambiguous) newShapeHoles = betterShapeHoles; - } - } - - let tmpHoles; - - for (let i = 0, il = newShapes.length; i < il; i++) { - tmpShape = newShapes[i].s; - shapes.push(tmpShape); - tmpHoles = newShapeHoles[i]; - - for (let j = 0, jl = tmpHoles.length; j < jl; j++) { - tmpShape.holes.push(tmpHoles[j].h); - } - } //console.log("shape", shapes); - - - return shapes; - } - - } - - class Font { - constructor(data) { - this.type = 'Font'; - this.data = data; - } - - generateShapes(text, size = 100) { - const shapes = []; - const paths = createPaths(text, size, this.data); - - for (let p = 0, pl = paths.length; p < pl; p++) { - Array.prototype.push.apply(shapes, paths[p].toShapes()); - } - - return shapes; - } - - } - - function createPaths(text, size, data) { - const chars = Array.from(text); - const scale = size / data.resolution; - const line_height = (data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness) * scale; - const paths = []; - let offsetX = 0, - offsetY = 0; - - for (let i = 0; i < chars.length; i++) { - const char = chars[i]; - - if (char === '\n') { - offsetX = 0; - offsetY -= line_height; - } else { - const ret = createPath(char, scale, offsetX, offsetY, data); - offsetX += ret.offsetX; - paths.push(ret.path); - } - } - - return paths; - } - - function createPath(char, scale, offsetX, offsetY, data) { - const glyph = data.glyphs[char] || data.glyphs['?']; - - if (!glyph) { - console.error('THREE.Font: character "' + char + '" does not exists in font family ' + data.familyName + '.'); - return; - } - - const path = new ShapePath(); - let x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2; - - if (glyph.o) { - const outline = glyph._cachedOutline || (glyph._cachedOutline = glyph.o.split(' ')); - - for (let i = 0, l = outline.length; i < l;) { - const action = outline[i++]; - - switch (action) { - case 'm': - // moveTo - x = outline[i++] * scale + offsetX; - y = outline[i++] * scale + offsetY; - path.moveTo(x, y); - break; - - case 'l': - // lineTo - x = outline[i++] * scale + offsetX; - y = outline[i++] * scale + offsetY; - path.lineTo(x, y); - break; - - case 'q': - // quadraticCurveTo - cpx = outline[i++] * scale + offsetX; - cpy = outline[i++] * scale + offsetY; - cpx1 = outline[i++] * scale + offsetX; - cpy1 = outline[i++] * scale + offsetY; - path.quadraticCurveTo(cpx1, cpy1, cpx, cpy); - break; - - case 'b': - // bezierCurveTo - cpx = outline[i++] * scale + offsetX; - cpy = outline[i++] * scale + offsetY; - cpx1 = outline[i++] * scale + offsetX; - cpy1 = outline[i++] * scale + offsetY; - cpx2 = outline[i++] * scale + offsetX; - cpy2 = outline[i++] * scale + offsetY; - path.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, cpx, cpy); - break; - } - } - } - - return { - offsetX: glyph.ha * scale, - path: path - }; - } - - Font.prototype.isFont = true; - - class FontLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - const scope = this; - const loader = new FileLoader(this.manager); - loader.setPath(this.path); - loader.setRequestHeader(this.requestHeader); - loader.setWithCredentials(scope.withCredentials); - loader.load(url, function (text) { - let json; - - try { - json = JSON.parse(text); - } catch (e) { - console.warn('THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead.'); - json = JSON.parse(text.substring(65, text.length - 2)); - } - - const font = scope.parse(json); - if (onLoad) onLoad(font); - }, onProgress, onError); - } - - parse(json) { - return new Font(json); - } - - } - - let _context; - - const AudioContext = { - getContext: function () { - if (_context === undefined) { - _context = new (window.AudioContext || window.webkitAudioContext)(); - } - - return _context; - }, - setContext: function (value) { - _context = value; - } - }; - - class AudioLoader extends Loader { - constructor(manager) { - super(manager); - } - - load(url, onLoad, onProgress, onError) { - const scope = this; - const loader = new FileLoader(this.manager); - loader.setResponseType('arraybuffer'); - loader.setPath(this.path); - loader.setRequestHeader(this.requestHeader); - loader.setWithCredentials(this.withCredentials); - loader.load(url, function (buffer) { - try { - // Create a copy of the buffer. The `decodeAudioData` method - // detaches the buffer when complete, preventing reuse. - const bufferCopy = buffer.slice(0); - const context = AudioContext.getContext(); - context.decodeAudioData(bufferCopy, function (audioBuffer) { - onLoad(audioBuffer); - }); - } catch (e) { - if (onError) { - onError(e); - } else { - console.error(e); - } - - scope.manager.itemError(url); - } - }, onProgress, onError); - } - - } - - class HemisphereLightProbe extends LightProbe { - constructor(skyColor, groundColor, intensity = 1) { - super(undefined, intensity); - const color1 = new Color().set(skyColor); - const color2 = new Color().set(groundColor); - const sky = new Vector3(color1.r, color1.g, color1.b); - const ground = new Vector3(color2.r, color2.g, color2.b); // without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI ); - - const c0 = Math.sqrt(Math.PI); - const c1 = c0 * Math.sqrt(0.75); - this.sh.coefficients[0].copy(sky).add(ground).multiplyScalar(c0); - this.sh.coefficients[1].copy(sky).sub(ground).multiplyScalar(c1); - } - - } - - HemisphereLightProbe.prototype.isHemisphereLightProbe = true; - - class AmbientLightProbe extends LightProbe { - constructor(color, intensity = 1) { - super(undefined, intensity); - const color1 = new Color().set(color); // without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI ); - - this.sh.coefficients[0].set(color1.r, color1.g, color1.b).multiplyScalar(2 * Math.sqrt(Math.PI)); - } - - } - - AmbientLightProbe.prototype.isAmbientLightProbe = true; - - const _eyeRight = /*@__PURE__*/new Matrix4(); - - const _eyeLeft = /*@__PURE__*/new Matrix4(); - - class StereoCamera { - constructor() { - this.type = 'StereoCamera'; - this.aspect = 1; - this.eyeSep = 0.064; - this.cameraL = new PerspectiveCamera(); - this.cameraL.layers.enable(1); - this.cameraL.matrixAutoUpdate = false; - this.cameraR = new PerspectiveCamera(); - this.cameraR.layers.enable(2); - this.cameraR.matrixAutoUpdate = false; - this._cache = { - focus: null, - fov: null, - aspect: null, - near: null, - far: null, - zoom: null, - eyeSep: null - }; - } - - update(camera) { - const cache = this._cache; - const needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep; - - if (needsUpdate) { - cache.focus = camera.focus; - cache.fov = camera.fov; - cache.aspect = camera.aspect * this.aspect; - cache.near = camera.near; - cache.far = camera.far; - cache.zoom = camera.zoom; - cache.eyeSep = this.eyeSep; // Off-axis stereoscopic effect based on - // http://paulbourke.net/stereographics/stereorender/ - - const projectionMatrix = camera.projectionMatrix.clone(); - const eyeSepHalf = cache.eyeSep / 2; - const eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus; - const ymax = cache.near * Math.tan(DEG2RAD * cache.fov * 0.5) / cache.zoom; - let xmin, xmax; // translate xOffset - - _eyeLeft.elements[12] = -eyeSepHalf; - _eyeRight.elements[12] = eyeSepHalf; // for left eye - - xmin = -ymax * cache.aspect + eyeSepOnProjection; - xmax = ymax * cache.aspect + eyeSepOnProjection; - projectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin); - projectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin); - this.cameraL.projectionMatrix.copy(projectionMatrix); // for right eye - - xmin = -ymax * cache.aspect - eyeSepOnProjection; - xmax = ymax * cache.aspect - eyeSepOnProjection; - projectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin); - projectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin); - this.cameraR.projectionMatrix.copy(projectionMatrix); - } - - this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft); - this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight); - } - - } - - class Clock { - constructor(autoStart = true) { - this.autoStart = autoStart; - this.startTime = 0; - this.oldTime = 0; - this.elapsedTime = 0; - this.running = false; - } - - start() { - this.startTime = now(); - this.oldTime = this.startTime; - this.elapsedTime = 0; - this.running = true; - } - - stop() { - this.getElapsedTime(); - this.running = false; - this.autoStart = false; - } - - getElapsedTime() { - this.getDelta(); - return this.elapsedTime; - } - - getDelta() { - let diff = 0; - - if (this.autoStart && !this.running) { - this.start(); - return 0; - } - - if (this.running) { - const newTime = now(); - diff = (newTime - this.oldTime) / 1000; - this.oldTime = newTime; - this.elapsedTime += diff; - } - - return diff; - } - - } - - function now() { - return (typeof performance === 'undefined' ? Date : performance).now(); // see #10732 - } - - const _position$1 = /*@__PURE__*/new Vector3(); - - const _quaternion$1 = /*@__PURE__*/new Quaternion(); - - const _scale$1 = /*@__PURE__*/new Vector3(); - - const _orientation$1 = /*@__PURE__*/new Vector3(); - - class AudioListener extends Object3D { - constructor() { - super(); - this.type = 'AudioListener'; - this.context = AudioContext.getContext(); - this.gain = this.context.createGain(); - this.gain.connect(this.context.destination); - this.filter = null; - this.timeDelta = 0; // private - - this._clock = new Clock(); - } - - getInput() { - return this.gain; - } - - removeFilter() { - if (this.filter !== null) { - this.gain.disconnect(this.filter); - this.filter.disconnect(this.context.destination); - this.gain.connect(this.context.destination); - this.filter = null; - } - - return this; - } - - getFilter() { - return this.filter; - } - - setFilter(value) { - if (this.filter !== null) { - this.gain.disconnect(this.filter); - this.filter.disconnect(this.context.destination); - } else { - this.gain.disconnect(this.context.destination); - } - - this.filter = value; - this.gain.connect(this.filter); - this.filter.connect(this.context.destination); - return this; - } - - getMasterVolume() { - return this.gain.gain.value; - } - - setMasterVolume(value) { - this.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01); - return this; - } - - updateMatrixWorld(force) { - super.updateMatrixWorld(force); - const listener = this.context.listener; - const up = this.up; - this.timeDelta = this._clock.getDelta(); - this.matrixWorld.decompose(_position$1, _quaternion$1, _scale$1); - - _orientation$1.set(0, 0, -1).applyQuaternion(_quaternion$1); - - if (listener.positionX) { - // code path for Chrome (see #14393) - const endTime = this.context.currentTime + this.timeDelta; - listener.positionX.linearRampToValueAtTime(_position$1.x, endTime); - listener.positionY.linearRampToValueAtTime(_position$1.y, endTime); - listener.positionZ.linearRampToValueAtTime(_position$1.z, endTime); - listener.forwardX.linearRampToValueAtTime(_orientation$1.x, endTime); - listener.forwardY.linearRampToValueAtTime(_orientation$1.y, endTime); - listener.forwardZ.linearRampToValueAtTime(_orientation$1.z, endTime); - listener.upX.linearRampToValueAtTime(up.x, endTime); - listener.upY.linearRampToValueAtTime(up.y, endTime); - listener.upZ.linearRampToValueAtTime(up.z, endTime); - } else { - listener.setPosition(_position$1.x, _position$1.y, _position$1.z); - listener.setOrientation(_orientation$1.x, _orientation$1.y, _orientation$1.z, up.x, up.y, up.z); - } - } - - } - - class Audio extends Object3D { - constructor(listener) { - super(); - this.type = 'Audio'; - this.listener = listener; - this.context = listener.context; - this.gain = this.context.createGain(); - this.gain.connect(listener.getInput()); - this.autoplay = false; - this.buffer = null; - this.detune = 0; - this.loop = false; - this.loopStart = 0; - this.loopEnd = 0; - this.offset = 0; - this.duration = undefined; - this.playbackRate = 1; - this.isPlaying = false; - this.hasPlaybackControl = true; - this.source = null; - this.sourceType = 'empty'; - this._startedAt = 0; - this._progress = 0; - this._connected = false; - this.filters = []; - } - - getOutput() { - return this.gain; - } - - setNodeSource(audioNode) { - this.hasPlaybackControl = false; - this.sourceType = 'audioNode'; - this.source = audioNode; - this.connect(); - return this; - } - - setMediaElementSource(mediaElement) { - this.hasPlaybackControl = false; - this.sourceType = 'mediaNode'; - this.source = this.context.createMediaElementSource(mediaElement); - this.connect(); - return this; - } - - setMediaStreamSource(mediaStream) { - this.hasPlaybackControl = false; - this.sourceType = 'mediaStreamNode'; - this.source = this.context.createMediaStreamSource(mediaStream); - this.connect(); - return this; - } - - setBuffer(audioBuffer) { - this.buffer = audioBuffer; - this.sourceType = 'buffer'; - if (this.autoplay) this.play(); - return this; - } - - play(delay = 0) { - if (this.isPlaying === true) { - console.warn('THREE.Audio: Audio is already playing.'); - return; - } - - if (this.hasPlaybackControl === false) { - console.warn('THREE.Audio: this Audio has no playback control.'); - return; - } - - this._startedAt = this.context.currentTime + delay; - const source = this.context.createBufferSource(); - source.buffer = this.buffer; - source.loop = this.loop; - source.loopStart = this.loopStart; - source.loopEnd = this.loopEnd; - source.onended = this.onEnded.bind(this); - source.start(this._startedAt, this._progress + this.offset, this.duration); - this.isPlaying = true; - this.source = source; - this.setDetune(this.detune); - this.setPlaybackRate(this.playbackRate); - return this.connect(); - } - - pause() { - if (this.hasPlaybackControl === false) { - console.warn('THREE.Audio: this Audio has no playback control.'); - return; - } - - if (this.isPlaying === true) { - // update current progress - this._progress += Math.max(this.context.currentTime - this._startedAt, 0) * this.playbackRate; - - if (this.loop === true) { - // ensure _progress does not exceed duration with looped audios - this._progress = this._progress % (this.duration || this.buffer.duration); - } - - this.source.stop(); - this.source.onended = null; - this.isPlaying = false; - } - - return this; - } - - stop() { - if (this.hasPlaybackControl === false) { - console.warn('THREE.Audio: this Audio has no playback control.'); - return; - } - - this._progress = 0; - this.source.stop(); - this.source.onended = null; - this.isPlaying = false; - return this; - } - - connect() { - if (this.filters.length > 0) { - this.source.connect(this.filters[0]); - - for (let i = 1, l = this.filters.length; i < l; i++) { - this.filters[i - 1].connect(this.filters[i]); - } - - this.filters[this.filters.length - 1].connect(this.getOutput()); - } else { - this.source.connect(this.getOutput()); - } - - this._connected = true; - return this; - } - - disconnect() { - if (this.filters.length > 0) { - this.source.disconnect(this.filters[0]); - - for (let i = 1, l = this.filters.length; i < l; i++) { - this.filters[i - 1].disconnect(this.filters[i]); - } - - this.filters[this.filters.length - 1].disconnect(this.getOutput()); - } else { - this.source.disconnect(this.getOutput()); - } - - this._connected = false; - return this; - } - - getFilters() { - return this.filters; - } - - setFilters(value) { - if (!value) value = []; - - if (this._connected === true) { - this.disconnect(); - this.filters = value.slice(); - this.connect(); - } else { - this.filters = value.slice(); - } - - return this; - } - - setDetune(value) { - this.detune = value; - if (this.source.detune === undefined) return; // only set detune when available - - if (this.isPlaying === true) { - this.source.detune.setTargetAtTime(this.detune, this.context.currentTime, 0.01); - } - - return this; - } - - getDetune() { - return this.detune; - } - - getFilter() { - return this.getFilters()[0]; - } - - setFilter(filter) { - return this.setFilters(filter ? [filter] : []); - } - - setPlaybackRate(value) { - if (this.hasPlaybackControl === false) { - console.warn('THREE.Audio: this Audio has no playback control.'); - return; - } - - this.playbackRate = value; - - if (this.isPlaying === true) { - this.source.playbackRate.setTargetAtTime(this.playbackRate, this.context.currentTime, 0.01); - } - - return this; - } - - getPlaybackRate() { - return this.playbackRate; - } - - onEnded() { - this.isPlaying = false; - } - - getLoop() { - if (this.hasPlaybackControl === false) { - console.warn('THREE.Audio: this Audio has no playback control.'); - return false; - } - - return this.loop; - } - - setLoop(value) { - if (this.hasPlaybackControl === false) { - console.warn('THREE.Audio: this Audio has no playback control.'); - return; - } - - this.loop = value; - - if (this.isPlaying === true) { - this.source.loop = this.loop; - } - - return this; - } - - setLoopStart(value) { - this.loopStart = value; - return this; - } - - setLoopEnd(value) { - this.loopEnd = value; - return this; - } - - getVolume() { - return this.gain.gain.value; - } - - setVolume(value) { - this.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01); - return this; - } - - } - - const _position = /*@__PURE__*/new Vector3(); - - const _quaternion = /*@__PURE__*/new Quaternion(); - - const _scale = /*@__PURE__*/new Vector3(); - - const _orientation = /*@__PURE__*/new Vector3(); - - class PositionalAudio extends Audio { - constructor(listener) { - super(listener); - this.panner = this.context.createPanner(); - this.panner.panningModel = 'HRTF'; - this.panner.connect(this.gain); - } - - getOutput() { - return this.panner; - } - - getRefDistance() { - return this.panner.refDistance; - } - - setRefDistance(value) { - this.panner.refDistance = value; - return this; - } - - getRolloffFactor() { - return this.panner.rolloffFactor; - } - - setRolloffFactor(value) { - this.panner.rolloffFactor = value; - return this; - } - - getDistanceModel() { - return this.panner.distanceModel; - } - - setDistanceModel(value) { - this.panner.distanceModel = value; - return this; - } - - getMaxDistance() { - return this.panner.maxDistance; - } - - setMaxDistance(value) { - this.panner.maxDistance = value; - return this; - } - - setDirectionalCone(coneInnerAngle, coneOuterAngle, coneOuterGain) { - this.panner.coneInnerAngle = coneInnerAngle; - this.panner.coneOuterAngle = coneOuterAngle; - this.panner.coneOuterGain = coneOuterGain; - return this; - } - - updateMatrixWorld(force) { - super.updateMatrixWorld(force); - if (this.hasPlaybackControl === true && this.isPlaying === false) return; - this.matrixWorld.decompose(_position, _quaternion, _scale); - - _orientation.set(0, 0, 1).applyQuaternion(_quaternion); - - const panner = this.panner; - - if (panner.positionX) { - // code path for Chrome and Firefox (see #14393) - const endTime = this.context.currentTime + this.listener.timeDelta; - panner.positionX.linearRampToValueAtTime(_position.x, endTime); - panner.positionY.linearRampToValueAtTime(_position.y, endTime); - panner.positionZ.linearRampToValueAtTime(_position.z, endTime); - panner.orientationX.linearRampToValueAtTime(_orientation.x, endTime); - panner.orientationY.linearRampToValueAtTime(_orientation.y, endTime); - panner.orientationZ.linearRampToValueAtTime(_orientation.z, endTime); - } else { - panner.setPosition(_position.x, _position.y, _position.z); - panner.setOrientation(_orientation.x, _orientation.y, _orientation.z); - } - } - - } - - class AudioAnalyser { - constructor(audio, fftSize = 2048) { - this.analyser = audio.context.createAnalyser(); - this.analyser.fftSize = fftSize; - this.data = new Uint8Array(this.analyser.frequencyBinCount); - audio.getOutput().connect(this.analyser); - } - - getFrequencyData() { - this.analyser.getByteFrequencyData(this.data); - return this.data; - } - - getAverageFrequency() { - let value = 0; - const data = this.getFrequencyData(); - - for (let i = 0; i < data.length; i++) { - value += data[i]; - } - - return value / data.length; - } - - } - - class PropertyMixer { - constructor(binding, typeName, valueSize) { - this.binding = binding; - this.valueSize = valueSize; - let mixFunction, mixFunctionAdditive, setIdentity; // buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ] - // - // interpolators can use .buffer as their .result - // the data then goes to 'incoming' - // - // 'accu0' and 'accu1' are used frame-interleaved for - // the cumulative result and are compared to detect - // changes - // - // 'orig' stores the original state of the property - // - // 'add' is used for additive cumulative results - // - // 'work' is optional and is only present for quaternion types. It is used - // to store intermediate quaternion multiplication results - - switch (typeName) { - case 'quaternion': - mixFunction = this._slerp; - mixFunctionAdditive = this._slerpAdditive; - setIdentity = this._setAdditiveIdentityQuaternion; - this.buffer = new Float64Array(valueSize * 6); - this._workIndex = 5; - break; - - case 'string': - case 'bool': - mixFunction = this._select; // Use the regular mix function and for additive on these types, - // additive is not relevant for non-numeric types - - mixFunctionAdditive = this._select; - setIdentity = this._setAdditiveIdentityOther; - this.buffer = new Array(valueSize * 5); - break; - - default: - mixFunction = this._lerp; - mixFunctionAdditive = this._lerpAdditive; - setIdentity = this._setAdditiveIdentityNumeric; - this.buffer = new Float64Array(valueSize * 5); - } - - this._mixBufferRegion = mixFunction; - this._mixBufferRegionAdditive = mixFunctionAdditive; - this._setIdentity = setIdentity; - this._origIndex = 3; - this._addIndex = 4; - this.cumulativeWeight = 0; - this.cumulativeWeightAdditive = 0; - this.useCount = 0; - this.referenceCount = 0; - } // accumulate data in the 'incoming' region into 'accu' - - - accumulate(accuIndex, weight) { - // note: happily accumulating nothing when weight = 0, the caller knows - // the weight and shouldn't have made the call in the first place - const buffer = this.buffer, - stride = this.valueSize, - offset = accuIndex * stride + stride; - let currentWeight = this.cumulativeWeight; - - if (currentWeight === 0) { - // accuN := incoming * weight - for (let i = 0; i !== stride; ++i) { - buffer[offset + i] = buffer[i]; - } - - currentWeight = weight; - } else { - // accuN := accuN + incoming * weight - currentWeight += weight; - const mix = weight / currentWeight; - - this._mixBufferRegion(buffer, offset, 0, mix, stride); - } - - this.cumulativeWeight = currentWeight; - } // accumulate data in the 'incoming' region into 'add' - - - accumulateAdditive(weight) { - const buffer = this.buffer, - stride = this.valueSize, - offset = stride * this._addIndex; - - if (this.cumulativeWeightAdditive === 0) { - // add = identity - this._setIdentity(); - } // add := add + incoming * weight - - - this._mixBufferRegionAdditive(buffer, offset, 0, weight, stride); - - this.cumulativeWeightAdditive += weight; - } // apply the state of 'accu' to the binding when accus differ - - - apply(accuIndex) { - const stride = this.valueSize, - buffer = this.buffer, - offset = accuIndex * stride + stride, - weight = this.cumulativeWeight, - weightAdditive = this.cumulativeWeightAdditive, - binding = this.binding; - this.cumulativeWeight = 0; - this.cumulativeWeightAdditive = 0; - - if (weight < 1) { - // accuN := accuN + original * ( 1 - cumulativeWeight ) - const originalValueOffset = stride * this._origIndex; - - this._mixBufferRegion(buffer, offset, originalValueOffset, 1 - weight, stride); - } - - if (weightAdditive > 0) { - // accuN := accuN + additive accuN - this._mixBufferRegionAdditive(buffer, offset, this._addIndex * stride, 1, stride); - } - - for (let i = stride, e = stride + stride; i !== e; ++i) { - if (buffer[i] !== buffer[i + stride]) { - // value has changed -> update scene graph - binding.setValue(buffer, offset); - break; - } - } - } // remember the state of the bound property and copy it to both accus - - - saveOriginalState() { - const binding = this.binding; - const buffer = this.buffer, - stride = this.valueSize, - originalValueOffset = stride * this._origIndex; - binding.getValue(buffer, originalValueOffset); // accu[0..1] := orig -- initially detect changes against the original - - for (let i = stride, e = originalValueOffset; i !== e; ++i) { - buffer[i] = buffer[originalValueOffset + i % stride]; - } // Add to identity for additive - - - this._setIdentity(); - - this.cumulativeWeight = 0; - this.cumulativeWeightAdditive = 0; - } // apply the state previously taken via 'saveOriginalState' to the binding - - - restoreOriginalState() { - const originalValueOffset = this.valueSize * 3; - this.binding.setValue(this.buffer, originalValueOffset); - } - - _setAdditiveIdentityNumeric() { - const startIndex = this._addIndex * this.valueSize; - const endIndex = startIndex + this.valueSize; - - for (let i = startIndex; i < endIndex; i++) { - this.buffer[i] = 0; - } - } - - _setAdditiveIdentityQuaternion() { - this._setAdditiveIdentityNumeric(); - - this.buffer[this._addIndex * this.valueSize + 3] = 1; - } - - _setAdditiveIdentityOther() { - const startIndex = this._origIndex * this.valueSize; - const targetIndex = this._addIndex * this.valueSize; - - for (let i = 0; i < this.valueSize; i++) { - this.buffer[targetIndex + i] = this.buffer[startIndex + i]; - } - } // mix functions - - - _select(buffer, dstOffset, srcOffset, t, stride) { - if (t >= 0.5) { - for (let i = 0; i !== stride; ++i) { - buffer[dstOffset + i] = buffer[srcOffset + i]; - } - } - } - - _slerp(buffer, dstOffset, srcOffset, t) { - Quaternion.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t); - } - - _slerpAdditive(buffer, dstOffset, srcOffset, t, stride) { - const workOffset = this._workIndex * stride; // Store result in intermediate buffer offset - - Quaternion.multiplyQuaternionsFlat(buffer, workOffset, buffer, dstOffset, buffer, srcOffset); // Slerp to the intermediate result - - Quaternion.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t); - } - - _lerp(buffer, dstOffset, srcOffset, t, stride) { - const s = 1 - t; - - for (let i = 0; i !== stride; ++i) { - const j = dstOffset + i; - buffer[j] = buffer[j] * s + buffer[srcOffset + i] * t; - } - } - - _lerpAdditive(buffer, dstOffset, srcOffset, t, stride) { - for (let i = 0; i !== stride; ++i) { - const j = dstOffset + i; - buffer[j] = buffer[j] + buffer[srcOffset + i] * t; - } - } - - } - - // Characters [].:/ are reserved for track binding syntax. - const _RESERVED_CHARS_RE = '\\[\\]\\.:\\/'; - - const _reservedRe = new RegExp('[' + _RESERVED_CHARS_RE + ']', 'g'); // Attempts to allow node names from any language. ES5's `\w` regexp matches - // only latin characters, and the unicode \p{L} is not yet supported. So - // instead, we exclude reserved characters and match everything else. - - - const _wordChar = '[^' + _RESERVED_CHARS_RE + ']'; - - const _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace('\\.', '') + ']'; // Parent directories, delimited by '/' or ':'. Currently unused, but must - // be matched to parse the rest of the track name. - - - const _directoryRe = /((?:WC+[\/:])*)/.source.replace('WC', _wordChar); // Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'. - - - const _nodeRe = /(WCOD+)?/.source.replace('WCOD', _wordCharOrDot); // Object on target node, and accessor. May not contain reserved - // characters. Accessor may contain any character except closing bracket. - - - const _objectRe = /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace('WC', _wordChar); // Property and accessor. May not contain reserved characters. Accessor may - // contain any non-bracket characters. - - - const _propertyRe = /\.(WC+)(?:\[(.+)\])?/.source.replace('WC', _wordChar); - - const _trackRe = new RegExp('' + '^' + _directoryRe + _nodeRe + _objectRe + _propertyRe + '$'); - - const _supportedObjectNames = ['material', 'materials', 'bones']; - - class Composite { - constructor(targetGroup, path, optionalParsedPath) { - const parsedPath = optionalParsedPath || PropertyBinding.parseTrackName(path); - this._targetGroup = targetGroup; - this._bindings = targetGroup.subscribe_(path, parsedPath); - } - - getValue(array, offset) { - this.bind(); // bind all binding - - const firstValidIndex = this._targetGroup.nCachedObjects_, - binding = this._bindings[firstValidIndex]; // and only call .getValue on the first - - if (binding !== undefined) binding.getValue(array, offset); - } - - setValue(array, offset) { - const bindings = this._bindings; - - for (let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) { - bindings[i].setValue(array, offset); - } - } - - bind() { - const bindings = this._bindings; - - for (let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) { - bindings[i].bind(); - } - } - - unbind() { - const bindings = this._bindings; - - for (let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) { - bindings[i].unbind(); - } - } - - } // Note: This class uses a State pattern on a per-method basis: - // 'bind' sets 'this.getValue' / 'setValue' and shadows the - // prototype version of these methods with one that represents - // the bound state. When the property is not found, the methods - // become no-ops. - - - class PropertyBinding { - constructor(rootNode, path, parsedPath) { - this.path = path; - this.parsedPath = parsedPath || PropertyBinding.parseTrackName(path); - this.node = PropertyBinding.findNode(rootNode, this.parsedPath.nodeName) || rootNode; - this.rootNode = rootNode; // initial state of these methods that calls 'bind' - - this.getValue = this._getValue_unbound; - this.setValue = this._setValue_unbound; - } - - static create(root, path, parsedPath) { - if (!(root && root.isAnimationObjectGroup)) { - return new PropertyBinding(root, path, parsedPath); - } else { - return new PropertyBinding.Composite(root, path, parsedPath); - } - } - /** - * Replaces spaces with underscores and removes unsupported characters from - * node names, to ensure compatibility with parseTrackName(). - * - * @param {string} name Node name to be sanitized. - * @return {string} - */ - - - static sanitizeNodeName(name) { - return name.replace(/\s/g, '_').replace(_reservedRe, ''); - } - - static parseTrackName(trackName) { - const matches = _trackRe.exec(trackName); - - if (!matches) { - throw new Error('PropertyBinding: Cannot parse trackName: ' + trackName); - } - - const results = { - // directoryName: matches[ 1 ], // (tschw) currently unused - nodeName: matches[2], - objectName: matches[3], - objectIndex: matches[4], - propertyName: matches[5], - // required - propertyIndex: matches[6] - }; - const lastDot = results.nodeName && results.nodeName.lastIndexOf('.'); - - if (lastDot !== undefined && lastDot !== -1) { - const objectName = results.nodeName.substring(lastDot + 1); // Object names must be checked against an allowlist. Otherwise, there - // is no way to parse 'foo.bar.baz': 'baz' must be a property, but - // 'bar' could be the objectName, or part of a nodeName (which can - // include '.' characters). - - if (_supportedObjectNames.indexOf(objectName) !== -1) { - results.nodeName = results.nodeName.substring(0, lastDot); - results.objectName = objectName; - } - } - - if (results.propertyName === null || results.propertyName.length === 0) { - throw new Error('PropertyBinding: can not parse propertyName from trackName: ' + trackName); - } - - return results; - } - - static findNode(root, nodeName) { - if (!nodeName || nodeName === '' || nodeName === '.' || nodeName === -1 || nodeName === root.name || nodeName === root.uuid) { - return root; - } // search into skeleton bones. - - - if (root.skeleton) { - const bone = root.skeleton.getBoneByName(nodeName); - - if (bone !== undefined) { - return bone; - } - } // search into node subtree. - - - if (root.children) { - const searchNodeSubtree = function (children) { - for (let i = 0; i < children.length; i++) { - const childNode = children[i]; - - if (childNode.name === nodeName || childNode.uuid === nodeName) { - return childNode; - } - - const result = searchNodeSubtree(childNode.children); - if (result) return result; - } - - return null; - }; - - const subTreeNode = searchNodeSubtree(root.children); - - if (subTreeNode) { - return subTreeNode; - } - } - - return null; - } // these are used to "bind" a nonexistent property - - - _getValue_unavailable() {} - - _setValue_unavailable() {} // Getters - - - _getValue_direct(buffer, offset) { - buffer[offset] = this.node[this.propertyName]; - } - - _getValue_array(buffer, offset) { - const source = this.resolvedProperty; - - for (let i = 0, n = source.length; i !== n; ++i) { - buffer[offset++] = source[i]; - } - } - - _getValue_arrayElement(buffer, offset) { - buffer[offset] = this.resolvedProperty[this.propertyIndex]; - } - - _getValue_toArray(buffer, offset) { - this.resolvedProperty.toArray(buffer, offset); - } // Direct - - - _setValue_direct(buffer, offset) { - this.targetObject[this.propertyName] = buffer[offset]; - } - - _setValue_direct_setNeedsUpdate(buffer, offset) { - this.targetObject[this.propertyName] = buffer[offset]; - this.targetObject.needsUpdate = true; - } - - _setValue_direct_setMatrixWorldNeedsUpdate(buffer, offset) { - this.targetObject[this.propertyName] = buffer[offset]; - this.targetObject.matrixWorldNeedsUpdate = true; - } // EntireArray - - - _setValue_array(buffer, offset) { - const dest = this.resolvedProperty; - - for (let i = 0, n = dest.length; i !== n; ++i) { - dest[i] = buffer[offset++]; - } - } - - _setValue_array_setNeedsUpdate(buffer, offset) { - const dest = this.resolvedProperty; - - for (let i = 0, n = dest.length; i !== n; ++i) { - dest[i] = buffer[offset++]; - } - - this.targetObject.needsUpdate = true; - } - - _setValue_array_setMatrixWorldNeedsUpdate(buffer, offset) { - const dest = this.resolvedProperty; - - for (let i = 0, n = dest.length; i !== n; ++i) { - dest[i] = buffer[offset++]; - } - - this.targetObject.matrixWorldNeedsUpdate = true; - } // ArrayElement - - - _setValue_arrayElement(buffer, offset) { - this.resolvedProperty[this.propertyIndex] = buffer[offset]; - } - - _setValue_arrayElement_setNeedsUpdate(buffer, offset) { - this.resolvedProperty[this.propertyIndex] = buffer[offset]; - this.targetObject.needsUpdate = true; - } - - _setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer, offset) { - this.resolvedProperty[this.propertyIndex] = buffer[offset]; - this.targetObject.matrixWorldNeedsUpdate = true; - } // HasToFromArray - - - _setValue_fromArray(buffer, offset) { - this.resolvedProperty.fromArray(buffer, offset); - } - - _setValue_fromArray_setNeedsUpdate(buffer, offset) { - this.resolvedProperty.fromArray(buffer, offset); - this.targetObject.needsUpdate = true; - } - - _setValue_fromArray_setMatrixWorldNeedsUpdate(buffer, offset) { - this.resolvedProperty.fromArray(buffer, offset); - this.targetObject.matrixWorldNeedsUpdate = true; - } - - _getValue_unbound(targetArray, offset) { - this.bind(); - this.getValue(targetArray, offset); - } - - _setValue_unbound(sourceArray, offset) { - this.bind(); - this.setValue(sourceArray, offset); - } // create getter / setter pair for a property in the scene graph - - - bind() { - let targetObject = this.node; - const parsedPath = this.parsedPath; - const objectName = parsedPath.objectName; - const propertyName = parsedPath.propertyName; - let propertyIndex = parsedPath.propertyIndex; - - if (!targetObject) { - targetObject = PropertyBinding.findNode(this.rootNode, parsedPath.nodeName) || this.rootNode; - this.node = targetObject; - } // set fail state so we can just 'return' on error - - - this.getValue = this._getValue_unavailable; - this.setValue = this._setValue_unavailable; // ensure there is a value node - - if (!targetObject) { - console.error('THREE.PropertyBinding: Trying to update node for track: ' + this.path + ' but it wasn\'t found.'); - return; - } - - if (objectName) { - let objectIndex = parsedPath.objectIndex; // special cases were we need to reach deeper into the hierarchy to get the face materials.... - - switch (objectName) { - case 'materials': - if (!targetObject.material) { - console.error('THREE.PropertyBinding: Can not bind to material as node does not have a material.', this); - return; - } - - if (!targetObject.material.materials) { - console.error('THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this); - return; - } - - targetObject = targetObject.material.materials; - break; - - case 'bones': - if (!targetObject.skeleton) { - console.error('THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this); - return; - } // potential future optimization: skip this if propertyIndex is already an integer - // and convert the integer string to a true integer. - - - targetObject = targetObject.skeleton.bones; // support resolving morphTarget names into indices. - - for (let i = 0; i < targetObject.length; i++) { - if (targetObject[i].name === objectIndex) { - objectIndex = i; - break; - } - } - - break; - - default: - if (targetObject[objectName] === undefined) { - console.error('THREE.PropertyBinding: Can not bind to objectName of node undefined.', this); - return; - } - - targetObject = targetObject[objectName]; - } - - if (objectIndex !== undefined) { - if (targetObject[objectIndex] === undefined) { - console.error('THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject); - return; - } - - targetObject = targetObject[objectIndex]; - } - } // resolve property - - - const nodeProperty = targetObject[propertyName]; - - if (nodeProperty === undefined) { - const nodeName = parsedPath.nodeName; - console.error('THREE.PropertyBinding: Trying to update property for track: ' + nodeName + '.' + propertyName + ' but it wasn\'t found.', targetObject); - return; - } // determine versioning scheme - - - let versioning = this.Versioning.None; - this.targetObject = targetObject; - - if (targetObject.needsUpdate !== undefined) { - // material - versioning = this.Versioning.NeedsUpdate; - } else if (targetObject.matrixWorldNeedsUpdate !== undefined) { - // node transform - versioning = this.Versioning.MatrixWorldNeedsUpdate; - } // determine how the property gets bound - - - let bindingType = this.BindingType.Direct; - - if (propertyIndex !== undefined) { - // access a sub element of the property array (only primitives are supported right now) - if (propertyName === 'morphTargetInfluences') { - // potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer. - // support resolving morphTarget names into indices. - if (!targetObject.geometry) { - console.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this); - return; - } - - if (targetObject.geometry.isBufferGeometry) { - if (!targetObject.geometry.morphAttributes) { - console.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this); - return; - } - - if (targetObject.morphTargetDictionary[propertyIndex] !== undefined) { - propertyIndex = targetObject.morphTargetDictionary[propertyIndex]; - } - } else { - console.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.', this); - return; - } - } - - bindingType = this.BindingType.ArrayElement; - this.resolvedProperty = nodeProperty; - this.propertyIndex = propertyIndex; - } else if (nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined) { - // must use copy for Object3D.Euler/Quaternion - bindingType = this.BindingType.HasFromToArray; - this.resolvedProperty = nodeProperty; - } else if (Array.isArray(nodeProperty)) { - bindingType = this.BindingType.EntireArray; - this.resolvedProperty = nodeProperty; - } else { - this.propertyName = propertyName; - } // select getter / setter - - - this.getValue = this.GetterByBindingType[bindingType]; - this.setValue = this.SetterByBindingTypeAndVersioning[bindingType][versioning]; - } - - unbind() { - this.node = null; // back to the prototype version of getValue / setValue - // note: avoiding to mutate the shape of 'this' via 'delete' - - this.getValue = this._getValue_unbound; - this.setValue = this._setValue_unbound; - } - - } - - PropertyBinding.Composite = Composite; - PropertyBinding.prototype.BindingType = { - Direct: 0, - EntireArray: 1, - ArrayElement: 2, - HasFromToArray: 3 - }; - PropertyBinding.prototype.Versioning = { - None: 0, - NeedsUpdate: 1, - MatrixWorldNeedsUpdate: 2 - }; - PropertyBinding.prototype.GetterByBindingType = [PropertyBinding.prototype._getValue_direct, PropertyBinding.prototype._getValue_array, PropertyBinding.prototype._getValue_arrayElement, PropertyBinding.prototype._getValue_toArray]; - PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [[// Direct - PropertyBinding.prototype._setValue_direct, PropertyBinding.prototype._setValue_direct_setNeedsUpdate, PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate], [// EntireArray - PropertyBinding.prototype._setValue_array, PropertyBinding.prototype._setValue_array_setNeedsUpdate, PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate], [// ArrayElement - PropertyBinding.prototype._setValue_arrayElement, PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate, PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate], [// HasToFromArray - PropertyBinding.prototype._setValue_fromArray, PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate, PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]]; - - /** - * - * A group of objects that receives a shared animation state. - * - * Usage: - * - * - Add objects you would otherwise pass as 'root' to the - * constructor or the .clipAction method of AnimationMixer. - * - * - Instead pass this object as 'root'. - * - * - You can also add and remove objects later when the mixer - * is running. - * - * Note: - * - * Objects of this class appear as one object to the mixer, - * so cache control of the individual objects must be done - * on the group. - * - * Limitation: - * - * - The animated properties must be compatible among the - * all objects in the group. - * - * - A single property can either be controlled through a - * target group or directly, but not both. - */ - - class AnimationObjectGroup { - constructor() { - this.uuid = generateUUID(); // cached objects followed by the active ones - - this._objects = Array.prototype.slice.call(arguments); - this.nCachedObjects_ = 0; // threshold - // note: read by PropertyBinding.Composite - - const indices = {}; - this._indicesByUUID = indices; // for bookkeeping - - for (let i = 0, n = arguments.length; i !== n; ++i) { - indices[arguments[i].uuid] = i; - } - - this._paths = []; // inside: string - - this._parsedPaths = []; // inside: { we don't care, here } - - this._bindings = []; // inside: Array< PropertyBinding > - - this._bindingsIndicesByPath = {}; // inside: indices in these arrays - - const scope = this; - this.stats = { - objects: { - get total() { - return scope._objects.length; - }, - - get inUse() { - return this.total - scope.nCachedObjects_; - } - - }, - - get bindingsPerObject() { - return scope._bindings.length; - } - - }; - } - - add() { - const objects = this._objects, - indicesByUUID = this._indicesByUUID, - paths = this._paths, - parsedPaths = this._parsedPaths, - bindings = this._bindings, - nBindings = bindings.length; - let knownObject = undefined, - nObjects = objects.length, - nCachedObjects = this.nCachedObjects_; - - for (let i = 0, n = arguments.length; i !== n; ++i) { - const object = arguments[i], - uuid = object.uuid; - let index = indicesByUUID[uuid]; - - if (index === undefined) { - // unknown object -> add it to the ACTIVE region - index = nObjects++; - indicesByUUID[uuid] = index; - objects.push(object); // accounting is done, now do the same for all bindings - - for (let j = 0, m = nBindings; j !== m; ++j) { - bindings[j].push(new PropertyBinding(object, paths[j], parsedPaths[j])); - } - } else if (index < nCachedObjects) { - knownObject = objects[index]; // move existing object to the ACTIVE region - - const firstActiveIndex = --nCachedObjects, - lastCachedObject = objects[firstActiveIndex]; - indicesByUUID[lastCachedObject.uuid] = index; - objects[index] = lastCachedObject; - indicesByUUID[uuid] = firstActiveIndex; - objects[firstActiveIndex] = object; // accounting is done, now do the same for all bindings - - for (let j = 0, m = nBindings; j !== m; ++j) { - const bindingsForPath = bindings[j], - lastCached = bindingsForPath[firstActiveIndex]; - let binding = bindingsForPath[index]; - bindingsForPath[index] = lastCached; - - if (binding === undefined) { - // since we do not bother to create new bindings - // for objects that are cached, the binding may - // or may not exist - binding = new PropertyBinding(object, paths[j], parsedPaths[j]); - } - - bindingsForPath[firstActiveIndex] = binding; - } - } else if (objects[index] !== knownObject) { - console.error('THREE.AnimationObjectGroup: Different objects with the same UUID ' + 'detected. Clean the caches or recreate your infrastructure when reloading scenes.'); - } // else the object is already where we want it to be - - } // for arguments - - - this.nCachedObjects_ = nCachedObjects; - } - - remove() { - const objects = this._objects, - indicesByUUID = this._indicesByUUID, - bindings = this._bindings, - nBindings = bindings.length; - let nCachedObjects = this.nCachedObjects_; - - for (let i = 0, n = arguments.length; i !== n; ++i) { - const object = arguments[i], - uuid = object.uuid, - index = indicesByUUID[uuid]; - - if (index !== undefined && index >= nCachedObjects) { - // move existing object into the CACHED region - const lastCachedIndex = nCachedObjects++, - firstActiveObject = objects[lastCachedIndex]; - indicesByUUID[firstActiveObject.uuid] = index; - objects[index] = firstActiveObject; - indicesByUUID[uuid] = lastCachedIndex; - objects[lastCachedIndex] = object; // accounting is done, now do the same for all bindings - - for (let j = 0, m = nBindings; j !== m; ++j) { - const bindingsForPath = bindings[j], - firstActive = bindingsForPath[lastCachedIndex], - binding = bindingsForPath[index]; - bindingsForPath[index] = firstActive; - bindingsForPath[lastCachedIndex] = binding; - } - } - } // for arguments - - - this.nCachedObjects_ = nCachedObjects; - } // remove & forget - - - uncache() { - const objects = this._objects, - indicesByUUID = this._indicesByUUID, - bindings = this._bindings, - nBindings = bindings.length; - let nCachedObjects = this.nCachedObjects_, - nObjects = objects.length; - - for (let i = 0, n = arguments.length; i !== n; ++i) { - const object = arguments[i], - uuid = object.uuid, - index = indicesByUUID[uuid]; - - if (index !== undefined) { - delete indicesByUUID[uuid]; - - if (index < nCachedObjects) { - // object is cached, shrink the CACHED region - const firstActiveIndex = --nCachedObjects, - lastCachedObject = objects[firstActiveIndex], - lastIndex = --nObjects, - lastObject = objects[lastIndex]; // last cached object takes this object's place - - indicesByUUID[lastCachedObject.uuid] = index; - objects[index] = lastCachedObject; // last object goes to the activated slot and pop - - indicesByUUID[lastObject.uuid] = firstActiveIndex; - objects[firstActiveIndex] = lastObject; - objects.pop(); // accounting is done, now do the same for all bindings - - for (let j = 0, m = nBindings; j !== m; ++j) { - const bindingsForPath = bindings[j], - lastCached = bindingsForPath[firstActiveIndex], - last = bindingsForPath[lastIndex]; - bindingsForPath[index] = lastCached; - bindingsForPath[firstActiveIndex] = last; - bindingsForPath.pop(); - } - } else { - // object is active, just swap with the last and pop - const lastIndex = --nObjects, - lastObject = objects[lastIndex]; - - if (lastIndex > 0) { - indicesByUUID[lastObject.uuid] = index; - } - - objects[index] = lastObject; - objects.pop(); // accounting is done, now do the same for all bindings - - for (let j = 0, m = nBindings; j !== m; ++j) { - const bindingsForPath = bindings[j]; - bindingsForPath[index] = bindingsForPath[lastIndex]; - bindingsForPath.pop(); - } - } // cached or active - - } // if object is known - - } // for arguments - - - this.nCachedObjects_ = nCachedObjects; - } // Internal interface used by befriended PropertyBinding.Composite: - - - subscribe_(path, parsedPath) { - // returns an array of bindings for the given path that is changed - // according to the contained objects in the group - const indicesByPath = this._bindingsIndicesByPath; - let index = indicesByPath[path]; - const bindings = this._bindings; - if (index !== undefined) return bindings[index]; - const paths = this._paths, - parsedPaths = this._parsedPaths, - objects = this._objects, - nObjects = objects.length, - nCachedObjects = this.nCachedObjects_, - bindingsForPath = new Array(nObjects); - index = bindings.length; - indicesByPath[path] = index; - paths.push(path); - parsedPaths.push(parsedPath); - bindings.push(bindingsForPath); - - for (let i = nCachedObjects, n = objects.length; i !== n; ++i) { - const object = objects[i]; - bindingsForPath[i] = new PropertyBinding(object, path, parsedPath); - } - - return bindingsForPath; - } - - unsubscribe_(path) { - // tells the group to forget about a property path and no longer - // update the array previously obtained with 'subscribe_' - const indicesByPath = this._bindingsIndicesByPath, - index = indicesByPath[path]; - - if (index !== undefined) { - const paths = this._paths, - parsedPaths = this._parsedPaths, - bindings = this._bindings, - lastBindingsIndex = bindings.length - 1, - lastBindings = bindings[lastBindingsIndex], - lastBindingsPath = path[lastBindingsIndex]; - indicesByPath[lastBindingsPath] = index; - bindings[index] = lastBindings; - bindings.pop(); - parsedPaths[index] = parsedPaths[lastBindingsIndex]; - parsedPaths.pop(); - paths[index] = paths[lastBindingsIndex]; - paths.pop(); - } - } - - } - - AnimationObjectGroup.prototype.isAnimationObjectGroup = true; - - class AnimationAction { - constructor(mixer, clip, localRoot = null, blendMode = clip.blendMode) { - this._mixer = mixer; - this._clip = clip; - this._localRoot = localRoot; - this.blendMode = blendMode; - const tracks = clip.tracks, - nTracks = tracks.length, - interpolants = new Array(nTracks); - const interpolantSettings = { - endingStart: ZeroCurvatureEnding, - endingEnd: ZeroCurvatureEnding - }; - - for (let i = 0; i !== nTracks; ++i) { - const interpolant = tracks[i].createInterpolant(null); - interpolants[i] = interpolant; - interpolant.settings = interpolantSettings; - } - - this._interpolantSettings = interpolantSettings; - this._interpolants = interpolants; // bound by the mixer - // inside: PropertyMixer (managed by the mixer) - - this._propertyBindings = new Array(nTracks); - this._cacheIndex = null; // for the memory manager - - this._byClipCacheIndex = null; // for the memory manager - - this._timeScaleInterpolant = null; - this._weightInterpolant = null; - this.loop = LoopRepeat; - this._loopCount = -1; // global mixer time when the action is to be started - // it's set back to 'null' upon start of the action - - this._startTime = null; // scaled local time of the action - // gets clamped or wrapped to 0..clip.duration according to loop - - this.time = 0; - this.timeScale = 1; - this._effectiveTimeScale = 1; - this.weight = 1; - this._effectiveWeight = 1; - this.repetitions = Infinity; // no. of repetitions when looping - - this.paused = false; // true -> zero effective time scale - - this.enabled = true; // false -> zero effective weight - - this.clampWhenFinished = false; // keep feeding the last frame? - - this.zeroSlopeAtStart = true; // for smooth interpolation w/o separate - - this.zeroSlopeAtEnd = true; // clips for start, loop and end - } // State & Scheduling - - - play() { - this._mixer._activateAction(this); - - return this; - } - - stop() { - this._mixer._deactivateAction(this); - - return this.reset(); - } - - reset() { - this.paused = false; - this.enabled = true; - this.time = 0; // restart clip - - this._loopCount = -1; // forget previous loops - - this._startTime = null; // forget scheduling - - return this.stopFading().stopWarping(); - } - - isRunning() { - return this.enabled && !this.paused && this.timeScale !== 0 && this._startTime === null && this._mixer._isActiveAction(this); - } // return true when play has been called - - - isScheduled() { - return this._mixer._isActiveAction(this); - } - - startAt(time) { - this._startTime = time; - return this; - } - - setLoop(mode, repetitions) { - this.loop = mode; - this.repetitions = repetitions; - return this; - } // Weight - // set the weight stopping any scheduled fading - // although .enabled = false yields an effective weight of zero, this - // method does *not* change .enabled, because it would be confusing - - - setEffectiveWeight(weight) { - this.weight = weight; // note: same logic as when updated at runtime - - this._effectiveWeight = this.enabled ? weight : 0; - return this.stopFading(); - } // return the weight considering fading and .enabled - - - getEffectiveWeight() { - return this._effectiveWeight; - } - - fadeIn(duration) { - return this._scheduleFading(duration, 0, 1); - } - - fadeOut(duration) { - return this._scheduleFading(duration, 1, 0); - } - - crossFadeFrom(fadeOutAction, duration, warp) { - fadeOutAction.fadeOut(duration); - this.fadeIn(duration); - - if (warp) { - const fadeInDuration = this._clip.duration, - fadeOutDuration = fadeOutAction._clip.duration, - startEndRatio = fadeOutDuration / fadeInDuration, - endStartRatio = fadeInDuration / fadeOutDuration; - fadeOutAction.warp(1.0, startEndRatio, duration); - this.warp(endStartRatio, 1.0, duration); - } - - return this; - } - - crossFadeTo(fadeInAction, duration, warp) { - return fadeInAction.crossFadeFrom(this, duration, warp); - } - - stopFading() { - const weightInterpolant = this._weightInterpolant; - - if (weightInterpolant !== null) { - this._weightInterpolant = null; - - this._mixer._takeBackControlInterpolant(weightInterpolant); - } - - return this; - } // Time Scale Control - // set the time scale stopping any scheduled warping - // although .paused = true yields an effective time scale of zero, this - // method does *not* change .paused, because it would be confusing - - - setEffectiveTimeScale(timeScale) { - this.timeScale = timeScale; - this._effectiveTimeScale = this.paused ? 0 : timeScale; - return this.stopWarping(); - } // return the time scale considering warping and .paused - - - getEffectiveTimeScale() { - return this._effectiveTimeScale; - } - - setDuration(duration) { - this.timeScale = this._clip.duration / duration; - return this.stopWarping(); - } - - syncWith(action) { - this.time = action.time; - this.timeScale = action.timeScale; - return this.stopWarping(); - } - - halt(duration) { - return this.warp(this._effectiveTimeScale, 0, duration); - } - - warp(startTimeScale, endTimeScale, duration) { - const mixer = this._mixer, - now = mixer.time, - timeScale = this.timeScale; - let interpolant = this._timeScaleInterpolant; - - if (interpolant === null) { - interpolant = mixer._lendControlInterpolant(); - this._timeScaleInterpolant = interpolant; - } - - const times = interpolant.parameterPositions, - values = interpolant.sampleValues; - times[0] = now; - times[1] = now + duration; - values[0] = startTimeScale / timeScale; - values[1] = endTimeScale / timeScale; - return this; - } - - stopWarping() { - const timeScaleInterpolant = this._timeScaleInterpolant; - - if (timeScaleInterpolant !== null) { - this._timeScaleInterpolant = null; - - this._mixer._takeBackControlInterpolant(timeScaleInterpolant); - } - - return this; - } // Object Accessors - - - getMixer() { - return this._mixer; - } - - getClip() { - return this._clip; - } - - getRoot() { - return this._localRoot || this._mixer._root; - } // Interna - - - _update(time, deltaTime, timeDirection, accuIndex) { - // called by the mixer - if (!this.enabled) { - // call ._updateWeight() to update ._effectiveWeight - this._updateWeight(time); - - return; - } - - const startTime = this._startTime; - - if (startTime !== null) { - // check for scheduled start of action - const timeRunning = (time - startTime) * timeDirection; - - if (timeRunning < 0 || timeDirection === 0) { - return; // yet to come / don't decide when delta = 0 - } // start - - - this._startTime = null; // unschedule - - deltaTime = timeDirection * timeRunning; - } // apply time scale and advance time - - - deltaTime *= this._updateTimeScale(time); - - const clipTime = this._updateTime(deltaTime); // note: _updateTime may disable the action resulting in - // an effective weight of 0 - - - const weight = this._updateWeight(time); - - if (weight > 0) { - const interpolants = this._interpolants; - const propertyMixers = this._propertyBindings; - - switch (this.blendMode) { - case AdditiveAnimationBlendMode: - for (let j = 0, m = interpolants.length; j !== m; ++j) { - interpolants[j].evaluate(clipTime); - propertyMixers[j].accumulateAdditive(weight); - } - - break; - - case NormalAnimationBlendMode: - default: - for (let j = 0, m = interpolants.length; j !== m; ++j) { - interpolants[j].evaluate(clipTime); - propertyMixers[j].accumulate(accuIndex, weight); - } - - } - } - } - - _updateWeight(time) { - let weight = 0; - - if (this.enabled) { - weight = this.weight; - const interpolant = this._weightInterpolant; - - if (interpolant !== null) { - const interpolantValue = interpolant.evaluate(time)[0]; - weight *= interpolantValue; - - if (time > interpolant.parameterPositions[1]) { - this.stopFading(); - - if (interpolantValue === 0) { - // faded out, disable - this.enabled = false; - } - } - } - } - - this._effectiveWeight = weight; - return weight; - } - - _updateTimeScale(time) { - let timeScale = 0; - - if (!this.paused) { - timeScale = this.timeScale; - const interpolant = this._timeScaleInterpolant; - - if (interpolant !== null) { - const interpolantValue = interpolant.evaluate(time)[0]; - timeScale *= interpolantValue; - - if (time > interpolant.parameterPositions[1]) { - this.stopWarping(); - - if (timeScale === 0) { - // motion has halted, pause - this.paused = true; - } else { - // warp done - apply final time scale - this.timeScale = timeScale; - } - } - } - } - - this._effectiveTimeScale = timeScale; - return timeScale; - } - - _updateTime(deltaTime) { - const duration = this._clip.duration; - const loop = this.loop; - let time = this.time + deltaTime; - let loopCount = this._loopCount; - const pingPong = loop === LoopPingPong; - - if (deltaTime === 0) { - if (loopCount === -1) return time; - return pingPong && (loopCount & 1) === 1 ? duration - time : time; - } - - if (loop === LoopOnce) { - if (loopCount === -1) { - // just started - this._loopCount = 0; - - this._setEndings(true, true, false); - } - - handle_stop: { - if (time >= duration) { - time = duration; - } else if (time < 0) { - time = 0; - } else { - this.time = time; - break handle_stop; - } - - if (this.clampWhenFinished) this.paused = true;else this.enabled = false; - this.time = time; - - this._mixer.dispatchEvent({ - type: 'finished', - action: this, - direction: deltaTime < 0 ? -1 : 1 - }); - } - } else { - // repetitive Repeat or PingPong - if (loopCount === -1) { - // just started - if (deltaTime >= 0) { - loopCount = 0; - - this._setEndings(true, this.repetitions === 0, pingPong); - } else { - // when looping in reverse direction, the initial - // transition through zero counts as a repetition, - // so leave loopCount at -1 - this._setEndings(this.repetitions === 0, true, pingPong); - } - } - - if (time >= duration || time < 0) { - // wrap around - const loopDelta = Math.floor(time / duration); // signed - - time -= duration * loopDelta; - loopCount += Math.abs(loopDelta); - const pending = this.repetitions - loopCount; - - if (pending <= 0) { - // have to stop (switch state, clamp time, fire event) - if (this.clampWhenFinished) this.paused = true;else this.enabled = false; - time = deltaTime > 0 ? duration : 0; - this.time = time; - - this._mixer.dispatchEvent({ - type: 'finished', - action: this, - direction: deltaTime > 0 ? 1 : -1 - }); - } else { - // keep running - if (pending === 1) { - // entering the last round - const atStart = deltaTime < 0; - - this._setEndings(atStart, !atStart, pingPong); - } else { - this._setEndings(false, false, pingPong); - } - - this._loopCount = loopCount; - this.time = time; - - this._mixer.dispatchEvent({ - type: 'loop', - action: this, - loopDelta: loopDelta - }); - } - } else { - this.time = time; - } - - if (pingPong && (loopCount & 1) === 1) { - // invert time for the "pong round" - return duration - time; - } - } - - return time; - } - - _setEndings(atStart, atEnd, pingPong) { - const settings = this._interpolantSettings; - - if (pingPong) { - settings.endingStart = ZeroSlopeEnding; - settings.endingEnd = ZeroSlopeEnding; - } else { - // assuming for LoopOnce atStart == atEnd == true - if (atStart) { - settings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding; - } else { - settings.endingStart = WrapAroundEnding; - } - - if (atEnd) { - settings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding; - } else { - settings.endingEnd = WrapAroundEnding; - } - } - } - - _scheduleFading(duration, weightNow, weightThen) { - const mixer = this._mixer, - now = mixer.time; - let interpolant = this._weightInterpolant; - - if (interpolant === null) { - interpolant = mixer._lendControlInterpolant(); - this._weightInterpolant = interpolant; - } - - const times = interpolant.parameterPositions, - values = interpolant.sampleValues; - times[0] = now; - values[0] = weightNow; - times[1] = now + duration; - values[1] = weightThen; - return this; - } - - } - - class AnimationMixer extends EventDispatcher { - constructor(root) { - super(); - this._root = root; - - this._initMemoryManager(); - - this._accuIndex = 0; - this.time = 0; - this.timeScale = 1.0; - } - - _bindAction(action, prototypeAction) { - const root = action._localRoot || this._root, - tracks = action._clip.tracks, - nTracks = tracks.length, - bindings = action._propertyBindings, - interpolants = action._interpolants, - rootUuid = root.uuid, - bindingsByRoot = this._bindingsByRootAndName; - let bindingsByName = bindingsByRoot[rootUuid]; - - if (bindingsByName === undefined) { - bindingsByName = {}; - bindingsByRoot[rootUuid] = bindingsByName; - } - - for (let i = 0; i !== nTracks; ++i) { - const track = tracks[i], - trackName = track.name; - let binding = bindingsByName[trackName]; - - if (binding !== undefined) { - bindings[i] = binding; - } else { - binding = bindings[i]; - - if (binding !== undefined) { - // existing binding, make sure the cache knows - if (binding._cacheIndex === null) { - ++binding.referenceCount; - - this._addInactiveBinding(binding, rootUuid, trackName); - } - - continue; - } - - const path = prototypeAction && prototypeAction._propertyBindings[i].binding.parsedPath; - binding = new PropertyMixer(PropertyBinding.create(root, trackName, path), track.ValueTypeName, track.getValueSize()); - ++binding.referenceCount; - - this._addInactiveBinding(binding, rootUuid, trackName); - - bindings[i] = binding; - } - - interpolants[i].resultBuffer = binding.buffer; - } - } - - _activateAction(action) { - if (!this._isActiveAction(action)) { - if (action._cacheIndex === null) { - // this action has been forgotten by the cache, but the user - // appears to be still using it -> rebind - const rootUuid = (action._localRoot || this._root).uuid, - clipUuid = action._clip.uuid, - actionsForClip = this._actionsByClip[clipUuid]; - - this._bindAction(action, actionsForClip && actionsForClip.knownActions[0]); - - this._addInactiveAction(action, clipUuid, rootUuid); - } - - const bindings = action._propertyBindings; // increment reference counts / sort out state - - for (let i = 0, n = bindings.length; i !== n; ++i) { - const binding = bindings[i]; - - if (binding.useCount++ === 0) { - this._lendBinding(binding); - - binding.saveOriginalState(); - } - } - - this._lendAction(action); - } - } - - _deactivateAction(action) { - if (this._isActiveAction(action)) { - const bindings = action._propertyBindings; // decrement reference counts / sort out state - - for (let i = 0, n = bindings.length; i !== n; ++i) { - const binding = bindings[i]; - - if (--binding.useCount === 0) { - binding.restoreOriginalState(); - - this._takeBackBinding(binding); - } - } - - this._takeBackAction(action); - } - } // Memory manager - - - _initMemoryManager() { - this._actions = []; // 'nActiveActions' followed by inactive ones - - this._nActiveActions = 0; - this._actionsByClip = {}; // inside: - // { - // knownActions: Array< AnimationAction > - used as prototypes - // actionByRoot: AnimationAction - lookup - // } - - this._bindings = []; // 'nActiveBindings' followed by inactive ones - - this._nActiveBindings = 0; - this._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer > - - this._controlInterpolants = []; // same game as above - - this._nActiveControlInterpolants = 0; - const scope = this; - this.stats = { - actions: { - get total() { - return scope._actions.length; - }, - - get inUse() { - return scope._nActiveActions; - } - - }, - bindings: { - get total() { - return scope._bindings.length; - }, - - get inUse() { - return scope._nActiveBindings; - } - - }, - controlInterpolants: { - get total() { - return scope._controlInterpolants.length; - }, - - get inUse() { - return scope._nActiveControlInterpolants; - } - - } - }; - } // Memory management for AnimationAction objects - - - _isActiveAction(action) { - const index = action._cacheIndex; - return index !== null && index < this._nActiveActions; - } - - _addInactiveAction(action, clipUuid, rootUuid) { - const actions = this._actions, - actionsByClip = this._actionsByClip; - let actionsForClip = actionsByClip[clipUuid]; - - if (actionsForClip === undefined) { - actionsForClip = { - knownActions: [action], - actionByRoot: {} - }; - action._byClipCacheIndex = 0; - actionsByClip[clipUuid] = actionsForClip; - } else { - const knownActions = actionsForClip.knownActions; - action._byClipCacheIndex = knownActions.length; - knownActions.push(action); - } - - action._cacheIndex = actions.length; - actions.push(action); - actionsForClip.actionByRoot[rootUuid] = action; - } - - _removeInactiveAction(action) { - const actions = this._actions, - lastInactiveAction = actions[actions.length - 1], - cacheIndex = action._cacheIndex; - lastInactiveAction._cacheIndex = cacheIndex; - actions[cacheIndex] = lastInactiveAction; - actions.pop(); - action._cacheIndex = null; - const clipUuid = action._clip.uuid, - actionsByClip = this._actionsByClip, - actionsForClip = actionsByClip[clipUuid], - knownActionsForClip = actionsForClip.knownActions, - lastKnownAction = knownActionsForClip[knownActionsForClip.length - 1], - byClipCacheIndex = action._byClipCacheIndex; - lastKnownAction._byClipCacheIndex = byClipCacheIndex; - knownActionsForClip[byClipCacheIndex] = lastKnownAction; - knownActionsForClip.pop(); - action._byClipCacheIndex = null; - const actionByRoot = actionsForClip.actionByRoot, - rootUuid = (action._localRoot || this._root).uuid; - delete actionByRoot[rootUuid]; - - if (knownActionsForClip.length === 0) { - delete actionsByClip[clipUuid]; - } - - this._removeInactiveBindingsForAction(action); - } - - _removeInactiveBindingsForAction(action) { - const bindings = action._propertyBindings; - - for (let i = 0, n = bindings.length; i !== n; ++i) { - const binding = bindings[i]; - - if (--binding.referenceCount === 0) { - this._removeInactiveBinding(binding); - } - } - } - - _lendAction(action) { - // [ active actions | inactive actions ] - // [ active actions >| inactive actions ] - // s a - // <-swap-> - // a s - const actions = this._actions, - prevIndex = action._cacheIndex, - lastActiveIndex = this._nActiveActions++, - firstInactiveAction = actions[lastActiveIndex]; - action._cacheIndex = lastActiveIndex; - actions[lastActiveIndex] = action; - firstInactiveAction._cacheIndex = prevIndex; - actions[prevIndex] = firstInactiveAction; - } - - _takeBackAction(action) { - // [ active actions | inactive actions ] - // [ active actions |< inactive actions ] - // a s - // <-swap-> - // s a - const actions = this._actions, - prevIndex = action._cacheIndex, - firstInactiveIndex = --this._nActiveActions, - lastActiveAction = actions[firstInactiveIndex]; - action._cacheIndex = firstInactiveIndex; - actions[firstInactiveIndex] = action; - lastActiveAction._cacheIndex = prevIndex; - actions[prevIndex] = lastActiveAction; - } // Memory management for PropertyMixer objects - - - _addInactiveBinding(binding, rootUuid, trackName) { - const bindingsByRoot = this._bindingsByRootAndName, - bindings = this._bindings; - let bindingByName = bindingsByRoot[rootUuid]; - - if (bindingByName === undefined) { - bindingByName = {}; - bindingsByRoot[rootUuid] = bindingByName; - } - - bindingByName[trackName] = binding; - binding._cacheIndex = bindings.length; - bindings.push(binding); - } - - _removeInactiveBinding(binding) { - const bindings = this._bindings, - propBinding = binding.binding, - rootUuid = propBinding.rootNode.uuid, - trackName = propBinding.path, - bindingsByRoot = this._bindingsByRootAndName, - bindingByName = bindingsByRoot[rootUuid], - lastInactiveBinding = bindings[bindings.length - 1], - cacheIndex = binding._cacheIndex; - lastInactiveBinding._cacheIndex = cacheIndex; - bindings[cacheIndex] = lastInactiveBinding; - bindings.pop(); - delete bindingByName[trackName]; - - if (Object.keys(bindingByName).length === 0) { - delete bindingsByRoot[rootUuid]; - } - } - - _lendBinding(binding) { - const bindings = this._bindings, - prevIndex = binding._cacheIndex, - lastActiveIndex = this._nActiveBindings++, - firstInactiveBinding = bindings[lastActiveIndex]; - binding._cacheIndex = lastActiveIndex; - bindings[lastActiveIndex] = binding; - firstInactiveBinding._cacheIndex = prevIndex; - bindings[prevIndex] = firstInactiveBinding; - } - - _takeBackBinding(binding) { - const bindings = this._bindings, - prevIndex = binding._cacheIndex, - firstInactiveIndex = --this._nActiveBindings, - lastActiveBinding = bindings[firstInactiveIndex]; - binding._cacheIndex = firstInactiveIndex; - bindings[firstInactiveIndex] = binding; - lastActiveBinding._cacheIndex = prevIndex; - bindings[prevIndex] = lastActiveBinding; - } // Memory management of Interpolants for weight and time scale - - - _lendControlInterpolant() { - const interpolants = this._controlInterpolants, - lastActiveIndex = this._nActiveControlInterpolants++; - let interpolant = interpolants[lastActiveIndex]; - - if (interpolant === undefined) { - interpolant = new LinearInterpolant(new Float32Array(2), new Float32Array(2), 1, this._controlInterpolantsResultBuffer); - interpolant.__cacheIndex = lastActiveIndex; - interpolants[lastActiveIndex] = interpolant; - } - - return interpolant; - } - - _takeBackControlInterpolant(interpolant) { - const interpolants = this._controlInterpolants, - prevIndex = interpolant.__cacheIndex, - firstInactiveIndex = --this._nActiveControlInterpolants, - lastActiveInterpolant = interpolants[firstInactiveIndex]; - interpolant.__cacheIndex = firstInactiveIndex; - interpolants[firstInactiveIndex] = interpolant; - lastActiveInterpolant.__cacheIndex = prevIndex; - interpolants[prevIndex] = lastActiveInterpolant; - } // return an action for a clip optionally using a custom root target - // object (this method allocates a lot of dynamic memory in case a - // previously unknown clip/root combination is specified) - - - clipAction(clip, optionalRoot, blendMode) { - const root = optionalRoot || this._root, - rootUuid = root.uuid; - let clipObject = typeof clip === 'string' ? AnimationClip.findByName(root, clip) : clip; - const clipUuid = clipObject !== null ? clipObject.uuid : clip; - const actionsForClip = this._actionsByClip[clipUuid]; - let prototypeAction = null; - - if (blendMode === undefined) { - if (clipObject !== null) { - blendMode = clipObject.blendMode; - } else { - blendMode = NormalAnimationBlendMode; - } - } - - if (actionsForClip !== undefined) { - const existingAction = actionsForClip.actionByRoot[rootUuid]; - - if (existingAction !== undefined && existingAction.blendMode === blendMode) { - return existingAction; - } // we know the clip, so we don't have to parse all - // the bindings again but can just copy - - - prototypeAction = actionsForClip.knownActions[0]; // also, take the clip from the prototype action - - if (clipObject === null) clipObject = prototypeAction._clip; - } // clip must be known when specified via string - - - if (clipObject === null) return null; // allocate all resources required to run it - - const newAction = new AnimationAction(this, clipObject, optionalRoot, blendMode); - - this._bindAction(newAction, prototypeAction); // and make the action known to the memory manager - - - this._addInactiveAction(newAction, clipUuid, rootUuid); - - return newAction; - } // get an existing action - - - existingAction(clip, optionalRoot) { - const root = optionalRoot || this._root, - rootUuid = root.uuid, - clipObject = typeof clip === 'string' ? AnimationClip.findByName(root, clip) : clip, - clipUuid = clipObject ? clipObject.uuid : clip, - actionsForClip = this._actionsByClip[clipUuid]; - - if (actionsForClip !== undefined) { - return actionsForClip.actionByRoot[rootUuid] || null; - } - - return null; - } // deactivates all previously scheduled actions - - - stopAllAction() { - const actions = this._actions, - nActions = this._nActiveActions; - - for (let i = nActions - 1; i >= 0; --i) { - actions[i].stop(); - } - - return this; - } // advance the time and update apply the animation - - - update(deltaTime) { - deltaTime *= this.timeScale; - const actions = this._actions, - nActions = this._nActiveActions, - time = this.time += deltaTime, - timeDirection = Math.sign(deltaTime), - accuIndex = this._accuIndex ^= 1; // run active actions - - for (let i = 0; i !== nActions; ++i) { - const action = actions[i]; - - action._update(time, deltaTime, timeDirection, accuIndex); - } // update scene graph - - - const bindings = this._bindings, - nBindings = this._nActiveBindings; - - for (let i = 0; i !== nBindings; ++i) { - bindings[i].apply(accuIndex); - } - - return this; - } // Allows you to seek to a specific time in an animation. - - - setTime(timeInSeconds) { - this.time = 0; // Zero out time attribute for AnimationMixer object; - - for (let i = 0; i < this._actions.length; i++) { - this._actions[i].time = 0; // Zero out time attribute for all associated AnimationAction objects. - } - - return this.update(timeInSeconds); // Update used to set exact time. Returns "this" AnimationMixer object. - } // return this mixer's root target object - - - getRoot() { - return this._root; - } // free all resources specific to a particular clip - - - uncacheClip(clip) { - const actions = this._actions, - clipUuid = clip.uuid, - actionsByClip = this._actionsByClip, - actionsForClip = actionsByClip[clipUuid]; - - if (actionsForClip !== undefined) { - // note: just calling _removeInactiveAction would mess up the - // iteration state and also require updating the state we can - // just throw away - const actionsToRemove = actionsForClip.knownActions; - - for (let i = 0, n = actionsToRemove.length; i !== n; ++i) { - const action = actionsToRemove[i]; - - this._deactivateAction(action); - - const cacheIndex = action._cacheIndex, - lastInactiveAction = actions[actions.length - 1]; - action._cacheIndex = null; - action._byClipCacheIndex = null; - lastInactiveAction._cacheIndex = cacheIndex; - actions[cacheIndex] = lastInactiveAction; - actions.pop(); - - this._removeInactiveBindingsForAction(action); - } - - delete actionsByClip[clipUuid]; - } - } // free all resources specific to a particular root target object - - - uncacheRoot(root) { - const rootUuid = root.uuid, - actionsByClip = this._actionsByClip; - - for (const clipUuid in actionsByClip) { - const actionByRoot = actionsByClip[clipUuid].actionByRoot, - action = actionByRoot[rootUuid]; - - if (action !== undefined) { - this._deactivateAction(action); - - this._removeInactiveAction(action); - } - } - - const bindingsByRoot = this._bindingsByRootAndName, - bindingByName = bindingsByRoot[rootUuid]; - - if (bindingByName !== undefined) { - for (const trackName in bindingByName) { - const binding = bindingByName[trackName]; - binding.restoreOriginalState(); - - this._removeInactiveBinding(binding); - } - } - } // remove a targeted clip from the cache - - - uncacheAction(clip, optionalRoot) { - const action = this.existingAction(clip, optionalRoot); - - if (action !== null) { - this._deactivateAction(action); - - this._removeInactiveAction(action); - } - } - - } - - AnimationMixer.prototype._controlInterpolantsResultBuffer = new Float32Array(1); - - class Uniform { - constructor(value) { - if (typeof value === 'string') { - console.warn('THREE.Uniform: Type parameter is no longer needed.'); - value = arguments[1]; - } - - this.value = value; - } - - clone() { - return new Uniform(this.value.clone === undefined ? this.value : this.value.clone()); - } - - } - - class InstancedInterleavedBuffer extends InterleavedBuffer { - constructor(array, stride, meshPerAttribute = 1) { - super(array, stride); - this.meshPerAttribute = meshPerAttribute; - } - - copy(source) { - super.copy(source); - this.meshPerAttribute = source.meshPerAttribute; - return this; - } - - clone(data) { - const ib = super.clone(data); - ib.meshPerAttribute = this.meshPerAttribute; - return ib; - } - - toJSON(data) { - const json = super.toJSON(data); - json.isInstancedInterleavedBuffer = true; - json.meshPerAttribute = this.meshPerAttribute; - return json; - } - - } - - InstancedInterleavedBuffer.prototype.isInstancedInterleavedBuffer = true; - - class GLBufferAttribute { - constructor(buffer, type, itemSize, elementSize, count) { - this.buffer = buffer; - this.type = type; - this.itemSize = itemSize; - this.elementSize = elementSize; - this.count = count; - this.version = 0; - } - - set needsUpdate(value) { - if (value === true) this.version++; - } - - setBuffer(buffer) { - this.buffer = buffer; - return this; - } - - setType(type, elementSize) { - this.type = type; - this.elementSize = elementSize; - return this; - } - - setItemSize(itemSize) { - this.itemSize = itemSize; - return this; - } - - setCount(count) { - this.count = count; - return this; - } - - } - - GLBufferAttribute.prototype.isGLBufferAttribute = true; - - class Raycaster { - constructor(origin, direction, near = 0, far = Infinity) { - this.ray = new Ray(origin, direction); // direction is assumed to be normalized (for accurate distance calculations) - - this.near = near; - this.far = far; - this.camera = null; - this.layers = new Layers(); - this.params = { - Mesh: {}, - Line: { - threshold: 1 - }, - LOD: {}, - Points: { - threshold: 1 - }, - Sprite: {} - }; - } - - set(origin, direction) { - // direction is assumed to be normalized (for accurate distance calculations) - this.ray.set(origin, direction); - } - - setFromCamera(coords, camera) { - if (camera && camera.isPerspectiveCamera) { - this.ray.origin.setFromMatrixPosition(camera.matrixWorld); - this.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize(); - this.camera = camera; - } else if (camera && camera.isOrthographicCamera) { - this.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera - - this.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld); - this.camera = camera; - } else { - console.error('THREE.Raycaster: Unsupported camera type: ' + camera.type); - } - } - - intersectObject(object, recursive = false, intersects = []) { - intersectObject(object, this, intersects, recursive); - intersects.sort(ascSort); - return intersects; - } - - intersectObjects(objects, recursive = false, intersects = []) { - for (let i = 0, l = objects.length; i < l; i++) { - intersectObject(objects[i], this, intersects, recursive); - } - - intersects.sort(ascSort); - return intersects; - } - - } - - function ascSort(a, b) { - return a.distance - b.distance; - } - - function intersectObject(object, raycaster, intersects, recursive) { - if (object.layers.test(raycaster.layers)) { - object.raycast(raycaster, intersects); - } - - if (recursive === true) { - const children = object.children; - - for (let i = 0, l = children.length; i < l; i++) { - intersectObject(children[i], raycaster, intersects, true); - } - } - } - - /** - * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system - * - * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up. - * The azimuthal angle (theta) is measured from the positive z-axis. - */ - - class Spherical { - constructor(radius = 1, phi = 0, theta = 0) { - this.radius = radius; - this.phi = phi; // polar angle - - this.theta = theta; // azimuthal angle - - return this; - } - - set(radius, phi, theta) { - this.radius = radius; - this.phi = phi; - this.theta = theta; - return this; - } - - copy(other) { - this.radius = other.radius; - this.phi = other.phi; - this.theta = other.theta; - return this; - } // restrict phi to be betwee EPS and PI-EPS - - - makeSafe() { - const EPS = 0.000001; - this.phi = Math.max(EPS, Math.min(Math.PI - EPS, this.phi)); - return this; - } - - setFromVector3(v) { - return this.setFromCartesianCoords(v.x, v.y, v.z); - } - - setFromCartesianCoords(x, y, z) { - this.radius = Math.sqrt(x * x + y * y + z * z); - - if (this.radius === 0) { - this.theta = 0; - this.phi = 0; - } else { - this.theta = Math.atan2(x, z); - this.phi = Math.acos(clamp(y / this.radius, -1, 1)); - } - - return this; - } - - clone() { - return new this.constructor().copy(this); - } - - } - - /** - * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system - */ - class Cylindrical { - constructor(radius = 1, theta = 0, y = 0) { - this.radius = radius; // distance from the origin to a point in the x-z plane - - this.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis - - this.y = y; // height above the x-z plane - - return this; - } - - set(radius, theta, y) { - this.radius = radius; - this.theta = theta; - this.y = y; - return this; - } - - copy(other) { - this.radius = other.radius; - this.theta = other.theta; - this.y = other.y; - return this; - } - - setFromVector3(v) { - return this.setFromCartesianCoords(v.x, v.y, v.z); - } - - setFromCartesianCoords(x, y, z) { - this.radius = Math.sqrt(x * x + z * z); - this.theta = Math.atan2(x, z); - this.y = y; - return this; - } - - clone() { - return new this.constructor().copy(this); - } - - } - - const _vector$4 = /*@__PURE__*/new Vector2(); - - class Box2 { - constructor(min = new Vector2(+Infinity, +Infinity), max = new Vector2(-Infinity, -Infinity)) { - this.min = min; - this.max = max; - } - - set(min, max) { - this.min.copy(min); - this.max.copy(max); - return this; - } - - setFromPoints(points) { - this.makeEmpty(); - - for (let i = 0, il = points.length; i < il; i++) { - this.expandByPoint(points[i]); - } - - return this; - } - - setFromCenterAndSize(center, size) { - const halfSize = _vector$4.copy(size).multiplyScalar(0.5); - - this.min.copy(center).sub(halfSize); - this.max.copy(center).add(halfSize); - return this; - } - - clone() { - return new this.constructor().copy(this); - } - - copy(box) { - this.min.copy(box.min); - this.max.copy(box.max); - return this; - } - - makeEmpty() { - this.min.x = this.min.y = +Infinity; - this.max.x = this.max.y = -Infinity; - return this; - } - - isEmpty() { - // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes - return this.max.x < this.min.x || this.max.y < this.min.y; - } - - getCenter(target) { - return this.isEmpty() ? target.set(0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5); - } - - getSize(target) { - return this.isEmpty() ? target.set(0, 0) : target.subVectors(this.max, this.min); - } - - expandByPoint(point) { - this.min.min(point); - this.max.max(point); - return this; - } - - expandByVector(vector) { - this.min.sub(vector); - this.max.add(vector); - return this; - } - - expandByScalar(scalar) { - this.min.addScalar(-scalar); - this.max.addScalar(scalar); - return this; - } - - containsPoint(point) { - return point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y ? false : true; - } - - containsBox(box) { - return this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y; - } - - getParameter(point, target) { - // This can potentially have a divide by zero if the box - // has a size dimension of 0. - return target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y)); - } - - intersectsBox(box) { - // using 4 splitting planes to rule out intersections - return box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y ? false : true; - } - - clampPoint(point, target) { - return target.copy(point).clamp(this.min, this.max); - } - - distanceToPoint(point) { - const clampedPoint = _vector$4.copy(point).clamp(this.min, this.max); - - return clampedPoint.sub(point).length(); - } - - intersect(box) { - this.min.max(box.min); - this.max.min(box.max); - return this; - } - - union(box) { - this.min.min(box.min); - this.max.max(box.max); - return this; - } - - translate(offset) { - this.min.add(offset); - this.max.add(offset); - return this; - } - - equals(box) { - return box.min.equals(this.min) && box.max.equals(this.max); - } - - } - - Box2.prototype.isBox2 = true; - - const _startP = /*@__PURE__*/new Vector3(); - - const _startEnd = /*@__PURE__*/new Vector3(); - - class Line3 { - constructor(start = new Vector3(), end = new Vector3()) { - this.start = start; - this.end = end; - } - - set(start, end) { - this.start.copy(start); - this.end.copy(end); - return this; - } - - copy(line) { - this.start.copy(line.start); - this.end.copy(line.end); - return this; - } - - getCenter(target) { - return target.addVectors(this.start, this.end).multiplyScalar(0.5); - } - - delta(target) { - return target.subVectors(this.end, this.start); - } - - distanceSq() { - return this.start.distanceToSquared(this.end); - } - - distance() { - return this.start.distanceTo(this.end); - } - - at(t, target) { - return this.delta(target).multiplyScalar(t).add(this.start); - } - - closestPointToPointParameter(point, clampToLine) { - _startP.subVectors(point, this.start); - - _startEnd.subVectors(this.end, this.start); - - const startEnd2 = _startEnd.dot(_startEnd); - - const startEnd_startP = _startEnd.dot(_startP); - - let t = startEnd_startP / startEnd2; - - if (clampToLine) { - t = clamp(t, 0, 1); - } - - return t; - } - - closestPointToPoint(point, clampToLine, target) { - const t = this.closestPointToPointParameter(point, clampToLine); - return this.delta(target).multiplyScalar(t).add(this.start); - } - - applyMatrix4(matrix) { - this.start.applyMatrix4(matrix); - this.end.applyMatrix4(matrix); - return this; - } - - equals(line) { - return line.start.equals(this.start) && line.end.equals(this.end); - } - - clone() { - return new this.constructor().copy(this); - } - - } - - class ImmediateRenderObject extends Object3D { - constructor(material) { - super(); - this.material = material; - - this.render = function () - /* renderCallback */ - {}; - - this.hasPositions = false; - this.hasNormals = false; - this.hasColors = false; - this.hasUvs = false; - this.positionArray = null; - this.normalArray = null; - this.colorArray = null; - this.uvArray = null; - this.count = 0; - } - - } - - ImmediateRenderObject.prototype.isImmediateRenderObject = true; - - const _vector$3 = /*@__PURE__*/new Vector3(); - - class SpotLightHelper extends Object3D { - constructor(light, color) { - super(); - this.light = light; - this.light.updateMatrixWorld(); - this.matrix = light.matrixWorld; - this.matrixAutoUpdate = false; - this.color = color; - const geometry = new BufferGeometry(); - const positions = [0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, -1, 1]; - - for (let i = 0, j = 1, l = 32; i < l; i++, j++) { - const p1 = i / l * Math.PI * 2; - const p2 = j / l * Math.PI * 2; - positions.push(Math.cos(p1), Math.sin(p1), 1, Math.cos(p2), Math.sin(p2), 1); - } - - geometry.setAttribute('position', new Float32BufferAttribute(positions, 3)); - const material = new LineBasicMaterial({ - fog: false, - toneMapped: false - }); - this.cone = new LineSegments(geometry, material); - this.add(this.cone); - this.update(); - } - - dispose() { - this.cone.geometry.dispose(); - this.cone.material.dispose(); - } - - update() { - this.light.updateMatrixWorld(); - const coneLength = this.light.distance ? this.light.distance : 1000; - const coneWidth = coneLength * Math.tan(this.light.angle); - this.cone.scale.set(coneWidth, coneWidth, coneLength); - - _vector$3.setFromMatrixPosition(this.light.target.matrixWorld); - - this.cone.lookAt(_vector$3); - - if (this.color !== undefined) { - this.cone.material.color.set(this.color); - } else { - this.cone.material.color.copy(this.light.color); - } - } - - } - - const _vector$2 = /*@__PURE__*/new Vector3(); - - const _boneMatrix = /*@__PURE__*/new Matrix4(); - - const _matrixWorldInv = /*@__PURE__*/new Matrix4(); - - class SkeletonHelper extends LineSegments { - constructor(object) { - const bones = getBoneList(object); - const geometry = new BufferGeometry(); - const vertices = []; - const colors = []; - const color1 = new Color(0, 0, 1); - const color2 = new Color(0, 1, 0); - - for (let i = 0; i < bones.length; i++) { - const bone = bones[i]; - - if (bone.parent && bone.parent.isBone) { - vertices.push(0, 0, 0); - vertices.push(0, 0, 0); - colors.push(color1.r, color1.g, color1.b); - colors.push(color2.r, color2.g, color2.b); - } - } - - geometry.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - geometry.setAttribute('color', new Float32BufferAttribute(colors, 3)); - const material = new LineBasicMaterial({ - vertexColors: true, - depthTest: false, - depthWrite: false, - toneMapped: false, - transparent: true - }); - super(geometry, material); - this.type = 'SkeletonHelper'; - this.isSkeletonHelper = true; - this.root = object; - this.bones = bones; - this.matrix = object.matrixWorld; - this.matrixAutoUpdate = false; - } - - updateMatrixWorld(force) { - const bones = this.bones; - const geometry = this.geometry; - const position = geometry.getAttribute('position'); - - _matrixWorldInv.copy(this.root.matrixWorld).invert(); - - for (let i = 0, j = 0; i < bones.length; i++) { - const bone = bones[i]; - - if (bone.parent && bone.parent.isBone) { - _boneMatrix.multiplyMatrices(_matrixWorldInv, bone.matrixWorld); - - _vector$2.setFromMatrixPosition(_boneMatrix); - - position.setXYZ(j, _vector$2.x, _vector$2.y, _vector$2.z); - - _boneMatrix.multiplyMatrices(_matrixWorldInv, bone.parent.matrixWorld); - - _vector$2.setFromMatrixPosition(_boneMatrix); - - position.setXYZ(j + 1, _vector$2.x, _vector$2.y, _vector$2.z); - j += 2; - } - } - - geometry.getAttribute('position').needsUpdate = true; - super.updateMatrixWorld(force); - } - - } - - function getBoneList(object) { - const boneList = []; - - if (object && object.isBone) { - boneList.push(object); - } - - for (let i = 0; i < object.children.length; i++) { - boneList.push.apply(boneList, getBoneList(object.children[i])); - } - - return boneList; - } - - class PointLightHelper extends Mesh { - constructor(light, sphereSize, color) { - const geometry = new SphereGeometry(sphereSize, 4, 2); - const material = new MeshBasicMaterial({ - wireframe: true, - fog: false, - toneMapped: false - }); - super(geometry, material); - this.light = light; - this.light.updateMatrixWorld(); - this.color = color; - this.type = 'PointLightHelper'; - this.matrix = this.light.matrixWorld; - this.matrixAutoUpdate = false; - this.update(); - /* - // TODO: delete this comment? - const distanceGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 ); - const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } ); - this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial ); - this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial ); - const d = light.distance; - if ( d === 0.0 ) { - this.lightDistance.visible = false; - } else { - this.lightDistance.scale.set( d, d, d ); - } - this.add( this.lightDistance ); - */ - } - - dispose() { - this.geometry.dispose(); - this.material.dispose(); - } - - update() { - if (this.color !== undefined) { - this.material.color.set(this.color); - } else { - this.material.color.copy(this.light.color); - } - /* - const d = this.light.distance; - if ( d === 0.0 ) { - this.lightDistance.visible = false; - } else { - this.lightDistance.visible = true; - this.lightDistance.scale.set( d, d, d ); - } - */ - - } - - } - - const _vector$1 = /*@__PURE__*/new Vector3(); - - const _color1 = /*@__PURE__*/new Color(); - - const _color2 = /*@__PURE__*/new Color(); - - class HemisphereLightHelper extends Object3D { - constructor(light, size, color) { - super(); - this.light = light; - this.light.updateMatrixWorld(); - this.matrix = light.matrixWorld; - this.matrixAutoUpdate = false; - this.color = color; - const geometry = new OctahedronGeometry(size); - geometry.rotateY(Math.PI * 0.5); - this.material = new MeshBasicMaterial({ - wireframe: true, - fog: false, - toneMapped: false - }); - if (this.color === undefined) this.material.vertexColors = true; - const position = geometry.getAttribute('position'); - const colors = new Float32Array(position.count * 3); - geometry.setAttribute('color', new BufferAttribute(colors, 3)); - this.add(new Mesh(geometry, this.material)); - this.update(); - } - - dispose() { - this.children[0].geometry.dispose(); - this.children[0].material.dispose(); - } - - update() { - const mesh = this.children[0]; - - if (this.color !== undefined) { - this.material.color.set(this.color); - } else { - const colors = mesh.geometry.getAttribute('color'); - - _color1.copy(this.light.color); - - _color2.copy(this.light.groundColor); - - for (let i = 0, l = colors.count; i < l; i++) { - const color = i < l / 2 ? _color1 : _color2; - colors.setXYZ(i, color.r, color.g, color.b); - } - - colors.needsUpdate = true; - } - - mesh.lookAt(_vector$1.setFromMatrixPosition(this.light.matrixWorld).negate()); - } - - } - - class GridHelper extends LineSegments { - constructor(size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888) { - color1 = new Color(color1); - color2 = new Color(color2); - const center = divisions / 2; - const step = size / divisions; - const halfSize = size / 2; - const vertices = [], - colors = []; - - for (let i = 0, j = 0, k = -halfSize; i <= divisions; i++, k += step) { - vertices.push(-halfSize, 0, k, halfSize, 0, k); - vertices.push(k, 0, -halfSize, k, 0, halfSize); - const color = i === center ? color1 : color2; - color.toArray(colors, j); - j += 3; - color.toArray(colors, j); - j += 3; - color.toArray(colors, j); - j += 3; - color.toArray(colors, j); - j += 3; - } - - const geometry = new BufferGeometry(); - geometry.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - geometry.setAttribute('color', new Float32BufferAttribute(colors, 3)); - const material = new LineBasicMaterial({ - vertexColors: true, - toneMapped: false - }); - super(geometry, material); - this.type = 'GridHelper'; - } - - } - - class PolarGridHelper extends LineSegments { - constructor(radius = 10, radials = 16, circles = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888) { - color1 = new Color(color1); - color2 = new Color(color2); - const vertices = []; - const colors = []; // create the radials - - for (let i = 0; i <= radials; i++) { - const v = i / radials * (Math.PI * 2); - const x = Math.sin(v) * radius; - const z = Math.cos(v) * radius; - vertices.push(0, 0, 0); - vertices.push(x, 0, z); - const color = i & 1 ? color1 : color2; - colors.push(color.r, color.g, color.b); - colors.push(color.r, color.g, color.b); - } // create the circles - - - for (let i = 0; i <= circles; i++) { - const color = i & 1 ? color1 : color2; - const r = radius - radius / circles * i; - - for (let j = 0; j < divisions; j++) { - // first vertex - let v = j / divisions * (Math.PI * 2); - let x = Math.sin(v) * r; - let z = Math.cos(v) * r; - vertices.push(x, 0, z); - colors.push(color.r, color.g, color.b); // second vertex - - v = (j + 1) / divisions * (Math.PI * 2); - x = Math.sin(v) * r; - z = Math.cos(v) * r; - vertices.push(x, 0, z); - colors.push(color.r, color.g, color.b); - } - } - - const geometry = new BufferGeometry(); - geometry.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - geometry.setAttribute('color', new Float32BufferAttribute(colors, 3)); - const material = new LineBasicMaterial({ - vertexColors: true, - toneMapped: false - }); - super(geometry, material); - this.type = 'PolarGridHelper'; - } - - } - - const _v1 = /*@__PURE__*/new Vector3(); - - const _v2 = /*@__PURE__*/new Vector3(); - - const _v3 = /*@__PURE__*/new Vector3(); - - class DirectionalLightHelper extends Object3D { - constructor(light, size, color) { - super(); - this.light = light; - this.light.updateMatrixWorld(); - this.matrix = light.matrixWorld; - this.matrixAutoUpdate = false; - this.color = color; - if (size === undefined) size = 1; - let geometry = new BufferGeometry(); - geometry.setAttribute('position', new Float32BufferAttribute([-size, size, 0, size, size, 0, size, -size, 0, -size, -size, 0, -size, size, 0], 3)); - const material = new LineBasicMaterial({ - fog: false, - toneMapped: false - }); - this.lightPlane = new Line(geometry, material); - this.add(this.lightPlane); - geometry = new BufferGeometry(); - geometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3)); - this.targetLine = new Line(geometry, material); - this.add(this.targetLine); - this.update(); - } - - dispose() { - this.lightPlane.geometry.dispose(); - this.lightPlane.material.dispose(); - this.targetLine.geometry.dispose(); - this.targetLine.material.dispose(); - } - - update() { - _v1.setFromMatrixPosition(this.light.matrixWorld); - - _v2.setFromMatrixPosition(this.light.target.matrixWorld); - - _v3.subVectors(_v2, _v1); - - this.lightPlane.lookAt(_v2); - - if (this.color !== undefined) { - this.lightPlane.material.color.set(this.color); - this.targetLine.material.color.set(this.color); - } else { - this.lightPlane.material.color.copy(this.light.color); - this.targetLine.material.color.copy(this.light.color); - } - - this.targetLine.lookAt(_v2); - this.targetLine.scale.z = _v3.length(); - } - - } - - const _vector = /*@__PURE__*/new Vector3(); - - const _camera = /*@__PURE__*/new Camera(); - /** - * - shows frustum, line of sight and up of the camera - * - suitable for fast updates - * - based on frustum visualization in lightgl.js shadowmap example - * http://evanw.github.com/lightgl.js/tests/shadowmap.html - */ - - - class CameraHelper extends LineSegments { - constructor(camera) { - const geometry = new BufferGeometry(); - const material = new LineBasicMaterial({ - color: 0xffffff, - vertexColors: true, - toneMapped: false - }); - const vertices = []; - const colors = []; - const pointMap = {}; // colors - - const colorFrustum = new Color(0xffaa00); - const colorCone = new Color(0xff0000); - const colorUp = new Color(0x00aaff); - const colorTarget = new Color(0xffffff); - const colorCross = new Color(0x333333); // near - - addLine('n1', 'n2', colorFrustum); - addLine('n2', 'n4', colorFrustum); - addLine('n4', 'n3', colorFrustum); - addLine('n3', 'n1', colorFrustum); // far - - addLine('f1', 'f2', colorFrustum); - addLine('f2', 'f4', colorFrustum); - addLine('f4', 'f3', colorFrustum); - addLine('f3', 'f1', colorFrustum); // sides - - addLine('n1', 'f1', colorFrustum); - addLine('n2', 'f2', colorFrustum); - addLine('n3', 'f3', colorFrustum); - addLine('n4', 'f4', colorFrustum); // cone - - addLine('p', 'n1', colorCone); - addLine('p', 'n2', colorCone); - addLine('p', 'n3', colorCone); - addLine('p', 'n4', colorCone); // up - - addLine('u1', 'u2', colorUp); - addLine('u2', 'u3', colorUp); - addLine('u3', 'u1', colorUp); // target - - addLine('c', 't', colorTarget); - addLine('p', 'c', colorCross); // cross - - addLine('cn1', 'cn2', colorCross); - addLine('cn3', 'cn4', colorCross); - addLine('cf1', 'cf2', colorCross); - addLine('cf3', 'cf4', colorCross); - - function addLine(a, b, color) { - addPoint(a, color); - addPoint(b, color); - } - - function addPoint(id, color) { - vertices.push(0, 0, 0); - colors.push(color.r, color.g, color.b); - - if (pointMap[id] === undefined) { - pointMap[id] = []; - } - - pointMap[id].push(vertices.length / 3 - 1); - } - - geometry.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - geometry.setAttribute('color', new Float32BufferAttribute(colors, 3)); - super(geometry, material); - this.type = 'CameraHelper'; - this.camera = camera; - if (this.camera.updateProjectionMatrix) this.camera.updateProjectionMatrix(); - this.matrix = camera.matrixWorld; - this.matrixAutoUpdate = false; - this.pointMap = pointMap; - this.update(); - } - - update() { - const geometry = this.geometry; - const pointMap = this.pointMap; - const w = 1, - h = 1; // we need just camera projection matrix inverse - // world matrix must be identity - - _camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse); // center / target - - - setPoint('c', pointMap, geometry, _camera, 0, 0, -1); - setPoint('t', pointMap, geometry, _camera, 0, 0, 1); // near - - setPoint('n1', pointMap, geometry, _camera, -w, -h, -1); - setPoint('n2', pointMap, geometry, _camera, w, -h, -1); - setPoint('n3', pointMap, geometry, _camera, -w, h, -1); - setPoint('n4', pointMap, geometry, _camera, w, h, -1); // far - - setPoint('f1', pointMap, geometry, _camera, -w, -h, 1); - setPoint('f2', pointMap, geometry, _camera, w, -h, 1); - setPoint('f3', pointMap, geometry, _camera, -w, h, 1); - setPoint('f4', pointMap, geometry, _camera, w, h, 1); // up - - setPoint('u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, -1); - setPoint('u2', pointMap, geometry, _camera, -w * 0.7, h * 1.1, -1); - setPoint('u3', pointMap, geometry, _camera, 0, h * 2, -1); // cross - - setPoint('cf1', pointMap, geometry, _camera, -w, 0, 1); - setPoint('cf2', pointMap, geometry, _camera, w, 0, 1); - setPoint('cf3', pointMap, geometry, _camera, 0, -h, 1); - setPoint('cf4', pointMap, geometry, _camera, 0, h, 1); - setPoint('cn1', pointMap, geometry, _camera, -w, 0, -1); - setPoint('cn2', pointMap, geometry, _camera, w, 0, -1); - setPoint('cn3', pointMap, geometry, _camera, 0, -h, -1); - setPoint('cn4', pointMap, geometry, _camera, 0, h, -1); - geometry.getAttribute('position').needsUpdate = true; - } - - dispose() { - this.geometry.dispose(); - this.material.dispose(); - } - - } - - function setPoint(point, pointMap, geometry, camera, x, y, z) { - _vector.set(x, y, z).unproject(camera); - - const points = pointMap[point]; - - if (points !== undefined) { - const position = geometry.getAttribute('position'); - - for (let i = 0, l = points.length; i < l; i++) { - position.setXYZ(points[i], _vector.x, _vector.y, _vector.z); - } - } - } - - const _box = /*@__PURE__*/new Box3(); - - class BoxHelper extends LineSegments { - constructor(object, color = 0xffff00) { - const indices = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]); - const positions = new Float32Array(8 * 3); - const geometry = new BufferGeometry(); - geometry.setIndex(new BufferAttribute(indices, 1)); - geometry.setAttribute('position', new BufferAttribute(positions, 3)); - super(geometry, new LineBasicMaterial({ - color: color, - toneMapped: false - })); - this.object = object; - this.type = 'BoxHelper'; - this.matrixAutoUpdate = false; - this.update(); - } - - update(object) { - if (object !== undefined) { - console.warn('THREE.BoxHelper: .update() has no longer arguments.'); - } - - if (this.object !== undefined) { - _box.setFromObject(this.object); - } - - if (_box.isEmpty()) return; - const min = _box.min; - const max = _box.max; - /* - 5____4 - 1/___0/| - | 6__|_7 - 2/___3/ - 0: max.x, max.y, max.z - 1: min.x, max.y, max.z - 2: min.x, min.y, max.z - 3: max.x, min.y, max.z - 4: max.x, max.y, min.z - 5: min.x, max.y, min.z - 6: min.x, min.y, min.z - 7: max.x, min.y, min.z - */ - - const position = this.geometry.attributes.position; - const array = position.array; - array[0] = max.x; - array[1] = max.y; - array[2] = max.z; - array[3] = min.x; - array[4] = max.y; - array[5] = max.z; - array[6] = min.x; - array[7] = min.y; - array[8] = max.z; - array[9] = max.x; - array[10] = min.y; - array[11] = max.z; - array[12] = max.x; - array[13] = max.y; - array[14] = min.z; - array[15] = min.x; - array[16] = max.y; - array[17] = min.z; - array[18] = min.x; - array[19] = min.y; - array[20] = min.z; - array[21] = max.x; - array[22] = min.y; - array[23] = min.z; - position.needsUpdate = true; - this.geometry.computeBoundingSphere(); - } - - setFromObject(object) { - this.object = object; - this.update(); - return this; - } - - copy(source) { - LineSegments.prototype.copy.call(this, source); - this.object = source.object; - return this; - } - - } - - class Box3Helper extends LineSegments { - constructor(box, color = 0xffff00) { - const indices = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]); - const positions = [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1]; - const geometry = new BufferGeometry(); - geometry.setIndex(new BufferAttribute(indices, 1)); - geometry.setAttribute('position', new Float32BufferAttribute(positions, 3)); - super(geometry, new LineBasicMaterial({ - color: color, - toneMapped: false - })); - this.box = box; - this.type = 'Box3Helper'; - this.geometry.computeBoundingSphere(); - } - - updateMatrixWorld(force) { - const box = this.box; - if (box.isEmpty()) return; - box.getCenter(this.position); - box.getSize(this.scale); - this.scale.multiplyScalar(0.5); - super.updateMatrixWorld(force); - } - - } - - class PlaneHelper extends Line { - constructor(plane, size = 1, hex = 0xffff00) { - const color = hex; - const positions = [1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0]; - const geometry = new BufferGeometry(); - geometry.setAttribute('position', new Float32BufferAttribute(positions, 3)); - geometry.computeBoundingSphere(); - super(geometry, new LineBasicMaterial({ - color: color, - toneMapped: false - })); - this.type = 'PlaneHelper'; - this.plane = plane; - this.size = size; - const positions2 = [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1]; - const geometry2 = new BufferGeometry(); - geometry2.setAttribute('position', new Float32BufferAttribute(positions2, 3)); - geometry2.computeBoundingSphere(); - this.add(new Mesh(geometry2, new MeshBasicMaterial({ - color: color, - opacity: 0.2, - transparent: true, - depthWrite: false, - toneMapped: false - }))); - } - - updateMatrixWorld(force) { - let scale = -this.plane.constant; - if (Math.abs(scale) < 1e-8) scale = 1e-8; // sign does not matter - - this.scale.set(0.5 * this.size, 0.5 * this.size, scale); - this.children[0].material.side = scale < 0 ? BackSide : FrontSide; // renderer flips side when determinant < 0; flipping not wanted here - - this.lookAt(this.plane.normal); - super.updateMatrixWorld(force); - } - - } - - const _axis = /*@__PURE__*/new Vector3(); - - let _lineGeometry, _coneGeometry; - - class ArrowHelper extends Object3D { - // dir is assumed to be normalized - constructor(dir = new Vector3(0, 0, 1), origin = new Vector3(0, 0, 0), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2) { - super(); - this.type = 'ArrowHelper'; - - if (_lineGeometry === undefined) { - _lineGeometry = new BufferGeometry(); - - _lineGeometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3)); - - _coneGeometry = new CylinderGeometry(0, 0.5, 1, 5, 1); - - _coneGeometry.translate(0, -0.5, 0); - } - - this.position.copy(origin); - this.line = new Line(_lineGeometry, new LineBasicMaterial({ - color: color, - toneMapped: false - })); - this.line.matrixAutoUpdate = false; - this.add(this.line); - this.cone = new Mesh(_coneGeometry, new MeshBasicMaterial({ - color: color, - toneMapped: false - })); - this.cone.matrixAutoUpdate = false; - this.add(this.cone); - this.setDirection(dir); - this.setLength(length, headLength, headWidth); - } - - setDirection(dir) { - // dir is assumed to be normalized - if (dir.y > 0.99999) { - this.quaternion.set(0, 0, 0, 1); - } else if (dir.y < -0.99999) { - this.quaternion.set(1, 0, 0, 0); - } else { - _axis.set(dir.z, 0, -dir.x).normalize(); - - const radians = Math.acos(dir.y); - this.quaternion.setFromAxisAngle(_axis, radians); - } - } - - setLength(length, headLength = length * 0.2, headWidth = headLength * 0.2) { - this.line.scale.set(1, Math.max(0.0001, length - headLength), 1); // see #17458 - - this.line.updateMatrix(); - this.cone.scale.set(headWidth, headLength, headWidth); - this.cone.position.y = length; - this.cone.updateMatrix(); - } - - setColor(color) { - this.line.material.color.set(color); - this.cone.material.color.set(color); - } - - copy(source) { - super.copy(source, false); - this.line.copy(source.line); - this.cone.copy(source.cone); - return this; - } - - } - - class AxesHelper extends LineSegments { - constructor(size = 1) { - const vertices = [0, 0, 0, size, 0, 0, 0, 0, 0, 0, size, 0, 0, 0, 0, 0, 0, size]; - const colors = [1, 0, 0, 1, 0.6, 0, 0, 1, 0, 0.6, 1, 0, 0, 0, 1, 0, 0.6, 1]; - const geometry = new BufferGeometry(); - geometry.setAttribute('position', new Float32BufferAttribute(vertices, 3)); - geometry.setAttribute('color', new Float32BufferAttribute(colors, 3)); - const material = new LineBasicMaterial({ - vertexColors: true, - toneMapped: false - }); - super(geometry, material); - this.type = 'AxesHelper'; - } - - setColors(xAxisColor, yAxisColor, zAxisColor) { - const color = new Color(); - const array = this.geometry.attributes.color.array; - color.set(xAxisColor); - color.toArray(array, 0); - color.toArray(array, 3); - color.set(yAxisColor); - color.toArray(array, 6); - color.toArray(array, 9); - color.set(zAxisColor); - color.toArray(array, 12); - color.toArray(array, 15); - this.geometry.attributes.color.needsUpdate = true; - return this; - } - - dispose() { - this.geometry.dispose(); - this.material.dispose(); - } - - } - - const _floatView = new Float32Array(1); - - const _int32View = new Int32Array(_floatView.buffer); - - class DataUtils { - // Converts float32 to float16 (stored as uint16 value). - static toHalfFloat(val) { - // Source: http://gamedev.stackexchange.com/questions/17326/conversion-of-a-number-from-single-precision-floating-point-representation-to-a/17410#17410 - - /* This method is faster than the OpenEXR implementation (very often - * used, eg. in Ogre), with the additional benefit of rounding, inspired - * by James Tursa?s half-precision code. */ - _floatView[0] = val; - const x = _int32View[0]; - let bits = x >> 16 & 0x8000; - /* Get the sign */ - - let m = x >> 12 & 0x07ff; - /* Keep one extra bit for rounding */ - - const e = x >> 23 & 0xff; - /* Using int is faster here */ - - /* If zero, or denormal, or exponent underflows too much for a denormal - * half, return signed zero. */ - - if (e < 103) return bits; - /* If NaN, return NaN. If Inf or exponent overflow, return Inf. */ - - if (e > 142) { - bits |= 0x7c00; - /* If exponent was 0xff and one mantissa bit was set, it means NaN, - * not Inf, so make sure we set one mantissa bit too. */ - - bits |= (e == 255 ? 0 : 1) && x & 0x007fffff; - return bits; - } - /* If exponent underflows but not too much, return a denormal */ - - - if (e < 113) { - m |= 0x0800; - /* Extra rounding may overflow and set mantissa to 0 and exponent - * to 1, which is OK. */ - - bits |= (m >> 114 - e) + (m >> 113 - e & 1); - return bits; - } - - bits |= e - 112 << 10 | m >> 1; - /* Extra rounding. An overflow will set mantissa to 0 and increment - * the exponent, which is OK. */ - - bits += m & 1; - return bits; - } - - } - - const LOD_MIN = 4; - const LOD_MAX = 8; - const SIZE_MAX = Math.pow(2, LOD_MAX); // The standard deviations (radians) associated with the extra mips. These are - // chosen to approximate a Trowbridge-Reitz distribution function times the - // geometric shadowing function. These sigma values squared must match the - // variance #defines in cube_uv_reflection_fragment.glsl.js. - - const EXTRA_LOD_SIGMA = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582]; - const TOTAL_LODS = LOD_MAX - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length; // The maximum length of the blur for loop. Smaller sigmas will use fewer - // samples and exit early, but not recompile the shader. - - const MAX_SAMPLES = 20; - const ENCODINGS = { - [LinearEncoding]: 0, - [sRGBEncoding]: 1, - [RGBEEncoding]: 2, - [RGBM7Encoding]: 3, - [RGBM16Encoding]: 4, - [RGBDEncoding]: 5, - [GammaEncoding]: 6 - }; - const backgroundMaterial = new MeshBasicMaterial({ - side: BackSide, - depthWrite: false, - depthTest: false - }); - const backgroundBox = new Mesh(new BoxGeometry(), backgroundMaterial); - - const _flatCamera = /*@__PURE__*/new OrthographicCamera(); - - const { - _lodPlanes, - _sizeLods, - _sigmas - } = /*@__PURE__*/_createPlanes(); - - const _clearColor = /*@__PURE__*/new Color(); - - let _oldTarget = null; // Golden Ratio - - const PHI = (1 + Math.sqrt(5)) / 2; - const INV_PHI = 1 / PHI; // Vertices of a dodecahedron (except the opposites, which represent the - // same axis), used as axis directions evenly spread on a sphere. - - const _axisDirections = [/*@__PURE__*/new Vector3(1, 1, 1), /*@__PURE__*/new Vector3(-1, 1, 1), /*@__PURE__*/new Vector3(1, 1, -1), /*@__PURE__*/new Vector3(-1, 1, -1), /*@__PURE__*/new Vector3(0, PHI, INV_PHI), /*@__PURE__*/new Vector3(0, PHI, -INV_PHI), /*@__PURE__*/new Vector3(INV_PHI, 0, PHI), /*@__PURE__*/new Vector3(-INV_PHI, 0, PHI), /*@__PURE__*/new Vector3(PHI, INV_PHI, 0), /*@__PURE__*/new Vector3(-PHI, INV_PHI, 0)]; - /** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * Paper: Fast, Accurate Image-Based Lighting - * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view - */ - - function convertLinearToRGBE(color) { - const maxComponent = Math.max(color.r, color.g, color.b); - const fExp = Math.min(Math.max(Math.ceil(Math.log2(maxComponent)), -128.0), 127.0); - color.multiplyScalar(Math.pow(2.0, -fExp)); - const alpha = (fExp + 128.0) / 255.0; - return alpha; - } - - class PMREMGenerator { - constructor(renderer) { - this._renderer = renderer; - this._pingPongRenderTarget = null; - this._blurMaterial = _getBlurShader(MAX_SAMPLES); - this._equirectShader = null; - this._cubemapShader = null; - - this._compileMaterial(this._blurMaterial); - } - /** - * Generates a PMREM from a supplied Scene, which can be faster than using an - * image if networking bandwidth is low. Optional sigma specifies a blur radius - * in radians to be applied to the scene before PMREM generation. Optional near - * and far planes ensure the scene is rendered in its entirety (the cubeCamera - * is placed at the origin). - */ - - - fromScene(scene, sigma = 0, near = 0.1, far = 100) { - _oldTarget = this._renderer.getRenderTarget(); - - const cubeUVRenderTarget = this._allocateTargets(); - - this._sceneToCubeUV(scene, near, far, cubeUVRenderTarget); - - if (sigma > 0) { - this._blur(cubeUVRenderTarget, 0, 0, sigma); - } - - this._applyPMREM(cubeUVRenderTarget); - - this._cleanup(cubeUVRenderTarget); - - return cubeUVRenderTarget; - } - /** - * Generates a PMREM from an equirectangular texture, which can be either LDR - * (RGBFormat) or HDR (RGBEFormat). The ideal input image size is 1k (1024 x 512), - * as this matches best with the 256 x 256 cubemap output. - */ - - - fromEquirectangular(equirectangular) { - return this._fromTexture(equirectangular); - } - /** - * Generates a PMREM from an cubemap texture, which can be either LDR - * (RGBFormat) or HDR (RGBEFormat). The ideal input cube size is 256 x 256, - * as this matches best with the 256 x 256 cubemap output. - */ - - - fromCubemap(cubemap) { - return this._fromTexture(cubemap); - } - /** - * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - - - compileCubemapShader() { - if (this._cubemapShader === null) { - this._cubemapShader = _getCubemapShader(); - - this._compileMaterial(this._cubemapShader); - } - } - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - - - compileEquirectangularShader() { - if (this._equirectShader === null) { - this._equirectShader = _getEquirectShader(); - - this._compileMaterial(this._equirectShader); - } - } - /** - * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, - * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on - * one of them will cause any others to also become unusable. - */ - - - dispose() { - this._blurMaterial.dispose(); - - if (this._cubemapShader !== null) this._cubemapShader.dispose(); - if (this._equirectShader !== null) this._equirectShader.dispose(); - - for (let i = 0; i < _lodPlanes.length; i++) { - _lodPlanes[i].dispose(); - } - } // private interface - - - _cleanup(outputTarget) { - this._pingPongRenderTarget.dispose(); - - this._renderer.setRenderTarget(_oldTarget); - - outputTarget.scissorTest = false; - - _setViewport(outputTarget, 0, 0, outputTarget.width, outputTarget.height); - } - - _fromTexture(texture) { - _oldTarget = this._renderer.getRenderTarget(); - - const cubeUVRenderTarget = this._allocateTargets(texture); - - this._textureToCubeUV(texture, cubeUVRenderTarget); - - this._applyPMREM(cubeUVRenderTarget); - - this._cleanup(cubeUVRenderTarget); - - return cubeUVRenderTarget; - } - - _allocateTargets(texture) { - // warning: null texture is valid - const params = { - magFilter: NearestFilter, - minFilter: NearestFilter, - generateMipmaps: false, - type: UnsignedByteType, - format: RGBEFormat, - encoding: _isLDR(texture) ? texture.encoding : RGBEEncoding, - depthBuffer: false - }; - - const cubeUVRenderTarget = _createRenderTarget(params); - - cubeUVRenderTarget.depthBuffer = texture ? false : true; - this._pingPongRenderTarget = _createRenderTarget(params); - return cubeUVRenderTarget; - } - - _compileMaterial(material) { - const tmpMesh = new Mesh(_lodPlanes[0], material); - - this._renderer.compile(tmpMesh, _flatCamera); - } - - _sceneToCubeUV(scene, near, far, cubeUVRenderTarget) { - const fov = 90; - const aspect = 1; - const cubeCamera = new PerspectiveCamera(fov, aspect, near, far); - const upSign = [1, -1, 1, 1, 1, 1]; - const forwardSign = [1, 1, 1, -1, -1, -1]; - const renderer = this._renderer; - const originalAutoClear = renderer.autoClear; - const outputEncoding = renderer.outputEncoding; - const toneMapping = renderer.toneMapping; - renderer.getClearColor(_clearColor); - renderer.toneMapping = NoToneMapping; - renderer.outputEncoding = LinearEncoding; - renderer.autoClear = false; - let useSolidColor = false; - const background = scene.background; - - if (background) { - if (background.isColor) { - backgroundMaterial.color.copy(background).convertSRGBToLinear(); - scene.background = null; - const alpha = convertLinearToRGBE(backgroundMaterial.color); - backgroundMaterial.opacity = alpha; - useSolidColor = true; - } - } else { - backgroundMaterial.color.copy(_clearColor).convertSRGBToLinear(); - const alpha = convertLinearToRGBE(backgroundMaterial.color); - backgroundMaterial.opacity = alpha; - useSolidColor = true; - } - - for (let i = 0; i < 6; i++) { - const col = i % 3; - - if (col == 0) { - cubeCamera.up.set(0, upSign[i], 0); - cubeCamera.lookAt(forwardSign[i], 0, 0); - } else if (col == 1) { - cubeCamera.up.set(0, 0, upSign[i]); - cubeCamera.lookAt(0, forwardSign[i], 0); - } else { - cubeCamera.up.set(0, upSign[i], 0); - cubeCamera.lookAt(0, 0, forwardSign[i]); - } - - _setViewport(cubeUVRenderTarget, col * SIZE_MAX, i > 2 ? SIZE_MAX : 0, SIZE_MAX, SIZE_MAX); - - renderer.setRenderTarget(cubeUVRenderTarget); - - if (useSolidColor) { - renderer.render(backgroundBox, cubeCamera); - } - - renderer.render(scene, cubeCamera); - } - - renderer.toneMapping = toneMapping; - renderer.outputEncoding = outputEncoding; - renderer.autoClear = originalAutoClear; - } - - _textureToCubeUV(texture, cubeUVRenderTarget) { - const renderer = this._renderer; - - if (texture.isCubeTexture) { - if (this._cubemapShader == null) { - this._cubemapShader = _getCubemapShader(); - } - } else { - if (this._equirectShader == null) { - this._equirectShader = _getEquirectShader(); - } - } - - const material = texture.isCubeTexture ? this._cubemapShader : this._equirectShader; - const mesh = new Mesh(_lodPlanes[0], material); - const uniforms = material.uniforms; - uniforms['envMap'].value = texture; - - if (!texture.isCubeTexture) { - uniforms['texelSize'].value.set(1.0 / texture.image.width, 1.0 / texture.image.height); - } - - uniforms['inputEncoding'].value = ENCODINGS[texture.encoding]; - uniforms['outputEncoding'].value = ENCODINGS[cubeUVRenderTarget.texture.encoding]; - - _setViewport(cubeUVRenderTarget, 0, 0, 3 * SIZE_MAX, 2 * SIZE_MAX); - - renderer.setRenderTarget(cubeUVRenderTarget); - renderer.render(mesh, _flatCamera); - } - - _applyPMREM(cubeUVRenderTarget) { - const renderer = this._renderer; - const autoClear = renderer.autoClear; - renderer.autoClear = false; - - for (let i = 1; i < TOTAL_LODS; i++) { - const sigma = Math.sqrt(_sigmas[i] * _sigmas[i] - _sigmas[i - 1] * _sigmas[i - 1]); - const poleAxis = _axisDirections[(i - 1) % _axisDirections.length]; - - this._blur(cubeUVRenderTarget, i - 1, i, sigma, poleAxis); - } - - renderer.autoClear = autoClear; - } - /** - * This is a two-pass Gaussian blur for a cubemap. Normally this is done - * vertically and horizontally, but this breaks down on a cube. Here we apply - * the blur latitudinally (around the poles), and then longitudinally (towards - * the poles) to approximate the orthogonally-separable blur. It is least - * accurate at the poles, but still does a decent job. - */ - - - _blur(cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis) { - const pingPongRenderTarget = this._pingPongRenderTarget; - - this._halfBlur(cubeUVRenderTarget, pingPongRenderTarget, lodIn, lodOut, sigma, 'latitudinal', poleAxis); - - this._halfBlur(pingPongRenderTarget, cubeUVRenderTarget, lodOut, lodOut, sigma, 'longitudinal', poleAxis); - } - - _halfBlur(targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis) { - const renderer = this._renderer; - const blurMaterial = this._blurMaterial; - - if (direction !== 'latitudinal' && direction !== 'longitudinal') { - console.error('blur direction must be either latitudinal or longitudinal!'); - } // Number of standard deviations at which to cut off the discrete approximation. - - - const STANDARD_DEVIATIONS = 3; - const blurMesh = new Mesh(_lodPlanes[lodOut], blurMaterial); - const blurUniforms = blurMaterial.uniforms; - const pixels = _sizeLods[lodIn] - 1; - const radiansPerPixel = isFinite(sigmaRadians) ? Math.PI / (2 * pixels) : 2 * Math.PI / (2 * MAX_SAMPLES - 1); - const sigmaPixels = sigmaRadians / radiansPerPixel; - const samples = isFinite(sigmaRadians) ? 1 + Math.floor(STANDARD_DEVIATIONS * sigmaPixels) : MAX_SAMPLES; - - if (samples > MAX_SAMPLES) { - console.warn(`sigmaRadians, ${sigmaRadians}, is too large and will clip, as it requested ${samples} samples when the maximum is set to ${MAX_SAMPLES}`); - } - - const weights = []; - let sum = 0; - - for (let i = 0; i < MAX_SAMPLES; ++i) { - const x = i / sigmaPixels; - const weight = Math.exp(-x * x / 2); - weights.push(weight); - - if (i == 0) { - sum += weight; - } else if (i < samples) { - sum += 2 * weight; - } - } - - for (let i = 0; i < weights.length; i++) { - weights[i] = weights[i] / sum; - } - - blurUniforms['envMap'].value = targetIn.texture; - blurUniforms['samples'].value = samples; - blurUniforms['weights'].value = weights; - blurUniforms['latitudinal'].value = direction === 'latitudinal'; - - if (poleAxis) { - blurUniforms['poleAxis'].value = poleAxis; - } - - blurUniforms['dTheta'].value = radiansPerPixel; - blurUniforms['mipInt'].value = LOD_MAX - lodIn; - blurUniforms['inputEncoding'].value = ENCODINGS[targetIn.texture.encoding]; - blurUniforms['outputEncoding'].value = ENCODINGS[targetIn.texture.encoding]; - const outputSize = _sizeLods[lodOut]; - const x = 3 * Math.max(0, SIZE_MAX - 2 * outputSize); - const y = (lodOut === 0 ? 0 : 2 * SIZE_MAX) + 2 * outputSize * (lodOut > LOD_MAX - LOD_MIN ? lodOut - LOD_MAX + LOD_MIN : 0); - - _setViewport(targetOut, x, y, 3 * outputSize, 2 * outputSize); - - renderer.setRenderTarget(targetOut); - renderer.render(blurMesh, _flatCamera); - } - - } - - function _isLDR(texture) { - if (texture === undefined || texture.type !== UnsignedByteType) return false; - return texture.encoding === LinearEncoding || texture.encoding === sRGBEncoding || texture.encoding === GammaEncoding; - } - - function _createPlanes() { - const _lodPlanes = []; - const _sizeLods = []; - const _sigmas = []; - let lod = LOD_MAX; - - for (let i = 0; i < TOTAL_LODS; i++) { - const sizeLod = Math.pow(2, lod); - - _sizeLods.push(sizeLod); - - let sigma = 1.0 / sizeLod; - - if (i > LOD_MAX - LOD_MIN) { - sigma = EXTRA_LOD_SIGMA[i - LOD_MAX + LOD_MIN - 1]; - } else if (i == 0) { - sigma = 0; - } - - _sigmas.push(sigma); - - const texelSize = 1.0 / (sizeLod - 1); - const min = -texelSize / 2; - const max = 1 + texelSize / 2; - const uv1 = [min, min, max, min, max, max, min, min, max, max, min, max]; - const cubeFaces = 6; - const vertices = 6; - const positionSize = 3; - const uvSize = 2; - const faceIndexSize = 1; - const position = new Float32Array(positionSize * vertices * cubeFaces); - const uv = new Float32Array(uvSize * vertices * cubeFaces); - const faceIndex = new Float32Array(faceIndexSize * vertices * cubeFaces); - - for (let face = 0; face < cubeFaces; face++) { - const x = face % 3 * 2 / 3 - 1; - const y = face > 2 ? 0 : -1; - const coordinates = [x, y, 0, x + 2 / 3, y, 0, x + 2 / 3, y + 1, 0, x, y, 0, x + 2 / 3, y + 1, 0, x, y + 1, 0]; - position.set(coordinates, positionSize * vertices * face); - uv.set(uv1, uvSize * vertices * face); - const fill = [face, face, face, face, face, face]; - faceIndex.set(fill, faceIndexSize * vertices * face); - } - - const planes = new BufferGeometry(); - planes.setAttribute('position', new BufferAttribute(position, positionSize)); - planes.setAttribute('uv', new BufferAttribute(uv, uvSize)); - planes.setAttribute('faceIndex', new BufferAttribute(faceIndex, faceIndexSize)); - - _lodPlanes.push(planes); - - if (lod > LOD_MIN) { - lod--; - } - } - - return { - _lodPlanes, - _sizeLods, - _sigmas - }; - } - - function _createRenderTarget(params) { - const cubeUVRenderTarget = new WebGLRenderTarget(3 * SIZE_MAX, 3 * SIZE_MAX, params); - cubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping; - cubeUVRenderTarget.texture.name = 'PMREM.cubeUv'; - cubeUVRenderTarget.scissorTest = true; - return cubeUVRenderTarget; - } - - function _setViewport(target, x, y, width, height) { - target.viewport.set(x, y, width, height); - target.scissor.set(x, y, width, height); - } - - function _getBlurShader(maxSamples) { - const weights = new Float32Array(maxSamples); - const poleAxis = new Vector3(0, 1, 0); - const shaderMaterial = new RawShaderMaterial({ - name: 'SphericalGaussianBlur', - defines: { - 'n': maxSamples - }, - uniforms: { - 'envMap': { - value: null - }, - 'samples': { - value: 1 - }, - 'weights': { - value: weights - }, - 'latitudinal': { - value: false - }, - 'dTheta': { - value: 0 - }, - 'mipInt': { - value: 0 - }, - 'poleAxis': { - value: poleAxis - }, - 'inputEncoding': { - value: ENCODINGS[LinearEncoding] - }, - 'outputEncoding': { - value: ENCODINGS[LinearEncoding] - } - }, - vertexShader: _getCommonVertexShader(), - fragmentShader: - /* glsl */ - ` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - ${_getEncodings()} - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `, - blending: NoBlending, - depthTest: false, - depthWrite: false - }); - return shaderMaterial; - } - - function _getEquirectShader() { - const texelSize = new Vector2(1, 1); - const shaderMaterial = new RawShaderMaterial({ - name: 'EquirectangularToCubeUV', - uniforms: { - 'envMap': { - value: null - }, - 'texelSize': { - value: texelSize - }, - 'inputEncoding': { - value: ENCODINGS[LinearEncoding] - }, - 'outputEncoding': { - value: ENCODINGS[LinearEncoding] - } - }, - vertexShader: _getCommonVertexShader(), - fragmentShader: - /* glsl */ - ` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform vec2 texelSize; - - ${_getEncodings()} - - #include - - void main() { - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - vec2 f = fract( uv / texelSize - 0.5 ); - uv -= f * texelSize; - vec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.x += texelSize.x; - vec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.y += texelSize.y; - vec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.x -= texelSize.x; - vec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - - vec3 tm = mix( tl, tr, f.x ); - vec3 bm = mix( bl, br, f.x ); - gl_FragColor.rgb = mix( tm, bm, f.y ); - - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `, - blending: NoBlending, - depthTest: false, - depthWrite: false - }); - return shaderMaterial; - } - - function _getCubemapShader() { - const shaderMaterial = new RawShaderMaterial({ - name: 'CubemapToCubeUV', - uniforms: { - 'envMap': { - value: null - }, - 'inputEncoding': { - value: ENCODINGS[LinearEncoding] - }, - 'outputEncoding': { - value: ENCODINGS[LinearEncoding] - } - }, - vertexShader: _getCommonVertexShader(), - fragmentShader: - /* glsl */ - ` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - ${_getEncodings()} - - void main() { - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb; - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `, - blending: NoBlending, - depthTest: false, - depthWrite: false - }); - return shaderMaterial; - } - - function _getCommonVertexShader() { - return ( - /* glsl */ - ` - - precision mediump float; - precision mediump int; - - attribute vec3 position; - attribute vec2 uv; - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - ` - ); - } - - function _getEncodings() { - return ( - /* glsl */ - ` - - uniform int inputEncoding; - uniform int outputEncoding; - - #include - - vec4 inputTexelToLinear( vec4 value ) { - - if ( inputEncoding == 0 ) { - - return value; - - } else if ( inputEncoding == 1 ) { - - return sRGBToLinear( value ); - - } else if ( inputEncoding == 2 ) { - - return RGBEToLinear( value ); - - } else if ( inputEncoding == 3 ) { - - return RGBMToLinear( value, 7.0 ); - - } else if ( inputEncoding == 4 ) { - - return RGBMToLinear( value, 16.0 ); - - } else if ( inputEncoding == 5 ) { - - return RGBDToLinear( value, 256.0 ); - - } else { - - return GammaToLinear( value, 2.2 ); - - } - - } - - vec4 linearToOutputTexel( vec4 value ) { - - if ( outputEncoding == 0 ) { - - return value; - - } else if ( outputEncoding == 1 ) { - - return LinearTosRGB( value ); - - } else if ( outputEncoding == 2 ) { - - return LinearToRGBE( value ); - - } else if ( outputEncoding == 3 ) { - - return LinearToRGBM( value, 7.0 ); - - } else if ( outputEncoding == 4 ) { - - return LinearToRGBM( value, 16.0 ); - - } else if ( outputEncoding == 5 ) { - - return LinearToRGBD( value, 256.0 ); - - } else { - - return LinearToGamma( value, 2.2 ); - - } - - } - - vec4 envMapTexelToLinear( vec4 color ) { - - return inputTexelToLinear( color ); - - } - ` - ); - } - - const LineStrip = 0; - const LinePieces = 1; - const NoColors = 0; - const FaceColors = 1; - const VertexColors = 2; - function MeshFaceMaterial(materials) { - console.warn('THREE.MeshFaceMaterial has been removed. Use an Array instead.'); - return materials; - } - function MultiMaterial(materials = []) { - console.warn('THREE.MultiMaterial has been removed. Use an Array instead.'); - materials.isMultiMaterial = true; - materials.materials = materials; - - materials.clone = function () { - return materials.slice(); - }; - - return materials; - } - function PointCloud(geometry, material) { - console.warn('THREE.PointCloud has been renamed to THREE.Points.'); - return new Points(geometry, material); - } - function Particle(material) { - console.warn('THREE.Particle has been renamed to THREE.Sprite.'); - return new Sprite(material); - } - function ParticleSystem(geometry, material) { - console.warn('THREE.ParticleSystem has been renamed to THREE.Points.'); - return new Points(geometry, material); - } - function PointCloudMaterial(parameters) { - console.warn('THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.'); - return new PointsMaterial(parameters); - } - function ParticleBasicMaterial(parameters) { - console.warn('THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.'); - return new PointsMaterial(parameters); - } - function ParticleSystemMaterial(parameters) { - console.warn('THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.'); - return new PointsMaterial(parameters); - } - function Vertex(x, y, z) { - console.warn('THREE.Vertex has been removed. Use THREE.Vector3 instead.'); - return new Vector3(x, y, z); - } // - - function DynamicBufferAttribute(array, itemSize) { - console.warn('THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead.'); - return new BufferAttribute(array, itemSize).setUsage(DynamicDrawUsage); - } - function Int8Attribute(array, itemSize) { - console.warn('THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.'); - return new Int8BufferAttribute(array, itemSize); - } - function Uint8Attribute(array, itemSize) { - console.warn('THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.'); - return new Uint8BufferAttribute(array, itemSize); - } - function Uint8ClampedAttribute(array, itemSize) { - console.warn('THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.'); - return new Uint8ClampedBufferAttribute(array, itemSize); - } - function Int16Attribute(array, itemSize) { - console.warn('THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.'); - return new Int16BufferAttribute(array, itemSize); - } - function Uint16Attribute(array, itemSize) { - console.warn('THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.'); - return new Uint16BufferAttribute(array, itemSize); - } - function Int32Attribute(array, itemSize) { - console.warn('THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.'); - return new Int32BufferAttribute(array, itemSize); - } - function Uint32Attribute(array, itemSize) { - console.warn('THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.'); - return new Uint32BufferAttribute(array, itemSize); - } - function Float32Attribute(array, itemSize) { - console.warn('THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.'); - return new Float32BufferAttribute(array, itemSize); - } - function Float64Attribute(array, itemSize) { - console.warn('THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.'); - return new Float64BufferAttribute(array, itemSize); - } // - - Curve.create = function (construct, getPoint) { - console.log('THREE.Curve.create() has been deprecated'); - construct.prototype = Object.create(Curve.prototype); - construct.prototype.constructor = construct; - construct.prototype.getPoint = getPoint; - return construct; - }; // - - - Path.prototype.fromPoints = function (points) { - console.warn('THREE.Path: .fromPoints() has been renamed to .setFromPoints().'); - return this.setFromPoints(points); - }; // - - - function AxisHelper(size) { - console.warn('THREE.AxisHelper has been renamed to THREE.AxesHelper.'); - return new AxesHelper(size); - } - function BoundingBoxHelper(object, color) { - console.warn('THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.'); - return new BoxHelper(object, color); - } - function EdgesHelper(object, hex) { - console.warn('THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.'); - return new LineSegments(new EdgesGeometry(object.geometry), new LineBasicMaterial({ - color: hex !== undefined ? hex : 0xffffff - })); - } - - GridHelper.prototype.setColors = function () { - console.error('THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.'); - }; - - SkeletonHelper.prototype.update = function () { - console.error('THREE.SkeletonHelper: update() no longer needs to be called.'); - }; - - function WireframeHelper(object, hex) { - console.warn('THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.'); - return new LineSegments(new WireframeGeometry(object.geometry), new LineBasicMaterial({ - color: hex !== undefined ? hex : 0xffffff - })); - } // - - Loader.prototype.extractUrlBase = function (url) { - console.warn('THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.'); - return LoaderUtils.extractUrlBase(url); - }; - - Loader.Handlers = { - add: function () - /* regex, loader */ - { - console.error('THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.'); - }, - get: function () - /* file */ - { - console.error('THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.'); - } - }; - function XHRLoader(manager) { - console.warn('THREE.XHRLoader has been renamed to THREE.FileLoader.'); - return new FileLoader(manager); - } - function BinaryTextureLoader(manager) { - console.warn('THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.'); - return new DataTextureLoader(manager); - } // - - Box2.prototype.center = function (optionalTarget) { - console.warn('THREE.Box2: .center() has been renamed to .getCenter().'); - return this.getCenter(optionalTarget); - }; - - Box2.prototype.empty = function () { - console.warn('THREE.Box2: .empty() has been renamed to .isEmpty().'); - return this.isEmpty(); - }; - - Box2.prototype.isIntersectionBox = function (box) { - console.warn('THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().'); - return this.intersectsBox(box); - }; - - Box2.prototype.size = function (optionalTarget) { - console.warn('THREE.Box2: .size() has been renamed to .getSize().'); - return this.getSize(optionalTarget); - }; // - - - Box3.prototype.center = function (optionalTarget) { - console.warn('THREE.Box3: .center() has been renamed to .getCenter().'); - return this.getCenter(optionalTarget); - }; - - Box3.prototype.empty = function () { - console.warn('THREE.Box3: .empty() has been renamed to .isEmpty().'); - return this.isEmpty(); - }; - - Box3.prototype.isIntersectionBox = function (box) { - console.warn('THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().'); - return this.intersectsBox(box); - }; - - Box3.prototype.isIntersectionSphere = function (sphere) { - console.warn('THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().'); - return this.intersectsSphere(sphere); - }; - - Box3.prototype.size = function (optionalTarget) { - console.warn('THREE.Box3: .size() has been renamed to .getSize().'); - return this.getSize(optionalTarget); - }; // - - - Sphere.prototype.empty = function () { - console.warn('THREE.Sphere: .empty() has been renamed to .isEmpty().'); - return this.isEmpty(); - }; // - - - Frustum.prototype.setFromMatrix = function (m) { - console.warn('THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().'); - return this.setFromProjectionMatrix(m); - }; // - - - Line3.prototype.center = function (optionalTarget) { - console.warn('THREE.Line3: .center() has been renamed to .getCenter().'); - return this.getCenter(optionalTarget); - }; // - - - Matrix3.prototype.flattenToArrayOffset = function (array, offset) { - console.warn('THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.'); - return this.toArray(array, offset); - }; - - Matrix3.prototype.multiplyVector3 = function (vector) { - console.warn('THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.'); - return vector.applyMatrix3(this); - }; - - Matrix3.prototype.multiplyVector3Array = function () - /* a */ - { - console.error('THREE.Matrix3: .multiplyVector3Array() has been removed.'); - }; - - Matrix3.prototype.applyToBufferAttribute = function (attribute) { - console.warn('THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.'); - return attribute.applyMatrix3(this); - }; - - Matrix3.prototype.applyToVector3Array = function () - /* array, offset, length */ - { - console.error('THREE.Matrix3: .applyToVector3Array() has been removed.'); - }; - - Matrix3.prototype.getInverse = function (matrix) { - console.warn('THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.'); - return this.copy(matrix).invert(); - }; // - - - Matrix4.prototype.extractPosition = function (m) { - console.warn('THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().'); - return this.copyPosition(m); - }; - - Matrix4.prototype.flattenToArrayOffset = function (array, offset) { - console.warn('THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.'); - return this.toArray(array, offset); - }; - - Matrix4.prototype.getPosition = function () { - console.warn('THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.'); - return new Vector3().setFromMatrixColumn(this, 3); - }; - - Matrix4.prototype.setRotationFromQuaternion = function (q) { - console.warn('THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().'); - return this.makeRotationFromQuaternion(q); - }; - - Matrix4.prototype.multiplyToArray = function () { - console.warn('THREE.Matrix4: .multiplyToArray() has been removed.'); - }; - - Matrix4.prototype.multiplyVector3 = function (vector) { - console.warn('THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.'); - return vector.applyMatrix4(this); - }; - - Matrix4.prototype.multiplyVector4 = function (vector) { - console.warn('THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.'); - return vector.applyMatrix4(this); - }; - - Matrix4.prototype.multiplyVector3Array = function () - /* a */ - { - console.error('THREE.Matrix4: .multiplyVector3Array() has been removed.'); - }; - - Matrix4.prototype.rotateAxis = function (v) { - console.warn('THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.'); - v.transformDirection(this); - }; - - Matrix4.prototype.crossVector = function (vector) { - console.warn('THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.'); - return vector.applyMatrix4(this); - }; - - Matrix4.prototype.translate = function () { - console.error('THREE.Matrix4: .translate() has been removed.'); - }; - - Matrix4.prototype.rotateX = function () { - console.error('THREE.Matrix4: .rotateX() has been removed.'); - }; - - Matrix4.prototype.rotateY = function () { - console.error('THREE.Matrix4: .rotateY() has been removed.'); - }; - - Matrix4.prototype.rotateZ = function () { - console.error('THREE.Matrix4: .rotateZ() has been removed.'); - }; - - Matrix4.prototype.rotateByAxis = function () { - console.error('THREE.Matrix4: .rotateByAxis() has been removed.'); - }; - - Matrix4.prototype.applyToBufferAttribute = function (attribute) { - console.warn('THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.'); - return attribute.applyMatrix4(this); - }; - - Matrix4.prototype.applyToVector3Array = function () - /* array, offset, length */ - { - console.error('THREE.Matrix4: .applyToVector3Array() has been removed.'); - }; - - Matrix4.prototype.makeFrustum = function (left, right, bottom, top, near, far) { - console.warn('THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.'); - return this.makePerspective(left, right, top, bottom, near, far); - }; - - Matrix4.prototype.getInverse = function (matrix) { - console.warn('THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.'); - return this.copy(matrix).invert(); - }; // - - - Plane.prototype.isIntersectionLine = function (line) { - console.warn('THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().'); - return this.intersectsLine(line); - }; // - - - Quaternion.prototype.multiplyVector3 = function (vector) { - console.warn('THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.'); - return vector.applyQuaternion(this); - }; - - Quaternion.prototype.inverse = function () { - console.warn('THREE.Quaternion: .inverse() has been renamed to invert().'); - return this.invert(); - }; // - - - Ray.prototype.isIntersectionBox = function (box) { - console.warn('THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().'); - return this.intersectsBox(box); - }; - - Ray.prototype.isIntersectionPlane = function (plane) { - console.warn('THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().'); - return this.intersectsPlane(plane); - }; - - Ray.prototype.isIntersectionSphere = function (sphere) { - console.warn('THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().'); - return this.intersectsSphere(sphere); - }; // - - - Triangle.prototype.area = function () { - console.warn('THREE.Triangle: .area() has been renamed to .getArea().'); - return this.getArea(); - }; - - Triangle.prototype.barycoordFromPoint = function (point, target) { - console.warn('THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().'); - return this.getBarycoord(point, target); - }; - - Triangle.prototype.midpoint = function (target) { - console.warn('THREE.Triangle: .midpoint() has been renamed to .getMidpoint().'); - return this.getMidpoint(target); - }; - - Triangle.prototypenormal = function (target) { - console.warn('THREE.Triangle: .normal() has been renamed to .getNormal().'); - return this.getNormal(target); - }; - - Triangle.prototype.plane = function (target) { - console.warn('THREE.Triangle: .plane() has been renamed to .getPlane().'); - return this.getPlane(target); - }; - - Triangle.barycoordFromPoint = function (point, a, b, c, target) { - console.warn('THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().'); - return Triangle.getBarycoord(point, a, b, c, target); - }; - - Triangle.normal = function (a, b, c, target) { - console.warn('THREE.Triangle: .normal() has been renamed to .getNormal().'); - return Triangle.getNormal(a, b, c, target); - }; // - - - Shape.prototype.extractAllPoints = function (divisions) { - console.warn('THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.'); - return this.extractPoints(divisions); - }; - - Shape.prototype.extrude = function (options) { - console.warn('THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.'); - return new ExtrudeGeometry(this, options); - }; - - Shape.prototype.makeGeometry = function (options) { - console.warn('THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.'); - return new ShapeGeometry(this, options); - }; // - - - Vector2.prototype.fromAttribute = function (attribute, index, offset) { - console.warn('THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().'); - return this.fromBufferAttribute(attribute, index, offset); - }; - - Vector2.prototype.distanceToManhattan = function (v) { - console.warn('THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().'); - return this.manhattanDistanceTo(v); - }; - - Vector2.prototype.lengthManhattan = function () { - console.warn('THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().'); - return this.manhattanLength(); - }; // - - - Vector3.prototype.setEulerFromRotationMatrix = function () { - console.error('THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.'); - }; - - Vector3.prototype.setEulerFromQuaternion = function () { - console.error('THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.'); - }; - - Vector3.prototype.getPositionFromMatrix = function (m) { - console.warn('THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().'); - return this.setFromMatrixPosition(m); - }; - - Vector3.prototype.getScaleFromMatrix = function (m) { - console.warn('THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().'); - return this.setFromMatrixScale(m); - }; - - Vector3.prototype.getColumnFromMatrix = function (index, matrix) { - console.warn('THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().'); - return this.setFromMatrixColumn(matrix, index); - }; - - Vector3.prototype.applyProjection = function (m) { - console.warn('THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.'); - return this.applyMatrix4(m); - }; - - Vector3.prototype.fromAttribute = function (attribute, index, offset) { - console.warn('THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().'); - return this.fromBufferAttribute(attribute, index, offset); - }; - - Vector3.prototype.distanceToManhattan = function (v) { - console.warn('THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().'); - return this.manhattanDistanceTo(v); - }; - - Vector3.prototype.lengthManhattan = function () { - console.warn('THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().'); - return this.manhattanLength(); - }; // - - - Vector4.prototype.fromAttribute = function (attribute, index, offset) { - console.warn('THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().'); - return this.fromBufferAttribute(attribute, index, offset); - }; - - Vector4.prototype.lengthManhattan = function () { - console.warn('THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().'); - return this.manhattanLength(); - }; // - - - Object3D.prototype.getChildByName = function (name) { - console.warn('THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().'); - return this.getObjectByName(name); - }; - - Object3D.prototype.renderDepth = function () { - console.warn('THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.'); - }; - - Object3D.prototype.translate = function (distance, axis) { - console.warn('THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.'); - return this.translateOnAxis(axis, distance); - }; - - Object3D.prototype.getWorldRotation = function () { - console.error('THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.'); - }; - - Object3D.prototype.applyMatrix = function (matrix) { - console.warn('THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().'); - return this.applyMatrix4(matrix); - }; - - Object.defineProperties(Object3D.prototype, { - eulerOrder: { - get: function () { - console.warn('THREE.Object3D: .eulerOrder is now .rotation.order.'); - return this.rotation.order; - }, - set: function (value) { - console.warn('THREE.Object3D: .eulerOrder is now .rotation.order.'); - this.rotation.order = value; - } - }, - useQuaternion: { - get: function () { - console.warn('THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.'); - }, - set: function () { - console.warn('THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.'); - } - } - }); - - Mesh.prototype.setDrawMode = function () { - console.error('THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.'); - }; - - Object.defineProperties(Mesh.prototype, { - drawMode: { - get: function () { - console.error('THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.'); - return TrianglesDrawMode; - }, - set: function () { - console.error('THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.'); - } - } - }); - - SkinnedMesh.prototype.initBones = function () { - console.error('THREE.SkinnedMesh: initBones() has been removed.'); - }; // - - - PerspectiveCamera.prototype.setLens = function (focalLength, filmGauge) { - console.warn('THREE.PerspectiveCamera.setLens is deprecated. ' + 'Use .setFocalLength and .filmGauge for a photographic setup.'); - if (filmGauge !== undefined) this.filmGauge = filmGauge; - this.setFocalLength(focalLength); - }; // - - - Object.defineProperties(Light.prototype, { - onlyShadow: { - set: function () { - console.warn('THREE.Light: .onlyShadow has been removed.'); - } - }, - shadowCameraFov: { - set: function (value) { - console.warn('THREE.Light: .shadowCameraFov is now .shadow.camera.fov.'); - this.shadow.camera.fov = value; - } - }, - shadowCameraLeft: { - set: function (value) { - console.warn('THREE.Light: .shadowCameraLeft is now .shadow.camera.left.'); - this.shadow.camera.left = value; - } - }, - shadowCameraRight: { - set: function (value) { - console.warn('THREE.Light: .shadowCameraRight is now .shadow.camera.right.'); - this.shadow.camera.right = value; - } - }, - shadowCameraTop: { - set: function (value) { - console.warn('THREE.Light: .shadowCameraTop is now .shadow.camera.top.'); - this.shadow.camera.top = value; - } - }, - shadowCameraBottom: { - set: function (value) { - console.warn('THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.'); - this.shadow.camera.bottom = value; - } - }, - shadowCameraNear: { - set: function (value) { - console.warn('THREE.Light: .shadowCameraNear is now .shadow.camera.near.'); - this.shadow.camera.near = value; - } - }, - shadowCameraFar: { - set: function (value) { - console.warn('THREE.Light: .shadowCameraFar is now .shadow.camera.far.'); - this.shadow.camera.far = value; - } - }, - shadowCameraVisible: { - set: function () { - console.warn('THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.'); - } - }, - shadowBias: { - set: function (value) { - console.warn('THREE.Light: .shadowBias is now .shadow.bias.'); - this.shadow.bias = value; - } - }, - shadowDarkness: { - set: function () { - console.warn('THREE.Light: .shadowDarkness has been removed.'); - } - }, - shadowMapWidth: { - set: function (value) { - console.warn('THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.'); - this.shadow.mapSize.width = value; - } - }, - shadowMapHeight: { - set: function (value) { - console.warn('THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.'); - this.shadow.mapSize.height = value; - } - } - }); // - - Object.defineProperties(BufferAttribute.prototype, { - length: { - get: function () { - console.warn('THREE.BufferAttribute: .length has been deprecated. Use .count instead.'); - return this.array.length; - } - }, - dynamic: { - get: function () { - console.warn('THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.'); - return this.usage === DynamicDrawUsage; - }, - set: function () - /* value */ - { - console.warn('THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.'); - this.setUsage(DynamicDrawUsage); - } - } - }); - - BufferAttribute.prototype.setDynamic = function (value) { - console.warn('THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.'); - this.setUsage(value === true ? DynamicDrawUsage : StaticDrawUsage); - return this; - }; - - BufferAttribute.prototype.copyIndicesArray = function () - /* indices */ - { - console.error('THREE.BufferAttribute: .copyIndicesArray() has been removed.'); - }, BufferAttribute.prototype.setArray = function () - /* array */ - { - console.error('THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers'); - }; // - - BufferGeometry.prototype.addIndex = function (index) { - console.warn('THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().'); - this.setIndex(index); - }; - - BufferGeometry.prototype.addAttribute = function (name, attribute) { - console.warn('THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().'); - - if (!(attribute && attribute.isBufferAttribute) && !(attribute && attribute.isInterleavedBufferAttribute)) { - console.warn('THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).'); - return this.setAttribute(name, new BufferAttribute(arguments[1], arguments[2])); - } - - if (name === 'index') { - console.warn('THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.'); - this.setIndex(attribute); - return this; - } - - return this.setAttribute(name, attribute); - }; - - BufferGeometry.prototype.addDrawCall = function (start, count, indexOffset) { - if (indexOffset !== undefined) { - console.warn('THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.'); - } - - console.warn('THREE.BufferGeometry: .addDrawCall() is now .addGroup().'); - this.addGroup(start, count); - }; - - BufferGeometry.prototype.clearDrawCalls = function () { - console.warn('THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().'); - this.clearGroups(); - }; - - BufferGeometry.prototype.computeOffsets = function () { - console.warn('THREE.BufferGeometry: .computeOffsets() has been removed.'); - }; - - BufferGeometry.prototype.removeAttribute = function (name) { - console.warn('THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute().'); - return this.deleteAttribute(name); - }; - - BufferGeometry.prototype.applyMatrix = function (matrix) { - console.warn('THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().'); - return this.applyMatrix4(matrix); - }; - - Object.defineProperties(BufferGeometry.prototype, { - drawcalls: { - get: function () { - console.error('THREE.BufferGeometry: .drawcalls has been renamed to .groups.'); - return this.groups; - } - }, - offsets: { - get: function () { - console.warn('THREE.BufferGeometry: .offsets has been renamed to .groups.'); - return this.groups; - } - } - }); - - InterleavedBuffer.prototype.setDynamic = function (value) { - console.warn('THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.'); - this.setUsage(value === true ? DynamicDrawUsage : StaticDrawUsage); - return this; - }; - - InterleavedBuffer.prototype.setArray = function () - /* array */ - { - console.error('THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers'); - }; // - - - ExtrudeGeometry.prototype.getArrays = function () { - console.error('THREE.ExtrudeGeometry: .getArrays() has been removed.'); - }; - - ExtrudeGeometry.prototype.addShapeList = function () { - console.error('THREE.ExtrudeGeometry: .addShapeList() has been removed.'); - }; - - ExtrudeGeometry.prototype.addShape = function () { - console.error('THREE.ExtrudeGeometry: .addShape() has been removed.'); - }; // - - - Scene.prototype.dispose = function () { - console.error('THREE.Scene: .dispose() has been removed.'); - }; // - - - Uniform.prototype.onUpdate = function () { - console.warn('THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.'); - return this; - }; // - - - Object.defineProperties(Material.prototype, { - wrapAround: { - get: function () { - console.warn('THREE.Material: .wrapAround has been removed.'); - }, - set: function () { - console.warn('THREE.Material: .wrapAround has been removed.'); - } - }, - overdraw: { - get: function () { - console.warn('THREE.Material: .overdraw has been removed.'); - }, - set: function () { - console.warn('THREE.Material: .overdraw has been removed.'); - } - }, - wrapRGB: { - get: function () { - console.warn('THREE.Material: .wrapRGB has been removed.'); - return new Color(); - } - }, - shading: { - get: function () { - console.error('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.'); - }, - set: function (value) { - console.warn('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.'); - this.flatShading = value === FlatShading; - } - }, - stencilMask: { - get: function () { - console.warn('THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.'); - return this.stencilFuncMask; - }, - set: function (value) { - console.warn('THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.'); - this.stencilFuncMask = value; - } - } - }); - Object.defineProperties(ShaderMaterial.prototype, { - derivatives: { - get: function () { - console.warn('THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.'); - return this.extensions.derivatives; - }, - set: function (value) { - console.warn('THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.'); - this.extensions.derivatives = value; - } - } - }); // - - WebGLRenderer.prototype.clearTarget = function (renderTarget, color, depth, stencil) { - console.warn('THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.'); - this.setRenderTarget(renderTarget); - this.clear(color, depth, stencil); - }; - - WebGLRenderer.prototype.animate = function (callback) { - console.warn('THREE.WebGLRenderer: .animate() is now .setAnimationLoop().'); - this.setAnimationLoop(callback); - }; - - WebGLRenderer.prototype.getCurrentRenderTarget = function () { - console.warn('THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().'); - return this.getRenderTarget(); - }; - - WebGLRenderer.prototype.getMaxAnisotropy = function () { - console.warn('THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().'); - return this.capabilities.getMaxAnisotropy(); - }; - - WebGLRenderer.prototype.getPrecision = function () { - console.warn('THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.'); - return this.capabilities.precision; - }; - - WebGLRenderer.prototype.resetGLState = function () { - console.warn('THREE.WebGLRenderer: .resetGLState() is now .state.reset().'); - return this.state.reset(); - }; - - WebGLRenderer.prototype.supportsFloatTextures = function () { - console.warn('THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).'); - return this.extensions.get('OES_texture_float'); - }; - - WebGLRenderer.prototype.supportsHalfFloatTextures = function () { - console.warn('THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).'); - return this.extensions.get('OES_texture_half_float'); - }; - - WebGLRenderer.prototype.supportsStandardDerivatives = function () { - console.warn('THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).'); - return this.extensions.get('OES_standard_derivatives'); - }; - - WebGLRenderer.prototype.supportsCompressedTextureS3TC = function () { - console.warn('THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).'); - return this.extensions.get('WEBGL_compressed_texture_s3tc'); - }; - - WebGLRenderer.prototype.supportsCompressedTexturePVRTC = function () { - console.warn('THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).'); - return this.extensions.get('WEBGL_compressed_texture_pvrtc'); - }; - - WebGLRenderer.prototype.supportsBlendMinMax = function () { - console.warn('THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).'); - return this.extensions.get('EXT_blend_minmax'); - }; - - WebGLRenderer.prototype.supportsVertexTextures = function () { - console.warn('THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.'); - return this.capabilities.vertexTextures; - }; - - WebGLRenderer.prototype.supportsInstancedArrays = function () { - console.warn('THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).'); - return this.extensions.get('ANGLE_instanced_arrays'); - }; - - WebGLRenderer.prototype.enableScissorTest = function (boolean) { - console.warn('THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().'); - this.setScissorTest(boolean); - }; - - WebGLRenderer.prototype.initMaterial = function () { - console.warn('THREE.WebGLRenderer: .initMaterial() has been removed.'); - }; - - WebGLRenderer.prototype.addPrePlugin = function () { - console.warn('THREE.WebGLRenderer: .addPrePlugin() has been removed.'); - }; - - WebGLRenderer.prototype.addPostPlugin = function () { - console.warn('THREE.WebGLRenderer: .addPostPlugin() has been removed.'); - }; - - WebGLRenderer.prototype.updateShadowMap = function () { - console.warn('THREE.WebGLRenderer: .updateShadowMap() has been removed.'); - }; - - WebGLRenderer.prototype.setFaceCulling = function () { - console.warn('THREE.WebGLRenderer: .setFaceCulling() has been removed.'); - }; - - WebGLRenderer.prototype.allocTextureUnit = function () { - console.warn('THREE.WebGLRenderer: .allocTextureUnit() has been removed.'); - }; - - WebGLRenderer.prototype.setTexture = function () { - console.warn('THREE.WebGLRenderer: .setTexture() has been removed.'); - }; - - WebGLRenderer.prototype.setTexture2D = function () { - console.warn('THREE.WebGLRenderer: .setTexture2D() has been removed.'); - }; - - WebGLRenderer.prototype.setTextureCube = function () { - console.warn('THREE.WebGLRenderer: .setTextureCube() has been removed.'); - }; - - WebGLRenderer.prototype.getActiveMipMapLevel = function () { - console.warn('THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().'); - return this.getActiveMipmapLevel(); - }; - - Object.defineProperties(WebGLRenderer.prototype, { - shadowMapEnabled: { - get: function () { - return this.shadowMap.enabled; - }, - set: function (value) { - console.warn('THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.'); - this.shadowMap.enabled = value; - } - }, - shadowMapType: { - get: function () { - return this.shadowMap.type; - }, - set: function (value) { - console.warn('THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.'); - this.shadowMap.type = value; - } - }, - shadowMapCullFace: { - get: function () { - console.warn('THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.'); - return undefined; - }, - set: function () - /* value */ - { - console.warn('THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.'); - } - }, - context: { - get: function () { - console.warn('THREE.WebGLRenderer: .context has been removed. Use .getContext() instead.'); - return this.getContext(); - } - }, - vr: { - get: function () { - console.warn('THREE.WebGLRenderer: .vr has been renamed to .xr'); - return this.xr; - } - }, - gammaInput: { - get: function () { - console.warn('THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.'); - return false; - }, - set: function () { - console.warn('THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.'); - } - }, - gammaOutput: { - get: function () { - console.warn('THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.'); - return false; - }, - set: function (value) { - console.warn('THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.'); - this.outputEncoding = value === true ? sRGBEncoding : LinearEncoding; - } - }, - toneMappingWhitePoint: { - get: function () { - console.warn('THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.'); - return 1.0; - }, - set: function () { - console.warn('THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.'); - } - } - }); - Object.defineProperties(WebGLShadowMap.prototype, { - cullFace: { - get: function () { - console.warn('THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.'); - return undefined; - }, - set: function () - /* cullFace */ - { - console.warn('THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.'); - } - }, - renderReverseSided: { - get: function () { - console.warn('THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.'); - return undefined; - }, - set: function () { - console.warn('THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.'); - } - }, - renderSingleSided: { - get: function () { - console.warn('THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.'); - return undefined; - }, - set: function () { - console.warn('THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.'); - } - } - }); - function WebGLRenderTargetCube(width, height, options) { - console.warn('THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).'); - return new WebGLCubeRenderTarget(width, options); - } // - - Object.defineProperties(WebGLRenderTarget.prototype, { - wrapS: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.'); - return this.texture.wrapS; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.'); - this.texture.wrapS = value; - } - }, - wrapT: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.'); - return this.texture.wrapT; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.'); - this.texture.wrapT = value; - } - }, - magFilter: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.'); - return this.texture.magFilter; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.'); - this.texture.magFilter = value; - } - }, - minFilter: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.'); - return this.texture.minFilter; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.'); - this.texture.minFilter = value; - } - }, - anisotropy: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.'); - return this.texture.anisotropy; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.'); - this.texture.anisotropy = value; - } - }, - offset: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .offset is now .texture.offset.'); - return this.texture.offset; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .offset is now .texture.offset.'); - this.texture.offset = value; - } - }, - repeat: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .repeat is now .texture.repeat.'); - return this.texture.repeat; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .repeat is now .texture.repeat.'); - this.texture.repeat = value; - } - }, - format: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .format is now .texture.format.'); - return this.texture.format; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .format is now .texture.format.'); - this.texture.format = value; - } - }, - type: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .type is now .texture.type.'); - return this.texture.type; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .type is now .texture.type.'); - this.texture.type = value; - } - }, - generateMipmaps: { - get: function () { - console.warn('THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.'); - return this.texture.generateMipmaps; - }, - set: function (value) { - console.warn('THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.'); - this.texture.generateMipmaps = value; - } - } - }); // - - Audio.prototype.load = function (file) { - console.warn('THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.'); - const scope = this; - const audioLoader = new AudioLoader(); - audioLoader.load(file, function (buffer) { - scope.setBuffer(buffer); - }); - return this; - }; - - AudioAnalyser.prototype.getData = function () { - console.warn('THREE.AudioAnalyser: .getData() is now .getFrequencyData().'); - return this.getFrequencyData(); - }; // - - - CubeCamera.prototype.updateCubeMap = function (renderer, scene) { - console.warn('THREE.CubeCamera: .updateCubeMap() is now .update().'); - return this.update(renderer, scene); - }; - - CubeCamera.prototype.clear = function (renderer, color, depth, stencil) { - console.warn('THREE.CubeCamera: .clear() is now .renderTarget.clear().'); - return this.renderTarget.clear(renderer, color, depth, stencil); - }; - - ImageUtils.crossOrigin = undefined; - - ImageUtils.loadTexture = function (url, mapping, onLoad, onError) { - console.warn('THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.'); - const loader = new TextureLoader(); - loader.setCrossOrigin(this.crossOrigin); - const texture = loader.load(url, onLoad, undefined, onError); - if (mapping) texture.mapping = mapping; - return texture; - }; - - ImageUtils.loadTextureCube = function (urls, mapping, onLoad, onError) { - console.warn('THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.'); - const loader = new CubeTextureLoader(); - loader.setCrossOrigin(this.crossOrigin); - const texture = loader.load(urls, onLoad, undefined, onError); - if (mapping) texture.mapping = mapping; - return texture; - }; - - ImageUtils.loadCompressedTexture = function () { - console.error('THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.'); - }; - - ImageUtils.loadCompressedTextureCube = function () { - console.error('THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.'); - }; // - - - function CanvasRenderer() { - console.error('THREE.CanvasRenderer has been removed'); - } // - - function JSONLoader() { - console.error('THREE.JSONLoader has been removed.'); - } // - - const SceneUtils = { - createMultiMaterialObject: function () - /* geometry, materials */ - { - console.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js'); - }, - detach: function () - /* child, parent, scene */ - { - console.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js'); - }, - attach: function () - /* child, scene, parent */ - { - console.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js'); - } - }; // - - function LensFlare() { - console.error('THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js'); - } - - if (typeof __THREE_DEVTOOLS__ !== 'undefined') { - /* eslint-disable no-undef */ - __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('register', { - detail: { - revision: REVISION - } - })); - /* eslint-enable no-undef */ - - } - - if (typeof window !== 'undefined') { - if (window.__THREE__) { - console.warn('WARNING: Multiple instances of Three.js being imported.'); - } else { - window.__THREE__ = REVISION; - } - } - - exports.ACESFilmicToneMapping = ACESFilmicToneMapping; - exports.AddEquation = AddEquation; - exports.AddOperation = AddOperation; - exports.AdditiveAnimationBlendMode = AdditiveAnimationBlendMode; - exports.AdditiveBlending = AdditiveBlending; - exports.AlphaFormat = AlphaFormat; - exports.AlwaysDepth = AlwaysDepth; - exports.AlwaysStencilFunc = AlwaysStencilFunc; - exports.AmbientLight = AmbientLight; - exports.AmbientLightProbe = AmbientLightProbe; - exports.AnimationClip = AnimationClip; - exports.AnimationLoader = AnimationLoader; - exports.AnimationMixer = AnimationMixer; - exports.AnimationObjectGroup = AnimationObjectGroup; - exports.AnimationUtils = AnimationUtils; - exports.ArcCurve = ArcCurve; - exports.ArrayCamera = ArrayCamera; - exports.ArrowHelper = ArrowHelper; - exports.Audio = Audio; - exports.AudioAnalyser = AudioAnalyser; - exports.AudioContext = AudioContext; - exports.AudioListener = AudioListener; - exports.AudioLoader = AudioLoader; - exports.AxesHelper = AxesHelper; - exports.AxisHelper = AxisHelper; - exports.BackSide = BackSide; - exports.BasicDepthPacking = BasicDepthPacking; - exports.BasicShadowMap = BasicShadowMap; - exports.BinaryTextureLoader = BinaryTextureLoader; - exports.Bone = Bone; - exports.BooleanKeyframeTrack = BooleanKeyframeTrack; - exports.BoundingBoxHelper = BoundingBoxHelper; - exports.Box2 = Box2; - exports.Box3 = Box3; - exports.Box3Helper = Box3Helper; - exports.BoxBufferGeometry = BoxGeometry; - exports.BoxGeometry = BoxGeometry; - exports.BoxHelper = BoxHelper; - exports.BufferAttribute = BufferAttribute; - exports.BufferGeometry = BufferGeometry; - exports.BufferGeometryLoader = BufferGeometryLoader; - exports.ByteType = ByteType; - exports.Cache = Cache; - exports.Camera = Camera; - exports.CameraHelper = CameraHelper; - exports.CanvasRenderer = CanvasRenderer; - exports.CanvasTexture = CanvasTexture; - exports.CatmullRomCurve3 = CatmullRomCurve3; - exports.CineonToneMapping = CineonToneMapping; - exports.CircleBufferGeometry = CircleGeometry; - exports.CircleGeometry = CircleGeometry; - exports.ClampToEdgeWrapping = ClampToEdgeWrapping; - exports.Clock = Clock; - exports.Color = Color; - exports.ColorKeyframeTrack = ColorKeyframeTrack; - exports.CompressedTexture = CompressedTexture; - exports.CompressedTextureLoader = CompressedTextureLoader; - exports.ConeBufferGeometry = ConeGeometry; - exports.ConeGeometry = ConeGeometry; - exports.CubeCamera = CubeCamera; - exports.CubeReflectionMapping = CubeReflectionMapping; - exports.CubeRefractionMapping = CubeRefractionMapping; - exports.CubeTexture = CubeTexture; - exports.CubeTextureLoader = CubeTextureLoader; - exports.CubeUVReflectionMapping = CubeUVReflectionMapping; - exports.CubeUVRefractionMapping = CubeUVRefractionMapping; - exports.CubicBezierCurve = CubicBezierCurve; - exports.CubicBezierCurve3 = CubicBezierCurve3; - exports.CubicInterpolant = CubicInterpolant; - exports.CullFaceBack = CullFaceBack; - exports.CullFaceFront = CullFaceFront; - exports.CullFaceFrontBack = CullFaceFrontBack; - exports.CullFaceNone = CullFaceNone; - exports.Curve = Curve; - exports.CurvePath = CurvePath; - exports.CustomBlending = CustomBlending; - exports.CustomToneMapping = CustomToneMapping; - exports.CylinderBufferGeometry = CylinderGeometry; - exports.CylinderGeometry = CylinderGeometry; - exports.Cylindrical = Cylindrical; - exports.DataTexture = DataTexture; - exports.DataTexture2DArray = DataTexture2DArray; - exports.DataTexture3D = DataTexture3D; - exports.DataTextureLoader = DataTextureLoader; - exports.DataUtils = DataUtils; - exports.DecrementStencilOp = DecrementStencilOp; - exports.DecrementWrapStencilOp = DecrementWrapStencilOp; - exports.DefaultLoadingManager = DefaultLoadingManager; - exports.DepthFormat = DepthFormat; - exports.DepthStencilFormat = DepthStencilFormat; - exports.DepthTexture = DepthTexture; - exports.DirectionalLight = DirectionalLight; - exports.DirectionalLightHelper = DirectionalLightHelper; - exports.DiscreteInterpolant = DiscreteInterpolant; - exports.DodecahedronBufferGeometry = DodecahedronGeometry; - exports.DodecahedronGeometry = DodecahedronGeometry; - exports.DoubleSide = DoubleSide; - exports.DstAlphaFactor = DstAlphaFactor; - exports.DstColorFactor = DstColorFactor; - exports.DynamicBufferAttribute = DynamicBufferAttribute; - exports.DynamicCopyUsage = DynamicCopyUsage; - exports.DynamicDrawUsage = DynamicDrawUsage; - exports.DynamicReadUsage = DynamicReadUsage; - exports.EdgesGeometry = EdgesGeometry; - exports.EdgesHelper = EdgesHelper; - exports.EllipseCurve = EllipseCurve; - exports.EqualDepth = EqualDepth; - exports.EqualStencilFunc = EqualStencilFunc; - exports.EquirectangularReflectionMapping = EquirectangularReflectionMapping; - exports.EquirectangularRefractionMapping = EquirectangularRefractionMapping; - exports.Euler = Euler; - exports.EventDispatcher = EventDispatcher; - exports.ExtrudeBufferGeometry = ExtrudeGeometry; - exports.ExtrudeGeometry = ExtrudeGeometry; - exports.FaceColors = FaceColors; - exports.FileLoader = FileLoader; - exports.FlatShading = FlatShading; - exports.Float16BufferAttribute = Float16BufferAttribute; - exports.Float32Attribute = Float32Attribute; - exports.Float32BufferAttribute = Float32BufferAttribute; - exports.Float64Attribute = Float64Attribute; - exports.Float64BufferAttribute = Float64BufferAttribute; - exports.FloatType = FloatType; - exports.Fog = Fog; - exports.FogExp2 = FogExp2; - exports.Font = Font; - exports.FontLoader = FontLoader; - exports.FrontSide = FrontSide; - exports.Frustum = Frustum; - exports.GLBufferAttribute = GLBufferAttribute; - exports.GLSL1 = GLSL1; - exports.GLSL3 = GLSL3; - exports.GammaEncoding = GammaEncoding; - exports.GreaterDepth = GreaterDepth; - exports.GreaterEqualDepth = GreaterEqualDepth; - exports.GreaterEqualStencilFunc = GreaterEqualStencilFunc; - exports.GreaterStencilFunc = GreaterStencilFunc; - exports.GridHelper = GridHelper; - exports.Group = Group; - exports.HalfFloatType = HalfFloatType; - exports.HemisphereLight = HemisphereLight; - exports.HemisphereLightHelper = HemisphereLightHelper; - exports.HemisphereLightProbe = HemisphereLightProbe; - exports.IcosahedronBufferGeometry = IcosahedronGeometry; - exports.IcosahedronGeometry = IcosahedronGeometry; - exports.ImageBitmapLoader = ImageBitmapLoader; - exports.ImageLoader = ImageLoader; - exports.ImageUtils = ImageUtils; - exports.ImmediateRenderObject = ImmediateRenderObject; - exports.IncrementStencilOp = IncrementStencilOp; - exports.IncrementWrapStencilOp = IncrementWrapStencilOp; - exports.InstancedBufferAttribute = InstancedBufferAttribute; - exports.InstancedBufferGeometry = InstancedBufferGeometry; - exports.InstancedInterleavedBuffer = InstancedInterleavedBuffer; - exports.InstancedMesh = InstancedMesh; - exports.Int16Attribute = Int16Attribute; - exports.Int16BufferAttribute = Int16BufferAttribute; - exports.Int32Attribute = Int32Attribute; - exports.Int32BufferAttribute = Int32BufferAttribute; - exports.Int8Attribute = Int8Attribute; - exports.Int8BufferAttribute = Int8BufferAttribute; - exports.IntType = IntType; - exports.InterleavedBuffer = InterleavedBuffer; - exports.InterleavedBufferAttribute = InterleavedBufferAttribute; - exports.Interpolant = Interpolant; - exports.InterpolateDiscrete = InterpolateDiscrete; - exports.InterpolateLinear = InterpolateLinear; - exports.InterpolateSmooth = InterpolateSmooth; - exports.InvertStencilOp = InvertStencilOp; - exports.JSONLoader = JSONLoader; - exports.KeepStencilOp = KeepStencilOp; - exports.KeyframeTrack = KeyframeTrack; - exports.LOD = LOD; - exports.LatheBufferGeometry = LatheGeometry; - exports.LatheGeometry = LatheGeometry; - exports.Layers = Layers; - exports.LensFlare = LensFlare; - exports.LessDepth = LessDepth; - exports.LessEqualDepth = LessEqualDepth; - exports.LessEqualStencilFunc = LessEqualStencilFunc; - exports.LessStencilFunc = LessStencilFunc; - exports.Light = Light; - exports.LightProbe = LightProbe; - exports.Line = Line; - exports.Line3 = Line3; - exports.LineBasicMaterial = LineBasicMaterial; - exports.LineCurve = LineCurve; - exports.LineCurve3 = LineCurve3; - exports.LineDashedMaterial = LineDashedMaterial; - exports.LineLoop = LineLoop; - exports.LinePieces = LinePieces; - exports.LineSegments = LineSegments; - exports.LineStrip = LineStrip; - exports.LinearEncoding = LinearEncoding; - exports.LinearFilter = LinearFilter; - exports.LinearInterpolant = LinearInterpolant; - exports.LinearMipMapLinearFilter = LinearMipMapLinearFilter; - exports.LinearMipMapNearestFilter = LinearMipMapNearestFilter; - exports.LinearMipmapLinearFilter = LinearMipmapLinearFilter; - exports.LinearMipmapNearestFilter = LinearMipmapNearestFilter; - exports.LinearToneMapping = LinearToneMapping; - exports.Loader = Loader; - exports.LoaderUtils = LoaderUtils; - exports.LoadingManager = LoadingManager; - exports.LogLuvEncoding = LogLuvEncoding; - exports.LoopOnce = LoopOnce; - exports.LoopPingPong = LoopPingPong; - exports.LoopRepeat = LoopRepeat; - exports.LuminanceAlphaFormat = LuminanceAlphaFormat; - exports.LuminanceFormat = LuminanceFormat; - exports.MOUSE = MOUSE; - exports.Material = Material; - exports.MaterialLoader = MaterialLoader; - exports.Math = MathUtils; - exports.MathUtils = MathUtils; - exports.Matrix3 = Matrix3; - exports.Matrix4 = Matrix4; - exports.MaxEquation = MaxEquation; - exports.Mesh = Mesh; - exports.MeshBasicMaterial = MeshBasicMaterial; - exports.MeshDepthMaterial = MeshDepthMaterial; - exports.MeshDistanceMaterial = MeshDistanceMaterial; - exports.MeshFaceMaterial = MeshFaceMaterial; - exports.MeshLambertMaterial = MeshLambertMaterial; - exports.MeshMatcapMaterial = MeshMatcapMaterial; - exports.MeshNormalMaterial = MeshNormalMaterial; - exports.MeshPhongMaterial = MeshPhongMaterial; - exports.MeshPhysicalMaterial = MeshPhysicalMaterial; - exports.MeshStandardMaterial = MeshStandardMaterial; - exports.MeshToonMaterial = MeshToonMaterial; - exports.MinEquation = MinEquation; - exports.MirroredRepeatWrapping = MirroredRepeatWrapping; - exports.MixOperation = MixOperation; - exports.MultiMaterial = MultiMaterial; - exports.MultiplyBlending = MultiplyBlending; - exports.MultiplyOperation = MultiplyOperation; - exports.NearestFilter = NearestFilter; - exports.NearestMipMapLinearFilter = NearestMipMapLinearFilter; - exports.NearestMipMapNearestFilter = NearestMipMapNearestFilter; - exports.NearestMipmapLinearFilter = NearestMipmapLinearFilter; - exports.NearestMipmapNearestFilter = NearestMipmapNearestFilter; - exports.NeverDepth = NeverDepth; - exports.NeverStencilFunc = NeverStencilFunc; - exports.NoBlending = NoBlending; - exports.NoColors = NoColors; - exports.NoToneMapping = NoToneMapping; - exports.NormalAnimationBlendMode = NormalAnimationBlendMode; - exports.NormalBlending = NormalBlending; - exports.NotEqualDepth = NotEqualDepth; - exports.NotEqualStencilFunc = NotEqualStencilFunc; - exports.NumberKeyframeTrack = NumberKeyframeTrack; - exports.Object3D = Object3D; - exports.ObjectLoader = ObjectLoader; - exports.ObjectSpaceNormalMap = ObjectSpaceNormalMap; - exports.OctahedronBufferGeometry = OctahedronGeometry; - exports.OctahedronGeometry = OctahedronGeometry; - exports.OneFactor = OneFactor; - exports.OneMinusDstAlphaFactor = OneMinusDstAlphaFactor; - exports.OneMinusDstColorFactor = OneMinusDstColorFactor; - exports.OneMinusSrcAlphaFactor = OneMinusSrcAlphaFactor; - exports.OneMinusSrcColorFactor = OneMinusSrcColorFactor; - exports.OrthographicCamera = OrthographicCamera; - exports.PCFShadowMap = PCFShadowMap; - exports.PCFSoftShadowMap = PCFSoftShadowMap; - exports.PMREMGenerator = PMREMGenerator; - exports.ParametricBufferGeometry = ParametricGeometry; - exports.ParametricGeometry = ParametricGeometry; - exports.Particle = Particle; - exports.ParticleBasicMaterial = ParticleBasicMaterial; - exports.ParticleSystem = ParticleSystem; - exports.ParticleSystemMaterial = ParticleSystemMaterial; - exports.Path = Path; - exports.PerspectiveCamera = PerspectiveCamera; - exports.Plane = Plane; - exports.PlaneBufferGeometry = PlaneGeometry; - exports.PlaneGeometry = PlaneGeometry; - exports.PlaneHelper = PlaneHelper; - exports.PointCloud = PointCloud; - exports.PointCloudMaterial = PointCloudMaterial; - exports.PointLight = PointLight; - exports.PointLightHelper = PointLightHelper; - exports.Points = Points; - exports.PointsMaterial = PointsMaterial; - exports.PolarGridHelper = PolarGridHelper; - exports.PolyhedronBufferGeometry = PolyhedronGeometry; - exports.PolyhedronGeometry = PolyhedronGeometry; - exports.PositionalAudio = PositionalAudio; - exports.PropertyBinding = PropertyBinding; - exports.PropertyMixer = PropertyMixer; - exports.QuadraticBezierCurve = QuadraticBezierCurve; - exports.QuadraticBezierCurve3 = QuadraticBezierCurve3; - exports.Quaternion = Quaternion; - exports.QuaternionKeyframeTrack = QuaternionKeyframeTrack; - exports.QuaternionLinearInterpolant = QuaternionLinearInterpolant; - exports.REVISION = REVISION; - exports.RGBADepthPacking = RGBADepthPacking; - exports.RGBAFormat = RGBAFormat; - exports.RGBAIntegerFormat = RGBAIntegerFormat; - exports.RGBA_ASTC_10x10_Format = RGBA_ASTC_10x10_Format; - exports.RGBA_ASTC_10x5_Format = RGBA_ASTC_10x5_Format; - exports.RGBA_ASTC_10x6_Format = RGBA_ASTC_10x6_Format; - exports.RGBA_ASTC_10x8_Format = RGBA_ASTC_10x8_Format; - exports.RGBA_ASTC_12x10_Format = RGBA_ASTC_12x10_Format; - exports.RGBA_ASTC_12x12_Format = RGBA_ASTC_12x12_Format; - exports.RGBA_ASTC_4x4_Format = RGBA_ASTC_4x4_Format; - exports.RGBA_ASTC_5x4_Format = RGBA_ASTC_5x4_Format; - exports.RGBA_ASTC_5x5_Format = RGBA_ASTC_5x5_Format; - exports.RGBA_ASTC_6x5_Format = RGBA_ASTC_6x5_Format; - exports.RGBA_ASTC_6x6_Format = RGBA_ASTC_6x6_Format; - exports.RGBA_ASTC_8x5_Format = RGBA_ASTC_8x5_Format; - exports.RGBA_ASTC_8x6_Format = RGBA_ASTC_8x6_Format; - exports.RGBA_ASTC_8x8_Format = RGBA_ASTC_8x8_Format; - exports.RGBA_BPTC_Format = RGBA_BPTC_Format; - exports.RGBA_ETC2_EAC_Format = RGBA_ETC2_EAC_Format; - exports.RGBA_PVRTC_2BPPV1_Format = RGBA_PVRTC_2BPPV1_Format; - exports.RGBA_PVRTC_4BPPV1_Format = RGBA_PVRTC_4BPPV1_Format; - exports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format; - exports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format; - exports.RGBA_S3TC_DXT5_Format = RGBA_S3TC_DXT5_Format; - exports.RGBDEncoding = RGBDEncoding; - exports.RGBEEncoding = RGBEEncoding; - exports.RGBEFormat = RGBEFormat; - exports.RGBFormat = RGBFormat; - exports.RGBIntegerFormat = RGBIntegerFormat; - exports.RGBM16Encoding = RGBM16Encoding; - exports.RGBM7Encoding = RGBM7Encoding; - exports.RGB_ETC1_Format = RGB_ETC1_Format; - exports.RGB_ETC2_Format = RGB_ETC2_Format; - exports.RGB_PVRTC_2BPPV1_Format = RGB_PVRTC_2BPPV1_Format; - exports.RGB_PVRTC_4BPPV1_Format = RGB_PVRTC_4BPPV1_Format; - exports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format; - exports.RGFormat = RGFormat; - exports.RGIntegerFormat = RGIntegerFormat; - exports.RawShaderMaterial = RawShaderMaterial; - exports.Ray = Ray; - exports.Raycaster = Raycaster; - exports.RectAreaLight = RectAreaLight; - exports.RedFormat = RedFormat; - exports.RedIntegerFormat = RedIntegerFormat; - exports.ReinhardToneMapping = ReinhardToneMapping; - exports.RepeatWrapping = RepeatWrapping; - exports.ReplaceStencilOp = ReplaceStencilOp; - exports.ReverseSubtractEquation = ReverseSubtractEquation; - exports.RingBufferGeometry = RingGeometry; - exports.RingGeometry = RingGeometry; - exports.SRGB8_ALPHA8_ASTC_10x10_Format = SRGB8_ALPHA8_ASTC_10x10_Format; - exports.SRGB8_ALPHA8_ASTC_10x5_Format = SRGB8_ALPHA8_ASTC_10x5_Format; - exports.SRGB8_ALPHA8_ASTC_10x6_Format = SRGB8_ALPHA8_ASTC_10x6_Format; - exports.SRGB8_ALPHA8_ASTC_10x8_Format = SRGB8_ALPHA8_ASTC_10x8_Format; - exports.SRGB8_ALPHA8_ASTC_12x10_Format = SRGB8_ALPHA8_ASTC_12x10_Format; - exports.SRGB8_ALPHA8_ASTC_12x12_Format = SRGB8_ALPHA8_ASTC_12x12_Format; - exports.SRGB8_ALPHA8_ASTC_4x4_Format = SRGB8_ALPHA8_ASTC_4x4_Format; - exports.SRGB8_ALPHA8_ASTC_5x4_Format = SRGB8_ALPHA8_ASTC_5x4_Format; - exports.SRGB8_ALPHA8_ASTC_5x5_Format = SRGB8_ALPHA8_ASTC_5x5_Format; - exports.SRGB8_ALPHA8_ASTC_6x5_Format = SRGB8_ALPHA8_ASTC_6x5_Format; - exports.SRGB8_ALPHA8_ASTC_6x6_Format = SRGB8_ALPHA8_ASTC_6x6_Format; - exports.SRGB8_ALPHA8_ASTC_8x5_Format = SRGB8_ALPHA8_ASTC_8x5_Format; - exports.SRGB8_ALPHA8_ASTC_8x6_Format = SRGB8_ALPHA8_ASTC_8x6_Format; - exports.SRGB8_ALPHA8_ASTC_8x8_Format = SRGB8_ALPHA8_ASTC_8x8_Format; - exports.Scene = Scene; - exports.SceneUtils = SceneUtils; - exports.ShaderChunk = ShaderChunk; - exports.ShaderLib = ShaderLib; - exports.ShaderMaterial = ShaderMaterial; - exports.ShadowMaterial = ShadowMaterial; - exports.Shape = Shape; - exports.ShapeBufferGeometry = ShapeGeometry; - exports.ShapeGeometry = ShapeGeometry; - exports.ShapePath = ShapePath; - exports.ShapeUtils = ShapeUtils; - exports.ShortType = ShortType; - exports.Skeleton = Skeleton; - exports.SkeletonHelper = SkeletonHelper; - exports.SkinnedMesh = SkinnedMesh; - exports.SmoothShading = SmoothShading; - exports.Sphere = Sphere; - exports.SphereBufferGeometry = SphereGeometry; - exports.SphereGeometry = SphereGeometry; - exports.Spherical = Spherical; - exports.SphericalHarmonics3 = SphericalHarmonics3; - exports.SplineCurve = SplineCurve; - exports.SpotLight = SpotLight; - exports.SpotLightHelper = SpotLightHelper; - exports.Sprite = Sprite; - exports.SpriteMaterial = SpriteMaterial; - exports.SrcAlphaFactor = SrcAlphaFactor; - exports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor; - exports.SrcColorFactor = SrcColorFactor; - exports.StaticCopyUsage = StaticCopyUsage; - exports.StaticDrawUsage = StaticDrawUsage; - exports.StaticReadUsage = StaticReadUsage; - exports.StereoCamera = StereoCamera; - exports.StreamCopyUsage = StreamCopyUsage; - exports.StreamDrawUsage = StreamDrawUsage; - exports.StreamReadUsage = StreamReadUsage; - exports.StringKeyframeTrack = StringKeyframeTrack; - exports.SubtractEquation = SubtractEquation; - exports.SubtractiveBlending = SubtractiveBlending; - exports.TOUCH = TOUCH; - exports.TangentSpaceNormalMap = TangentSpaceNormalMap; - exports.TetrahedronBufferGeometry = TetrahedronGeometry; - exports.TetrahedronGeometry = TetrahedronGeometry; - exports.TextBufferGeometry = TextGeometry; - exports.TextGeometry = TextGeometry; - exports.Texture = Texture; - exports.TextureLoader = TextureLoader; - exports.TorusBufferGeometry = TorusGeometry; - exports.TorusGeometry = TorusGeometry; - exports.TorusKnotBufferGeometry = TorusKnotGeometry; - exports.TorusKnotGeometry = TorusKnotGeometry; - exports.Triangle = Triangle; - exports.TriangleFanDrawMode = TriangleFanDrawMode; - exports.TriangleStripDrawMode = TriangleStripDrawMode; - exports.TrianglesDrawMode = TrianglesDrawMode; - exports.TubeBufferGeometry = TubeGeometry; - exports.TubeGeometry = TubeGeometry; - exports.UVMapping = UVMapping; - exports.Uint16Attribute = Uint16Attribute; - exports.Uint16BufferAttribute = Uint16BufferAttribute; - exports.Uint32Attribute = Uint32Attribute; - exports.Uint32BufferAttribute = Uint32BufferAttribute; - exports.Uint8Attribute = Uint8Attribute; - exports.Uint8BufferAttribute = Uint8BufferAttribute; - exports.Uint8ClampedAttribute = Uint8ClampedAttribute; - exports.Uint8ClampedBufferAttribute = Uint8ClampedBufferAttribute; - exports.Uniform = Uniform; - exports.UniformsLib = UniformsLib; - exports.UniformsUtils = UniformsUtils; - exports.UnsignedByteType = UnsignedByteType; - exports.UnsignedInt248Type = UnsignedInt248Type; - exports.UnsignedIntType = UnsignedIntType; - exports.UnsignedShort4444Type = UnsignedShort4444Type; - exports.UnsignedShort5551Type = UnsignedShort5551Type; - exports.UnsignedShort565Type = UnsignedShort565Type; - exports.UnsignedShortType = UnsignedShortType; - exports.VSMShadowMap = VSMShadowMap; - exports.Vector2 = Vector2; - exports.Vector3 = Vector3; - exports.Vector4 = Vector4; - exports.VectorKeyframeTrack = VectorKeyframeTrack; - exports.Vertex = Vertex; - exports.VertexColors = VertexColors; - exports.VideoTexture = VideoTexture; - exports.WebGL1Renderer = WebGL1Renderer; - exports.WebGLCubeRenderTarget = WebGLCubeRenderTarget; - exports.WebGLMultipleRenderTargets = WebGLMultipleRenderTargets; - exports.WebGLMultisampleRenderTarget = WebGLMultisampleRenderTarget; - exports.WebGLRenderTarget = WebGLRenderTarget; - exports.WebGLRenderTargetCube = WebGLRenderTargetCube; - exports.WebGLRenderer = WebGLRenderer; - exports.WebGLUtils = WebGLUtils; - exports.WireframeGeometry = WireframeGeometry; - exports.WireframeHelper = WireframeHelper; - exports.WrapAroundEnding = WrapAroundEnding; - exports.XHRLoader = XHRLoader; - exports.ZeroCurvatureEnding = ZeroCurvatureEnding; - exports.ZeroFactor = ZeroFactor; - exports.ZeroSlopeEnding = ZeroSlopeEnding; - exports.ZeroStencilOp = ZeroStencilOp; - exports.sRGBEncoding = sRGBEncoding; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/lib/tasks/server_files/three/build/three.min.js b/lib/tasks/server_files/three/build/three.min.js deleted file mode 100644 index 1d57f3989..000000000 --- a/lib/tasks/server_files/three/build/three.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @license - * Copyright 2010-2021 Three.js Authors - * SPDX-License-Identifier: MIT - */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).THREE={})}(this,(function(t){"use strict";const e="130",n=100,i=300,r=301,s=302,a=303,o=304,l=306,c=307,h=1e3,u=1001,d=1002,p=1003,m=1004,f=1005,g=1006,v=1007,y=1008,x=1009,_=1012,b=1014,M=1015,w=1016,S=1020,T=1022,E=1023,A=1026,L=1027,R=33776,C=33777,P=33778,D=33779,I=35840,N=35841,B=35842,z=35843,F=37492,O=37496,H=2300,U=2301,G=2302,k=2400,V=2401,W=2402,j=2500,q=2501,X=3e3,Y=3001,J=3007,Z=3002,Q=3004,K=3005,$=3006,tt=7680,et=35044,nt=35048,it="300 es";class rt{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,i=n.length;e>8&255]+st[t>>16&255]+st[t>>24&255]+"-"+st[255&e]+st[e>>8&255]+"-"+st[e>>16&15|64]+st[e>>24&255]+"-"+st[63&n|128]+st[n>>8&255]+"-"+st[n>>16&255]+st[n>>24&255]+st[255&i]+st[i>>8&255]+st[i>>16&255]+st[i>>24&255]).toUpperCase()}function ht(t,e,n){return Math.max(e,Math.min(n,t))}function ut(t,e){return(t%e+e)%e}function dt(t,e,n){return(1-n)*t+n*e}function pt(t){return 0==(t&t-1)&&0!==t}function mt(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function ft(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}var gt=Object.freeze({__proto__:null,DEG2RAD:ot,RAD2DEG:lt,generateUUID:ct,clamp:ht,euclideanModulo:ut,mapLinear:function(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)},inverseLerp:function(t,e,n){return t!==e?(n-t)/(e-t):0},lerp:dt,damp:function(t,e,n,i){return dt(t,e,1-Math.exp(-n*i))},pingpong:function(t,e=1){return e-Math.abs(ut(t,2*e)-e)},smoothstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*(3-2*t)},smootherstep:function(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){return void 0!==t&&(at=t%2147483647),at=16807*at%2147483647,(at-1)/2147483646},degToRad:function(t){return t*ot},radToDeg:function(t){return t*lt},isPowerOfTwo:pt,ceilPowerOfTwo:mt,floorPowerOfTwo:ft,setQuaternionFromProperEuler:function(t,e,n,i,r){const s=Math.cos,a=Math.sin,o=s(n/2),l=a(n/2),c=s((e+i)/2),h=a((e+i)/2),u=s((e-i)/2),d=a((e-i)/2),p=s((i-e)/2),m=a((i-e)/2);switch(r){case"XYX":t.set(o*h,l*u,l*d,o*c);break;case"YZY":t.set(l*d,o*h,l*u,o*c);break;case"ZXZ":t.set(l*u,l*d,o*h,o*c);break;case"XZX":t.set(o*h,l*m,l*p,o*c);break;case"YXY":t.set(l*p,o*h,l*m,o*c);break;case"ZYZ":t.set(l*m,l*p,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}});class vt{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),i=Math.sin(e),r=this.x-t.x,s=this.y-t.y;return this.x=r*n-s*i+t.x,this.y=r*i+s*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}}vt.prototype.isVector2=!0;class yt{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,i,r,s,a,o,l){const c=this.elements;return c[0]=t,c[1]=i,c[2]=a,c[3]=e,c[4]=r,c[5]=o,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[3],o=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],m=i[0],f=i[3],g=i[6],v=i[1],y=i[4],x=i[7],_=i[2],b=i[5],M=i[8];return r[0]=s*m+a*v+o*_,r[3]=s*f+a*y+o*b,r[6]=s*g+a*x+o*M,r[1]=l*m+c*v+h*_,r[4]=l*f+c*y+h*b,r[7]=l*g+c*x+h*M,r[2]=u*m+d*v+p*_,r[5]=u*f+d*y+p*b,r[8]=u*g+d*x+p*M,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8];return e*s*c-e*a*l-n*r*c+n*a*o+i*r*l-i*s*o}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=c*s-a*l,u=a*o-c*r,d=l*r-s*o,p=e*h+n*u+i*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return t[0]=h*m,t[1]=(i*l-c*n)*m,t[2]=(a*n-i*s)*m,t[3]=u*m,t[4]=(c*e-i*o)*m,t[5]=(i*r-a*e)*m,t[6]=d*m,t[7]=(n*o-l*e)*m,t[8]=(s*e-n*r)*m,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,i,r,s,a){const o=Math.cos(r),l=Math.sin(r);return this.set(n*o,n*l,-n*(o*s+l*a)+s+t,-i*l,i*o,-i*(-l*s+o*a)+a+e,0,0,1),this}scale(t,e){const n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this}rotate(t){const e=Math.cos(t),n=Math.sin(t),i=this.elements,r=i[0],s=i[3],a=i[6],o=i[1],l=i[4],c=i[7];return i[0]=e*r+n*o,i[3]=e*s+n*l,i[6]=e*a+n*c,i[1]=-n*r+e*o,i[4]=-n*s+e*l,i[7]=-n*a+e*c,this}translate(t,e){const n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}let xt;yt.prototype.isMatrix3=!0;class _t{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===xt&&(xt=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),xt.width=t.width,xt.height=t.height;const n=xt.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=xt}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}}let bt=0;class Mt extends rt{constructor(t=Mt.DEFAULT_IMAGE,e=Mt.DEFAULT_MAPPING,n=1001,i=1001,r=1006,s=1008,a=1023,o=1009,l=1,c=3e3){super(),Object.defineProperty(this,"id",{value:bt++}),this.uuid=ct(),this.name="",this.image=t,this.mipmaps=[],this.mapping=e,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=s,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=o,this.offset=new vt(0,0),this.repeat=new vt(1,1),this.center=new vt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new yt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const i=this.image;if(void 0===i.uuid&&(i.uuid=ct()),!e&&void 0===t.images[i.uuid]){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t1)switch(this.wrapS){case h:t.x=t.x-Math.floor(t.x);break;case u:t.x=t.x<0?0:1;break;case d:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case h:t.y=t.y-Math.floor(t.y);break;case u:t.y=t.y<0?0:1;break;case d:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&this.version++}}function wt(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?_t.getDataURL(t):t.data?{data:Array.prototype.slice.call(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}Mt.DEFAULT_IMAGE=void 0,Mt.DEFAULT_MAPPING=i,Mt.prototype.isTexture=!0;class St{constructor(t=0,e=0,n=0,i=1){this.x=t,this.y=e,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,i){return this.x=t,this.y=e,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=this.w,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,i,r;const s=.01,a=.1,o=t.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],p=o[9],m=o[2],f=o[6],g=o[10];if(Math.abs(c-u)o&&t>v?tv?o=0?1:-1,i=1-e*e;if(i>Number.EPSILON){const r=Math.sqrt(i),s=Math.atan2(r,e*n);t=Math.sin(t*s)/r,a=Math.sin(a*s)/r}const r=a*n;if(o=o*t+u*r,l=l*t+d*r,c=c*t+p*r,h=h*t+m*r,t===1-a){const t=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=t,l*=t,c*=t,h*=t}}t[e]=o,t[e+1]=l,t[e+2]=c,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,i,r,s){const a=n[i],o=n[i+1],l=n[i+2],c=n[i+3],h=r[s],u=r[s+1],d=r[s+2],p=r[s+3];return t[e]=a*p+c*h+o*d-l*u,t[e+1]=o*p+c*u+l*h-a*d,t[e+2]=l*p+c*d+a*u-o*h,t[e+3]=c*p-a*h-o*u-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,i){return this._x=t,this._y=e,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=t._x,i=t._y,r=t._z,s=t._order,a=Math.cos,o=Math.sin,l=a(n/2),c=a(i/2),h=a(r/2),u=o(n/2),d=o(i/2),p=o(r/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,i=Math.sin(n);return this._x=t.x*i,this._y=t.y*i,this._z=t.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],i=e[4],r=e[8],s=e[1],a=e[5],o=e[9],l=e[2],c=e[6],h=e[10],u=n+a+h;if(u>0){const t=.5/Math.sqrt(u+1);this._w=.25/t,this._x=(c-o)*t,this._y=(r-l)*t,this._z=(s-i)*t}else if(n>a&&n>h){const t=2*Math.sqrt(1+n-a-h);this._w=(c-o)/t,this._x=.25*t,this._y=(i+s)/t,this._z=(r+l)/t}else if(a>h){const t=2*Math.sqrt(1+a-n-h);this._w=(r-l)/t,this._x=(i+s)/t,this._y=.25*t,this._z=(o+c)/t}else{const t=2*Math.sqrt(1+h-n-a);this._w=(s-i)/t,this._x=(r+l)/t,this._y=(o+c)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(ht(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const i=Math.min(1,e/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,i=t._y,r=t._z,s=t._w,a=e._x,o=e._y,l=e._z,c=e._w;return this._x=n*c+s*a+i*l-r*o,this._y=i*c+s*o+r*a-n*l,this._z=r*c+s*l+n*o-i*a,this._w=s*c-n*a-i*o-r*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,i=this._y,r=this._z,s=this._w;let a=s*t._w+n*t._x+i*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=n,this._y=i,this._z=r,this;const o=1-a*a;if(o<=Number.EPSILON){const t=1-e;return this._w=t*s+e*this._w,this._x=t*n+e*this._x,this._y=t*i+e*this._y,this._z=t*r+e*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-e)*c)/l,u=Math.sin(e*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=i*h+this._y*u,this._z=r*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){this.copy(t).slerp(e,n)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}Lt.prototype.isQuaternion=!0;class Rt{constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(Pt.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Pt.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,i=this.z,r=t.elements,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,this}applyQuaternion(t){const e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,l=o*e+s*i-a*n,c=o*n+a*e-r*i,h=o*i+r*n-s*e,u=-r*e-s*n-a*i;return this.x=l*o+u*-r+c*-a-h*-s,this.y=c*o+u*-s+h*-r-l*-a,this.z=h*o+u*-a+l*-s-c*-r,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,i=this.z,r=t.elements;return this.x=r[0]*e+r[4]*n+r[8]*i,this.y=r[1]*e+r[5]*n+r[9]*i,this.z=r[2]*e+r[6]*n+r[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return Ct.copy(this).projectOnVector(t),this.sub(Ct)}reflect(t){return this.sub(Ct.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(ht(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return e*e+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const i=Math.sin(e)*t;return this.x=i*Math.sin(n),this.y=Math.cos(e)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=i,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}Rt.prototype.isVector3=!0;const Ct=new Rt,Pt=new Lt;class Dt{constructor(t=new Rt(1/0,1/0,1/0),e=new Rt(-1/0,-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0,l=t.length;or&&(r=l),c>s&&(s=c),h>a&&(a=h)}return this.min.set(e,n,i),this.max.set(r,s,a),this}setFromBufferAttribute(t){let e=1/0,n=1/0,i=1/0,r=-1/0,s=-1/0,a=-1/0;for(let o=0,l=t.count;or&&(r=l),c>s&&(s=c),h>a&&(a=h)}return this.min.set(e,n,i),this.max.set(r,s,a),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Nt),Nt.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(kt),Vt.subVectors(this.max,kt),zt.subVectors(t.a,kt),Ft.subVectors(t.b,kt),Ot.subVectors(t.c,kt),Ht.subVectors(Ft,zt),Ut.subVectors(Ot,Ft),Gt.subVectors(zt,Ot);let e=[0,-Ht.z,Ht.y,0,-Ut.z,Ut.y,0,-Gt.z,Gt.y,Ht.z,0,-Ht.x,Ut.z,0,-Ut.x,Gt.z,0,-Gt.x,-Ht.y,Ht.x,0,-Ut.y,Ut.x,0,-Gt.y,Gt.x,0];return!!qt(e,zt,Ft,Ot,Vt)&&(e=[1,0,0,0,1,0,0,0,1],!!qt(e,zt,Ft,Ot,Vt)&&(Wt.crossVectors(Ht,Ut),e=[Wt.x,Wt.y,Wt.z],qt(e,zt,Ft,Ot,Vt)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return Nt.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=.5*this.getSize(Nt).length(),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(It[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),It[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),It[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),It[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),It[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),It[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),It[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),It[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(It)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}Dt.prototype.isBox3=!0;const It=[new Rt,new Rt,new Rt,new Rt,new Rt,new Rt,new Rt,new Rt],Nt=new Rt,Bt=new Dt,zt=new Rt,Ft=new Rt,Ot=new Rt,Ht=new Rt,Ut=new Rt,Gt=new Rt,kt=new Rt,Vt=new Rt,Wt=new Rt,jt=new Rt;function qt(t,e,n,i,r){for(let s=0,a=t.length-3;s<=a;s+=3){jt.fromArray(t,s);const a=r.x*Math.abs(jt.x)+r.y*Math.abs(jt.y)+r.z*Math.abs(jt.z),o=e.dot(jt),l=n.dot(jt),c=i.dot(jt);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const Xt=new Dt,Yt=new Rt,Jt=new Rt,Zt=new Rt;class Qt{constructor(t=new Rt,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):Xt.setFromPoints(t).getCenter(n);let i=0;for(let e=0,r=t.length;ethis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){Zt.subVectors(t,this.center);const e=Zt.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.add(Zt.multiplyScalar(n/t)),this.radius+=n}return this}union(t){return Jt.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(Yt.copy(t.center).add(Jt)),this.expandByPoint(Yt.copy(t.center).sub(Jt)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Kt=new Rt,$t=new Rt,te=new Rt,ee=new Rt,ne=new Rt,ie=new Rt,re=new Rt;class se{constructor(t=new Rt,e=new Rt(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Kt)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Kt.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Kt.copy(this.direction).multiplyScalar(e).add(this.origin),Kt.distanceToSquared(t))}distanceSqToSegment(t,e,n,i){$t.copy(t).add(e).multiplyScalar(.5),te.copy(e).sub(t).normalize(),ee.copy(this.origin).sub($t);const r=.5*t.distanceTo(e),s=-this.direction.dot(te),a=ee.dot(this.direction),o=-ee.dot(te),l=ee.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*o-a,u=s*a-o,p=r*c,h>=0)if(u>=-p)if(u<=p){const t=1/c;h*=t,u*=t,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-p?(h=Math.max(0,-(-s*r+a)),u=h>0?-r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l):u<=p?(h=0,u=Math.min(Math.max(-r,-o),r),d=u*(u+2*o)+l):(h=Math.max(0,-(s*r+a)),u=h>0?r:Math.min(Math.max(-r,-o),r),d=-h*h+u*(u+2*o)+l);else u=s>0?-r:r,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return n&&n.copy(this.direction).multiplyScalar(h).add(this.origin),i&&i.copy(te).multiplyScalar(u).add($t),d}intersectSphere(t,e){Kt.subVectors(t.center,this.origin);const n=Kt.dot(this.direction),i=Kt.dot(Kt)-n*n,r=t.radius*t.radius;if(i>r)return null;const s=Math.sqrt(r-i),a=n-s,o=n+s;return a<0&&o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,i,r,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(t.min.x-u.x)*l,i=(t.max.x-u.x)*l):(n=(t.max.x-u.x)*l,i=(t.min.x-u.x)*l),c>=0?(r=(t.min.y-u.y)*c,s=(t.max.y-u.y)*c):(r=(t.max.y-u.y)*c,s=(t.min.y-u.y)*c),n>s||r>i?null:((r>n||n!=n)&&(n=r),(s=0?(a=(t.min.z-u.z)*h,o=(t.max.z-u.z)*h):(a=(t.max.z-u.z)*h,o=(t.min.z-u.z)*h),n>o||a>i?null:((a>n||n!=n)&&(n=a),(o=0?n:i,e)))}intersectsBox(t){return null!==this.intersectBox(t,Kt)}intersectTriangle(t,e,n,i,r){ne.subVectors(e,t),ie.subVectors(n,t),re.crossVectors(ne,ie);let s,a=this.direction.dot(re);if(a>0){if(i)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}ee.subVectors(this.origin,t);const o=s*this.direction.dot(ie.crossVectors(ee,ie));if(o<0)return null;const l=s*this.direction.dot(ne.cross(ee));if(l<0)return null;if(o+l>a)return null;const c=-s*ee.dot(re);return c<0?null:this.at(c/a,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class ae{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,i,r,s,a,o,l,c,h,u,d,p,m,f){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=i,g[1]=r,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=m,g[15]=f,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new ae).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,i=1/oe.setFromMatrixColumn(t,0).length(),r=1/oe.setFromMatrixColumn(t,1).length(),s=1/oe.setFromMatrixColumn(t,2).length();return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=0,e[4]=n[4]*r,e[5]=n[5]*r,e[6]=n[6]*r,e[7]=0,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const e=this.elements,n=t.x,i=t.y,r=t.z,s=Math.cos(n),a=Math.sin(n),o=Math.cos(i),l=Math.sin(i),c=Math.cos(r),h=Math.sin(r);if("XYZ"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=-o*h,e[8]=l,e[1]=n+i*l,e[5]=t-r*l,e[9]=-a*o,e[2]=r-t*l,e[6]=i+n*l,e[10]=s*o}else if("YXZ"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t+r*a,e[4]=i*a-n,e[8]=s*l,e[1]=s*h,e[5]=s*c,e[9]=-a,e[2]=n*a-i,e[6]=r+t*a,e[10]=s*o}else if("ZXY"===t.order){const t=o*c,n=o*h,i=l*c,r=l*h;e[0]=t-r*a,e[4]=-s*h,e[8]=i+n*a,e[1]=n+i*a,e[5]=s*c,e[9]=r-t*a,e[2]=-s*l,e[6]=a,e[10]=s*o}else if("ZYX"===t.order){const t=s*c,n=s*h,i=a*c,r=a*h;e[0]=o*c,e[4]=i*l-n,e[8]=t*l+r,e[1]=o*h,e[5]=r*l+t,e[9]=n*l-i,e[2]=-l,e[6]=a*o,e[10]=s*o}else if("YZX"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=r-t*h,e[8]=i*h+n,e[1]=h,e[5]=s*c,e[9]=-a*c,e[2]=-l*c,e[6]=n*h+i,e[10]=t-r*h}else if("XZY"===t.order){const t=s*o,n=s*l,i=a*o,r=a*l;e[0]=o*c,e[4]=-h,e[8]=l*c,e[1]=t*h+r,e[5]=s*c,e[9]=n*h-i,e[2]=i*h-n,e[6]=a*c,e[10]=r*h+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(ce,t,he)}lookAt(t,e,n){const i=this.elements;return pe.subVectors(t,e),0===pe.lengthSq()&&(pe.z=1),pe.normalize(),ue.crossVectors(n,pe),0===ue.lengthSq()&&(1===Math.abs(n.z)?pe.x+=1e-4:pe.z+=1e-4,pe.normalize(),ue.crossVectors(n,pe)),ue.normalize(),de.crossVectors(pe,ue),i[0]=ue.x,i[4]=de.x,i[8]=pe.x,i[1]=ue.y,i[5]=de.y,i[9]=pe.y,i[2]=ue.z,i[6]=de.z,i[10]=pe.z,this}multiply(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,i=e.elements,r=this.elements,s=n[0],a=n[4],o=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],m=n[6],f=n[10],g=n[14],v=n[3],y=n[7],x=n[11],_=n[15],b=i[0],M=i[4],w=i[8],S=i[12],T=i[1],E=i[5],A=i[9],L=i[13],R=i[2],C=i[6],P=i[10],D=i[14],I=i[3],N=i[7],B=i[11],z=i[15];return r[0]=s*b+a*T+o*R+l*I,r[4]=s*M+a*E+o*C+l*N,r[8]=s*w+a*A+o*P+l*B,r[12]=s*S+a*L+o*D+l*z,r[1]=c*b+h*T+u*R+d*I,r[5]=c*M+h*E+u*C+d*N,r[9]=c*w+h*A+u*P+d*B,r[13]=c*S+h*L+u*D+d*z,r[2]=p*b+m*T+f*R+g*I,r[6]=p*M+m*E+f*C+g*N,r[10]=p*w+m*A+f*P+g*B,r[14]=p*S+m*L+f*D+g*z,r[3]=v*b+y*T+x*R+_*I,r[7]=v*M+y*E+x*C+_*N,r[11]=v*w+y*A+x*P+_*B,r[15]=v*S+y*L+x*D+_*z,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],i=t[8],r=t[12],s=t[1],a=t[5],o=t[9],l=t[13],c=t[2],h=t[6],u=t[10],d=t[14];return t[3]*(+r*o*h-i*l*h-r*a*u+n*l*u+i*a*d-n*o*d)+t[7]*(+e*o*d-e*l*u+r*s*u-i*s*d+i*l*c-r*o*c)+t[11]*(+e*l*h-e*a*d-r*s*h+n*s*d+r*a*c-n*l*c)+t[15]*(-i*a*c-e*o*h+e*a*u+i*s*h-n*s*u+n*o*c)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=e,i[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],l=t[7],c=t[8],h=t[9],u=t[10],d=t[11],p=t[12],m=t[13],f=t[14],g=t[15],v=h*f*l-m*u*l+m*o*d-a*f*d-h*o*g+a*u*g,y=p*u*l-c*f*l-p*o*d+s*f*d+c*o*g-s*u*g,x=c*m*l-p*h*l+p*a*d-s*m*d-c*a*g+s*h*g,_=p*h*o-c*m*o-p*a*u+s*m*u+c*a*f-s*h*f,b=e*v+n*y+i*x+r*_;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const M=1/b;return t[0]=v*M,t[1]=(m*u*r-h*f*r-m*i*d+n*f*d+h*i*g-n*u*g)*M,t[2]=(a*f*r-m*o*r+m*i*l-n*f*l-a*i*g+n*o*g)*M,t[3]=(h*o*r-a*u*r-h*i*l+n*u*l+a*i*d-n*o*d)*M,t[4]=y*M,t[5]=(c*f*r-p*u*r+p*i*d-e*f*d-c*i*g+e*u*g)*M,t[6]=(p*o*r-s*f*r-p*i*l+e*f*l+s*i*g-e*o*g)*M,t[7]=(s*u*r-c*o*r+c*i*l-e*u*l-s*i*d+e*o*d)*M,t[8]=x*M,t[9]=(p*h*r-c*m*r-p*n*d+e*m*d+c*n*g-e*h*g)*M,t[10]=(s*m*r-p*a*r+p*n*l-e*m*l-s*n*g+e*a*g)*M,t[11]=(c*a*r-s*h*r-c*n*l+e*h*l+s*n*d-e*a*d)*M,t[12]=_*M,t[13]=(c*m*i-p*h*i+p*n*u-e*m*u-c*n*f+e*h*f)*M,t[14]=(p*a*i-s*m*i-p*n*o+e*m*o+s*n*f-e*a*f)*M,t[15]=(s*h*i-c*a*i+c*n*o-e*h*o-s*n*u+e*a*u)*M,this}scale(t){const e=this.elements,n=t.x,i=t.y,r=t.z;return e[0]*=n,e[4]*=i,e[8]*=r,e[1]*=n,e[5]*=i,e[9]*=r,e[2]*=n,e[6]*=i,e[10]*=r,e[3]*=n,e[7]*=i,e[11]*=r,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,a=t.y,o=t.z,l=r*s,c=r*a;return this.set(l*s+n,l*a-i*o,l*o+i*a,0,l*a+i*o,c*a+n,c*o-i*s,0,l*o-i*a,c*o+i*s,r*o*o+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,i,r,s){return this.set(1,n,r,0,t,1,s,0,e,i,1,0,0,0,0,1),this}compose(t,e,n){const i=this.elements,r=e._x,s=e._y,a=e._z,o=e._w,l=r+r,c=s+s,h=a+a,u=r*l,d=r*c,p=r*h,m=s*c,f=s*h,g=a*h,v=o*l,y=o*c,x=o*h,_=n.x,b=n.y,M=n.z;return i[0]=(1-(m+g))*_,i[1]=(d+x)*_,i[2]=(p-y)*_,i[3]=0,i[4]=(d-x)*b,i[5]=(1-(u+g))*b,i[6]=(f+v)*b,i[7]=0,i[8]=(p+y)*M,i[9]=(f-v)*M,i[10]=(1-(u+m))*M,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,e,n){const i=this.elements;let r=oe.set(i[0],i[1],i[2]).length();const s=oe.set(i[4],i[5],i[6]).length(),a=oe.set(i[8],i[9],i[10]).length();this.determinant()<0&&(r=-r),t.x=i[12],t.y=i[13],t.z=i[14],le.copy(this);const o=1/r,l=1/s,c=1/a;return le.elements[0]*=o,le.elements[1]*=o,le.elements[2]*=o,le.elements[4]*=l,le.elements[5]*=l,le.elements[6]*=l,le.elements[8]*=c,le.elements[9]*=c,le.elements[10]*=c,e.setFromRotationMatrix(le),n.x=r,n.y=s,n.z=a,this}makePerspective(t,e,n,i,r,s){void 0===s&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const a=this.elements,o=2*r/(e-t),l=2*r/(n-i),c=(e+t)/(e-t),h=(n+i)/(n-i),u=-(s+r)/(s-r),d=-2*s*r/(s-r);return a[0]=o,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,n,i,r,s){const a=this.elements,o=1/(e-t),l=1/(n-i),c=1/(s-r),h=(e+t)*o,u=(n+i)*l,d=(s+r)*c;return a[0]=2*o,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}ae.prototype.isMatrix4=!0;const oe=new Rt,le=new ae,ce=new Rt(0,0,0),he=new Rt(1,1,1),ue=new Rt,de=new Rt,pe=new Rt,me=new ae,fe=new Lt;class ge{constructor(t=0,e=0,n=0,i=ge.DefaultOrder){this._x=t,this._y=e,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,i=this._order){return this._x=t,this._y=e,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){const i=t.elements,r=i[0],s=i[4],a=i[8],o=i[1],l=i[5],c=i[9],h=i[2],u=i[6],d=i[10];switch(e){case"XYZ":this._y=Math.asin(ht(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,r)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-ht(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,r),this._z=0);break;case"ZXY":this._x=Math.asin(ht(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-ht(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(ht(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-ht(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return me.makeRotationFromQuaternion(t),this.setFromRotationMatrix(me,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return fe.setFromEuler(this),this.setFromQuaternion(fe,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new Rt(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}}ge.prototype.isEuler=!0,ge.DefaultOrder="XYZ",ge.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class ve{constructor(){this.mask=1}set(t){this.mask=1<1){for(let t=0;t1){for(let t=0;t0){i.children=[];for(let e=0;e0){i.animations=[];for(let e=0;e0&&(n.geometries=e),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),a.length>0&&(n.images=a),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c)}return n.object=i,n;function s(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(t,e,n,i,r){De.subVectors(i,e),Ie.subVectors(n,e),Ne.subVectors(t,e);const s=De.dot(De),a=De.dot(Ie),o=De.dot(Ne),l=Ie.dot(Ie),c=Ie.dot(Ne),h=s*l-a*a;if(0===h)return r.set(-2,-1,-1);const u=1/h,d=(l*o-a*c)*u,p=(s*c-a*o)*u;return r.set(1-d-p,p,d)}static containsPoint(t,e,n,i){return this.getBarycoord(t,e,n,i,Be),Be.x>=0&&Be.y>=0&&Be.x+Be.y<=1}static getUV(t,e,n,i,r,s,a,o){return this.getBarycoord(t,e,n,i,Be),o.set(0,0),o.addScaledVector(r,Be.x),o.addScaledVector(s,Be.y),o.addScaledVector(a,Be.z),o}static isFrontFacing(t,e,n,i){return De.subVectors(n,e),Ie.subVectors(t,e),De.cross(Ie).dot(i)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,i){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[i]),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return De.subVectors(this.c,this.b),Ie.subVectors(this.a,this.b),.5*De.cross(Ie).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ke.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return ke.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,i,r){return ke.getUV(t,this.a,this.b,this.c,e,n,i,r)}containsPoint(t){return ke.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ke.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,i=this.b,r=this.c;let s,a;ze.subVectors(i,n),Fe.subVectors(r,n),He.subVectors(t,n);const o=ze.dot(He),l=Fe.dot(He);if(o<=0&&l<=0)return e.copy(n);Ue.subVectors(t,i);const c=ze.dot(Ue),h=Fe.dot(Ue);if(c>=0&&h<=c)return e.copy(i);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),e.copy(n).addScaledVector(ze,s);Ge.subVectors(t,r);const d=ze.dot(Ge),p=Fe.dot(Ge);if(p>=0&&d<=p)return e.copy(r);const m=d*l-o*p;if(m<=0&&l>=0&&p<=0)return a=l/(l-p),e.copy(n).addScaledVector(Fe,a);const f=c*p-d*h;if(f<=0&&h-c>=0&&d-p>=0)return Oe.subVectors(r,i),a=(h-c)/(h-c+(d-p)),e.copy(i).addScaledVector(Oe,a);const g=1/(f+m+u);return s=m*g,a=u*g,e.copy(n).addScaledVector(ze,s).addScaledVector(Fe,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}let Ve=0;class We extends rt{constructor(){super(),Object.defineProperty(this,"id",{value:Ve++}),this.uuid=ct(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=n,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=tt,this.stencilZFail=tt,this.stencilZPass=tt,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if("shading"===e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;continue}const i=this[e];void 0!==i?i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[e]=n:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function i(t){const e=[];for(const n in t){const i=t[n];delete i.metadata,e.push(i)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),this.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(n.morphTargets=!0),!0===this.morphNormals&&(n.morphNormals=!0),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),e){const e=i(t.textures),r=i(t.images);e.length>0&&(n.textures=e),r.length>0&&(n.images=r)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let i=0;i!==t;++i)n[i]=e[i].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}}We.prototype.isMaterial=!0;const je={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},qe={h:0,s:0,l:0},Xe={h:0,s:0,l:0};function Ye(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}function Je(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Ze(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class Qe{constructor(t,e,n){return void 0===e&&void 0===n?this.set(t):this.setRGB(t,e,n)}set(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this}setRGB(t,e,n){return this.r=t,this.g=e,this.b=n,this}setHSL(t,e,n){if(t=ut(t,1),e=ht(e,0,1),n=ht(n,0,1),0===e)this.r=this.g=this.b=n;else{const i=n<=.5?n*(1+e):n+e-n*e,r=2*n-i;this.r=Ye(r,i,t+1/3),this.g=Ye(r,i,t),this.b=Ye(r,i,t-1/3)}return this}setStyle(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let t;const i=n[1],r=n[2];switch(i){case"rgb":case"rgba":if(t=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(255,parseInt(t[1],10))/255,this.g=Math.min(255,parseInt(t[2],10))/255,this.b=Math.min(255,parseInt(t[3],10))/255,e(t[4]),this;if(t=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))return this.r=Math.min(100,parseInt(t[1],10))/100,this.g=Math.min(100,parseInt(t[2],10))/100,this.b=Math.min(100,parseInt(t[3],10))/100,e(t[4]),this;break;case"hsl":case"hsla":if(t=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r)){const n=parseFloat(t[1])/360,i=parseInt(t[2],10)/100,r=parseInt(t[3],10)/100;return e(t[4]),this.setHSL(n,i,r)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){const t=n[1],e=t.length;if(3===e)return this.r=parseInt(t.charAt(0)+t.charAt(0),16)/255,this.g=parseInt(t.charAt(1)+t.charAt(1),16)/255,this.b=parseInt(t.charAt(2)+t.charAt(2),16)/255,this;if(6===e)return this.r=parseInt(t.charAt(0)+t.charAt(1),16)/255,this.g=parseInt(t.charAt(2)+t.charAt(3),16)/255,this.b=parseInt(t.charAt(4)+t.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){const e=je[t.toLowerCase()];return void 0!==e?this.setHex(e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyGammaToLinear(t,e=2){return this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this}copyLinearToGamma(t,e=2){const n=e>0?1/e:1;return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.r=Je(t.r),this.g=Je(t.g),this.b=Je(t.b),this}copyLinearToSRGB(t){return this.r=Ze(t.r),this.g=Ze(t.g),this.b=Ze(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){const e=this.r,n=this.g,i=this.b,r=Math.max(e,n,i),s=Math.min(e,n,i);let a,o;const l=(s+r)/2;if(s===r)a=0,o=0;else{const t=r-s;switch(o=l<=.5?t/(r+s):t/(2-r-s),r){case e:a=(n-i)/t+(ne&&(e=t[n]);return e}const mn={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function fn(t,e){return new mn[t](e)}let gn=0;const vn=new ae,yn=new Pe,xn=new Rt,_n=new Dt,bn=new Dt,Mn=new Rt;class wn extends rt{constructor(){super(),Object.defineProperty(this,"id",{value:gn++}),this.uuid=ct(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(pn(t)>65535?cn:on)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return void 0!==this.attributes[t]}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const e=(new yt).getNormalMatrix(t);n.applyNormalMatrix(e),n.needsUpdate=!0}const i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(t),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(t){return vn.makeRotationFromQuaternion(t),this.applyMatrix4(vn),this}rotateX(t){return vn.makeRotationX(t),this.applyMatrix4(vn),this}rotateY(t){return vn.makeRotationY(t),this.applyMatrix4(vn),this}rotateZ(t){return vn.makeRotationZ(t),this.applyMatrix4(vn),this}translate(t,e,n){return vn.makeTranslation(t,e,n),this.applyMatrix4(vn),this}scale(t,e,n){return vn.makeScale(t,e,n),this.applyMatrix4(vn),this}lookAt(t){return yn.lookAt(t),yn.updateMatrix(),this.applyMatrix4(yn.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(xn).negate(),this.translate(xn.x,xn.y,xn.z),this}setFromPoints(t){const e=[];for(let n=0,i=t.length;n0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const i=n[e];t.data.attributes[e]=i.toJSON(t.data)}const i={};let r=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],s=[];for(let e=0,i=n.length;e0&&(i[e]=s,r=!0)}r&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new wn).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const i=t.attributes;for(const t in i){const n=i[t];this.setAttribute(t,n.clone(e))}const r=t.morphAttributes;for(const t in r){const n=[],i=r[t];for(let t=0,r=i.length;t0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(t,e){const n=this.geometry,i=this.material,r=this.matrixWorld;if(void 0===i)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),En.copy(n.boundingSphere),En.applyMatrix4(r),!1===t.ray.intersectsSphere(En))return;if(Sn.copy(r).invert(),Tn.copy(t.ray).applyMatrix4(Sn),null!==n.boundingBox&&!1===Tn.intersectsBox(n.boundingBox))return;let s;if(n.isBufferGeometry){const r=n.index,a=n.attributes.position,o=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,h=n.attributes.uv2,u=n.groups,d=n.drawRange;if(null!==r)if(Array.isArray(i))for(let n=0,p=u.length;nn.far?null:{distance:c,point:Un.clone(),object:t}}(t,e,n,i,An,Ln,Rn,Hn);if(p){o&&(zn.fromBufferAttribute(o,c),Fn.fromBufferAttribute(o,h),On.fromBufferAttribute(o,u),p.uv=ke.getUV(Hn,An,Ln,Rn,zn,Fn,On,new vt)),l&&(zn.fromBufferAttribute(l,c),Fn.fromBufferAttribute(l,h),On.fromBufferAttribute(l,u),p.uv2=ke.getUV(Hn,An,Ln,Rn,zn,Fn,On,new vt));const t={a:c,b:h,c:u,normal:new Rt,materialIndex:0};ke.getNormal(An,Ln,Rn,t.normal),p.face=t}return p}Gn.prototype.isMesh=!0;class Vn extends wn{constructor(t=1,e=1,n=1,i=1,r=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:i,heightSegments:r,depthSegments:s};const a=this;i=Math.floor(i),r=Math.floor(r),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function p(t,e,n,i,r,s,p,m,f,g,v){const y=s/f,x=p/g,_=s/2,b=p/2,M=m/2,w=f+1,S=g+1;let T=0,E=0;const A=new Rt;for(let s=0;s0?1:-1,c.push(A.x,A.y,A.z),h.push(o/f),h.push(1-s/g),T+=1}}for(let t=0;t0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}Xn.prototype.isShaderMaterial=!0;class Yn extends Pe{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new ae,this.projectionMatrix=new ae,this.projectionMatrixInverse=new ae}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}Yn.prototype.isCamera=!0;class Jn extends Yn{constructor(t=50,e=1,n=.1,i=2e3){super(),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*lt*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*ot*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*lt*Math.atan(Math.tan(.5*ot*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,i,r,s){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=i,this.view.width=r,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*ot*this.fov)/this.zoom,n=2*e,i=this.aspect*n,r=-.5*i;const s=this.view;if(null!==this.view&&this.view.enabled){const t=s.fullWidth,a=s.fullHeight;r+=s.offsetX*i/t,e-=s.offsetY*n/a,i*=s.width/t,n*=s.height/a}const a=this.filmOffset;0!==a&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}Jn.prototype.isPerspectiveCamera=!0;const Zn=90;class Qn extends Pe{constructor(t,e,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const i=new Jn(Zn,1,t,e);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new Rt(1,0,0)),this.add(i);const r=new Jn(Zn,1,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new Rt(-1,0,0)),this.add(r);const s=new Jn(Zn,1,t,e);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new Rt(0,1,0)),this.add(s);const a=new Jn(Zn,1,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new Rt(0,-1,0)),this.add(a);const o=new Jn(Zn,1,t,e);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new Rt(0,0,1)),this.add(o);const l=new Jn(Zn,1,t,e);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new Rt(0,0,-1)),this.add(l)}update(t,e){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[i,r,s,a,o,l]=this.children,c=t.xr.enabled,h=t.getRenderTarget();t.xr.enabled=!1;const u=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,i),t.setRenderTarget(n,1),t.render(e,r),t.setRenderTarget(n,2),t.render(e,s),t.setRenderTarget(n,3),t.render(e,a),t.setRenderTarget(n,4),t.render(e,o),n.texture.generateMipmaps=u,t.setRenderTarget(n,5),t.render(e,l),t.setRenderTarget(h),t.xr.enabled=c}}class Kn extends Mt{constructor(t,e,n,i,s,a,o,l,c,h){super(t=void 0!==t?t:[],e=void 0!==e?e:r,n,i,s,a,o=void 0!==o?o:T,l,c,h),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}Kn.prototype.isCubeTexture=!0;class $n extends Tt{constructor(t,e,n){Number.isInteger(e)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),e=n),super(t,t,e),e=e||{},this.texture=new Kn(void 0,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:g,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.format=E,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},i=new Vn(5,5,5),r=new Xn({name:"CubemapFromEquirect",uniforms:Wn(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=e;const s=new Gn(i,r),a=e.minFilter;e.minFilter===y&&(e.minFilter=g);return new Qn(1,10,this).update(t,s),e.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,n,i){const r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,n,i);t.setRenderTarget(r)}}$n.prototype.isWebGLCubeRenderTarget=!0;const ti=new Rt,ei=new Rt,ni=new yt;class ii{constructor(t=new Rt(1,0,0),e=0){this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,i){return this.normal.set(t,e,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const i=ti.subVectors(n,e).cross(ei.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){const n=t.delta(ti),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const r=-(t.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:e.copy(n).multiplyScalar(r).add(t.start)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||ni.getNormalMatrix(t),i=this.coplanarPoint(ti).applyMatrix4(t),r=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}ii.prototype.isPlane=!0;const ri=new Qt,si=new Rt;class ai{constructor(t=new ii,e=new ii,n=new ii,i=new ii,r=new ii,s=new ii){this.planes=[t,e,n,i,r,s]}set(t,e,n,i,r,s){const a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(i),a[4].copy(r),a[5].copy(s),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){const e=this.planes,n=t.elements,i=n[0],r=n[1],s=n[2],a=n[3],o=n[4],l=n[5],c=n[6],h=n[7],u=n[8],d=n[9],p=n[10],m=n[11],f=n[12],g=n[13],v=n[14],y=n[15];return e[0].setComponents(a-i,h-o,m-u,y-f).normalize(),e[1].setComponents(a+i,h+o,m+u,y+f).normalize(),e[2].setComponents(a+r,h+l,m+d,y+g).normalize(),e[3].setComponents(a-r,h-l,m-d,y-g).normalize(),e[4].setComponents(a-s,h-c,m-p,y-v).normalize(),e[5].setComponents(a+s,h+c,m+p,y+v).normalize(),this}intersectsObject(t){const e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),ri.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(ri)}intersectsSprite(t){return ri.center.set(0,0,0),ri.radius=.7071067811865476,ri.applyMatrix4(t.matrixWorld),this.intersectsSphere(ri)}intersectsSphere(t){const e=this.planes,n=t.center,i=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(n)0?t.max.x:t.min.x,si.y=i.normal.y>0?t.max.y:t.min.y,si.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(si)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function oi(){let t=null,e=!1,n=null,i=null;function r(e,s){n(e,s),i=t.requestAnimationFrame(r)}return{start:function(){!0!==e&&null!==n&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function li(t,e){const n=e.isWebGL2,i=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),i.get(t)},remove:function(e){e.isInterleavedBufferAttribute&&(e=e.data);const n=i.get(e);n&&(t.deleteBuffer(n.buffer),i.delete(e))},update:function(e,r){if(e.isGLBufferAttribute){const t=i.get(e);return void((!t||t.version 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(\t\t0, 1,\t\t0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(\t1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,\t1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,\t1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSNMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n\tvec3 v = normalize( cameraPosition - pos );\n\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n\tvec3 transmission = transmissionFactor * getIBLVolumeRefraction(\n\t\tnormal, v, roughnessFactor, material.diffuseColor, totalSpecular,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec4 vWorldPosition;\n\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n\t\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\n\t\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\n\t\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\n\t\treturn normalize(refractionVector) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness(float roughness, float ior) {\n\t\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n\t}\n\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n\t\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n\t\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n\t}\n\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n\t\tif (attenuationDistance == 0.0) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n\t\t\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, float attenuationDistance) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n\t\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n\t\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform vec3 attenuationColor;\n\tuniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#ifdef USE_TRANSMISSION\n\tvarying vec4 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition;\n#endif\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"},ui={common:{diffuse:{value:new Qe(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new yt},uv2Transform:{value:new yt},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new vt(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new yt}},sprite:{diffuse:{value:new Qe(16777215)},opacity:{value:1},center:{value:new vt(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new yt}}},di={basic:{uniforms:jn([ui.common,ui.specularmap,ui.envmap,ui.aomap,ui.lightmap,ui.fog]),vertexShader:hi.meshbasic_vert,fragmentShader:hi.meshbasic_frag},lambert:{uniforms:jn([ui.common,ui.specularmap,ui.envmap,ui.aomap,ui.lightmap,ui.emissivemap,ui.fog,ui.lights,{emissive:{value:new Qe(0)}}]),vertexShader:hi.meshlambert_vert,fragmentShader:hi.meshlambert_frag},phong:{uniforms:jn([ui.common,ui.specularmap,ui.envmap,ui.aomap,ui.lightmap,ui.emissivemap,ui.bumpmap,ui.normalmap,ui.displacementmap,ui.fog,ui.lights,{emissive:{value:new Qe(0)},specular:{value:new Qe(1118481)},shininess:{value:30}}]),vertexShader:hi.meshphong_vert,fragmentShader:hi.meshphong_frag},standard:{uniforms:jn([ui.common,ui.envmap,ui.aomap,ui.lightmap,ui.emissivemap,ui.bumpmap,ui.normalmap,ui.displacementmap,ui.roughnessmap,ui.metalnessmap,ui.fog,ui.lights,{emissive:{value:new Qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:hi.meshphysical_vert,fragmentShader:hi.meshphysical_frag},toon:{uniforms:jn([ui.common,ui.aomap,ui.lightmap,ui.emissivemap,ui.bumpmap,ui.normalmap,ui.displacementmap,ui.gradientmap,ui.fog,ui.lights,{emissive:{value:new Qe(0)}}]),vertexShader:hi.meshtoon_vert,fragmentShader:hi.meshtoon_frag},matcap:{uniforms:jn([ui.common,ui.bumpmap,ui.normalmap,ui.displacementmap,ui.fog,{matcap:{value:null}}]),vertexShader:hi.meshmatcap_vert,fragmentShader:hi.meshmatcap_frag},points:{uniforms:jn([ui.points,ui.fog]),vertexShader:hi.points_vert,fragmentShader:hi.points_frag},dashed:{uniforms:jn([ui.common,ui.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hi.linedashed_vert,fragmentShader:hi.linedashed_frag},depth:{uniforms:jn([ui.common,ui.displacementmap]),vertexShader:hi.depth_vert,fragmentShader:hi.depth_frag},normal:{uniforms:jn([ui.common,ui.bumpmap,ui.normalmap,ui.displacementmap,{opacity:{value:1}}]),vertexShader:hi.normal_vert,fragmentShader:hi.normal_frag},sprite:{uniforms:jn([ui.sprite,ui.fog]),vertexShader:hi.sprite_vert,fragmentShader:hi.sprite_frag},background:{uniforms:{uvTransform:{value:new yt},t2D:{value:null}},vertexShader:hi.background_vert,fragmentShader:hi.background_frag},cube:{uniforms:jn([ui.envmap,{opacity:{value:1}}]),vertexShader:hi.cube_vert,fragmentShader:hi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:hi.equirect_vert,fragmentShader:hi.equirect_frag},distanceRGBA:{uniforms:jn([ui.common,ui.displacementmap,{referencePosition:{value:new Rt},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:hi.distanceRGBA_vert,fragmentShader:hi.distanceRGBA_frag},shadow:{uniforms:jn([ui.lights,ui.fog,{color:{value:new Qe(0)},opacity:{value:1}}]),vertexShader:hi.shadow_vert,fragmentShader:hi.shadow_frag}};function pi(t,e,n,i,r){const s=new Qe(0);let a,o,c=0,h=null,u=0,d=null;function p(t,e){n.buffers.color.setClear(t.r,t.g,t.b,e,r)}return{getClearColor:function(){return s},setClearColor:function(t,e=1){s.set(t),c=e,p(s,c)},getClearAlpha:function(){return c},setClearAlpha:function(t){c=t,p(s,c)},render:function(n,r){let m=!1,f=!0===r.isScene?r.background:null;f&&f.isTexture&&(f=e.get(f));const g=t.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(f=null),null===f?p(s,c):f&&f.isColor&&(p(f,1),m=!0),(t.autoClear||m)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),f&&(f.isCubeTexture||f.mapping===l)?(void 0===o&&(o=new Gn(new Vn(1,1,1),new Xn({name:"BackgroundCubeMaterial",uniforms:Wn(di.cube.uniforms),vertexShader:di.cube.vertexShader,fragmentShader:di.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),o.geometry.deleteAttribute("normal"),o.geometry.deleteAttribute("uv"),o.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(o.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(o)),o.material.uniforms.envMap.value=f,o.material.uniforms.flipEnvMap.value=f.isCubeTexture&&f._needsFlipEnvMap?-1:1,h===f&&u===f.version&&d===t.toneMapping||(o.material.needsUpdate=!0,h=f,u=f.version,d=t.toneMapping),n.unshift(o,o.geometry,o.material,0,0,null)):f&&f.isTexture&&(void 0===a&&(a=new Gn(new ci(2,2),new Xn({name:"BackgroundMaterial",uniforms:Wn(di.background.uniforms),vertexShader:di.background.vertexShader,fragmentShader:di.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(a)),a.material.uniforms.t2D.value=f,!0===f.matrixAutoUpdate&&f.updateMatrix(),a.material.uniforms.uvTransform.value.copy(f.matrix),h===f&&u===f.version&&d===t.toneMapping||(a.material.needsUpdate=!0,h=f,u=f.version,d=t.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null))}}}function mi(t,e,n,i){const r=t.getParameter(34921),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),a=i.isWebGL2||null!==s,o={},l=d(null);let c=l;function h(e){return i.isWebGL2?t.bindVertexArray(e):s.bindVertexArrayOES(e)}function u(e){return i.isWebGL2?t.deleteVertexArray(e):s.deleteVertexArrayOES(e)}function d(t){const e=[],n=[],i=[];for(let t=0;t=0){const s=l[e];if(void 0!==s){const e=s.normalized,r=s.itemSize,a=n.get(s);if(void 0===a)continue;const l=a.buffer,c=a.type,h=a.bytesPerElement;if(s.isInterleavedBufferAttribute){const n=s.data,a=n.stride,u=s.offset;n&&n.isInstancedInterleavedBuffer?(f(i,n.meshPerAttribute),void 0===o._maxInstanceCount&&(o._maxInstanceCount=n.meshPerAttribute*n.count)):m(i),t.bindBuffer(34962,l),v(i,r,c,e,a*h,u*h)}else s.isInstancedBufferAttribute?(f(i,s.meshPerAttribute),void 0===o._maxInstanceCount&&(o._maxInstanceCount=s.meshPerAttribute*s.count)):m(i),t.bindBuffer(34962,l),v(i,r,c,e,0,0)}else if("instanceMatrix"===e){const e=n.get(r.instanceMatrix);if(void 0===e)continue;const s=e.buffer,a=e.type;f(i+0,1),f(i+1,1),f(i+2,1),f(i+3,1),t.bindBuffer(34962,s),t.vertexAttribPointer(i+0,4,a,!1,64,0),t.vertexAttribPointer(i+1,4,a,!1,64,16),t.vertexAttribPointer(i+2,4,a,!1,64,32),t.vertexAttribPointer(i+3,4,a,!1,64,48)}else if("instanceColor"===e){const e=n.get(r.instanceColor);if(void 0===e)continue;const s=e.buffer,a=e.type;f(i,1),t.bindBuffer(34962,s),t.vertexAttribPointer(i,3,a,!1,12,0)}else if(void 0!==h){const n=h[e];if(void 0!==n)switch(n.length){case 2:t.vertexAttrib2fv(i,n);break;case 3:t.vertexAttrib3fv(i,n);break;case 4:t.vertexAttrib4fv(i,n);break;default:t.vertexAttrib1fv(i,n)}}}}g()}(r,l,u,y),null!==x&&t.bindBuffer(34963,n.get(x).buffer))},reset:y,resetDefaultState:x,dispose:function(){y();for(const t in o){const e=o[t];for(const t in e){const n=e[t];for(const t in n)u(n[t].object),delete n[t];delete e[t]}delete o[t]}},releaseStatesOfGeometry:function(t){if(void 0===o[t.id])return;const e=o[t.id];for(const t in e){const n=e[t];for(const t in n)u(n[t].object),delete n[t];delete e[t]}delete o[t.id]},releaseStatesOfProgram:function(t){for(const e in o){const n=o[e];if(void 0===n[t.id])continue;const i=n[t.id];for(const t in i)u(i[t].object),delete i[t];delete n[t.id]}},initAttributes:p,enableAttribute:m,disableUnusedAttributes:g}}function fi(t,e,n,i){const r=i.isWebGL2;let s;this.setMode=function(t){s=t},this.render=function(e,i){t.drawArrays(s,e,i),n.update(i,s,1)},this.renderInstances=function(i,a,o){if(0===o)return;let l,c;if(r)l=t,c="drawArraysInstanced";else if(l=e.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](s,i,a,o),n.update(a,s,o)}}function gi(t,e,n){let i;function r(e){if("highp"===e){if(t.getShaderPrecisionFormat(35633,36338).precision>0&&t.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(35633,36337).precision>0&&t.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&t instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const o=r(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=s||e.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,h=t.getParameter(34930),u=t.getParameter(35660),d=t.getParameter(3379),p=t.getParameter(34076),m=t.getParameter(34921),f=t.getParameter(36347),g=t.getParameter(36348),v=t.getParameter(36349),y=u>0,x=s||e.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===e.has("EXT_texture_filter_anisotropic")){const n=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:m,maxVertexUniforms:f,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:y&&x,maxSamples:s?t.getParameter(36183):0}}function vi(t){const e=this;let n=null,i=0,r=!1,s=!1;const a=new ii,o=new yt,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(t,n,i,r){const s=null!==t?t.length:0;let c=null;if(0!==s){if(c=l.value,!0!==r||null===c){const e=i+4*s,r=n.matrixWorldInverse;o.getNormalMatrix(r),(null===c||c.length0){const a=t.getRenderTarget(),o=new $n(s.height/2);return o.fromEquirectangularTexture(t,r),e.set(r,o),t.setRenderTarget(a),r.addEventListener("dispose",i),n(o.texture,r.mapping)}return null}}}return r},dispose:function(){e=new WeakMap}}}function xi(t){const e={};function n(n){if(void 0!==e[n])return e[n];let i;switch(n){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=t.getExtension(n)}return e[n]=i,i}return{has:function(t){return null!==n(t)},init:function(t){t.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(t){const e=n(t);return null===e&&console.warn("THREE.WebGLRenderer: "+t+" extension not supported."),e}}}function _i(t,e,n,i){const r={},s=new WeakMap;function a(t){const o=t.target;null!==o.index&&e.remove(o.index);for(const t in o.attributes)e.remove(o.attributes[t]);o.removeEventListener("dispose",a),delete r[o.id];const l=s.get(o);l&&(e.remove(l),s.delete(o)),i.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,n.memory.geometries--}function o(t){const n=[],i=t.index,r=t.attributes.position;let a=0;if(null!==i){const t=i.array;a=i.version;for(let e=0,i=t.length;e65535?cn:on)(n,1);o.version=a;const l=s.get(t);l&&e.remove(l),s.set(t,o)}return{get:function(t,e){return!0===r[e.id]||(e.addEventListener("dispose",a),r[e.id]=!0,n.memory.geometries++),e},update:function(t){const n=t.attributes;for(const t in n)e.update(n[t],34962);const i=t.morphAttributes;for(const t in i){const n=i[t];for(let t=0,i=n.length;t0)return t;const r=e*n;let s=Ii[r];if(void 0===s&&(s=new Float32Array(r),Ii[r]=s),0!==e){i.toArray(s,0);for(let i=1,r=0;i!==e;++i)r+=n,t[i].toArray(s,r)}return s}function Hi(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n/gm;function kr(t){return t.replace(Gr,Vr)}function Vr(t,e){const n=hi[e];if(void 0===n)throw new Error("Can not resolve #include <"+e+">");return kr(n)}const Wr=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,jr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function qr(t){return t.replace(jr,Yr).replace(Wr,Xr)}function Xr(t,e,n,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Yr(t,e,n,i)}function Yr(t,e,n,i){let r="";for(let t=parseInt(e);t0?t.gammaFactor:1,v=n.isWebGL2?"":function(t){return[t.extensionDerivatives||t.envMapCubeUV||t.bumpMap||t.tangentSpaceNormalMap||t.clearcoatNormalMap||t.flatShading||"physical"===t.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission>0)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Or).join("\n")}(n),y=function(t){const e=[];for(const n in t){const i=t[n];!1!==i&&e.push("#define "+n+" "+i)}return e.join("\n")}(o),x=a.createProgram();let _,b,M=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(_=[y].filter(Or).join("\n"),_.length>0&&(_+="\n"),b=[v,y].filter(Or).join("\n"),b.length>0&&(b+="\n")):(_=[Jr(n),"#define SHADER_NAME "+n.shaderName,y,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+g,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+m:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+d:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Or).join("\n"),b=[v,Jr(n),"#define SHADER_NAME "+n.shaderName,y,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+g,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+p:"",n.envMap?"#define "+m:"",n.envMap?"#define "+f:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+d:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?hi.tonemapping_pars_fragment:"",0!==n.toneMapping?Fr("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",hi.encodings_pars_fragment,n.map?Br("mapTexelToLinear",n.mapEncoding):"",n.matcap?Br("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Br("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Br("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?Br("lightMapTexelToLinear",n.lightMapEncoding):"",zr("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Or).join("\n")),h=kr(h),h=Hr(h,n),h=Ur(h,n),u=kr(u),u=Hr(u,n),u=Ur(u,n),h=qr(h),u=qr(u),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(M="#version 300 es\n",_=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+_,b=["#define varying in",n.glslVersion===it?"":"out highp vec4 pc_fragColor;",n.glslVersion===it?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+b);const w=M+b+u,S=Pr(a,35633,M+_+h),T=Pr(a,35632,w);if(a.attachShader(x,S),a.attachShader(x,T),void 0!==n.index0AttributeName?a.bindAttribLocation(x,0,n.index0AttributeName):!0===n.morphTargets&&a.bindAttribLocation(x,0,"position"),a.linkProgram(x),t.debug.checkShaderErrors){const t=a.getProgramInfoLog(x).trim(),e=a.getShaderInfoLog(S).trim(),n=a.getShaderInfoLog(T).trim();let i=!0,r=!0;if(!1===a.getProgramParameter(x,35714)){i=!1;const e=Nr(a,S,"vertex"),n=Nr(a,T,"fragment");console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(x,35715),"gl.getProgramInfoLog",t,e,n)}else""!==t?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",t):""!==e&&""!==n||(r=!1);r&&(this.diagnostics={runnable:i,programLog:t,vertexShader:{log:e,prefix:_},fragmentShader:{log:n,prefix:b}})}let E,A;return a.deleteShader(S),a.deleteShader(T),this.getUniforms=function(){return void 0===E&&(E=new Cr(a,x)),E},this.getAttributes=function(){return void 0===A&&(A=function(t,e){const n={},i=t.getProgramParameter(e,35721);for(let r=0;r0,maxBones:S,useVertexTexture:u,morphTargets:r.morphTargets,morphNormals:r.morphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:r.dithering,shadowMapEnabled:t.shadowMap.enabled&&g.length>0,shadowMapType:t.shadowMap.type,toneMapping:r.toneMapped?t.toneMapping:0,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:r.premultipliedAlpha,alphaTest:r.alphaTest,doubleSided:2===r.side,flipSided:1===r.side,depthPacking:void 0!==r.depthPacking&&r.depthPacking,index0AttributeName:r.index0AttributeName,extensionDerivatives:r.extensions&&r.extensions.derivatives,extensionFragDepth:r.extensions&&r.extensions.fragDepth,extensionDrawBuffers:r.extensions&&r.extensions.drawBuffers,extensionShaderTextureLOD:r.extensions&&r.extensions.shaderTextureLOD,rendererExtensionFragDepth:o||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:o||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:o||n.has("EXT_shader_texture_lod"),customProgramCacheKey:r.customProgramCacheKey()}},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.fragmentShader),n.push(e.vertexShader)),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);if(!1===e.isRawShaderMaterial){for(let t=0;t0?r.push(h):!0===n.transparent?s.push(h):i.push(h)},unshift:function(t,e,n,a,l,c){const h=o(t,e,n,a,l,c);n.transmission>0?r.unshift(h):!0===n.transparent?s.unshift(h):i.unshift(h)},finish:function(){for(let t=n,i=e.length;t1&&i.sort(t||$r),r.length>1&&r.sort(e||ts),s.length>1&&s.sort(e||ts)}}}function ns(t){let e=new WeakMap;return{get:function(n,i){let r;return!1===e.has(n)?(r=new es(t),e.set(n,[r])):i>=e.get(n).length?(r=new es(t),e.get(n).push(r)):r=e.get(n)[i],r},dispose:function(){e=new WeakMap}}}function is(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new Rt,color:new Qe};break;case"SpotLight":n={position:new Rt,direction:new Rt,color:new Qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Rt,color:new Qe,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Rt,skyColor:new Qe,groundColor:new Qe};break;case"RectAreaLight":n={color:new Qe,position:new Rt,halfWidth:new Rt,halfHeight:new Rt}}return t[e.id]=n,n}}}let rs=0;function ss(t,e){return(e.castShadow?1:0)-(t.castShadow?1:0)}function as(t,e){const n=new is,i=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new vt};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new vt,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let t=0;t<9;t++)r.probe.push(new Rt);const s=new Rt,a=new ae,o=new ae;return{setup:function(s){let a=0,o=0,l=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let c=0,h=0,u=0,d=0,p=0,m=0,f=0,g=0;s.sort(ss);for(let t=0,e=s.length;t0&&(e.isWebGL2||!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=ui.LTC_FLOAT_1,r.rectAreaLTC2=ui.LTC_FLOAT_2):!0===t.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=ui.LTC_HALF_1,r.rectAreaLTC2=ui.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=a,r.ambient[1]=o,r.ambient[2]=l;const v=r.hash;v.directionalLength===c&&v.pointLength===h&&v.spotLength===u&&v.rectAreaLength===d&&v.hemiLength===p&&v.numDirectionalShadows===m&&v.numPointShadows===f&&v.numSpotShadows===g||(r.directional.length=c,r.spot.length=u,r.rectArea.length=d,r.point.length=h,r.hemi.length=p,r.directionalShadow.length=m,r.directionalShadowMap.length=m,r.pointShadow.length=f,r.pointShadowMap.length=f,r.spotShadow.length=g,r.spotShadowMap.length=g,r.directionalShadowMatrix.length=m,r.pointShadowMatrix.length=f,r.spotShadowMatrix.length=g,v.directionalLength=c,v.pointLength=h,v.spotLength=u,v.rectAreaLength=d,v.hemiLength=p,v.numDirectionalShadows=m,v.numPointShadows=f,v.numSpotShadows=g,r.version=rs++)},setupView:function(t,e){let n=0,i=0,l=0,c=0,h=0;const u=e.matrixWorldInverse;for(let e=0,d=t.length;e=n.get(i).length?(s=new os(t,e),n.get(i).push(s)):s=n.get(i)[r],s},dispose:function(){n=new WeakMap}}}class cs extends We{constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}cs.prototype.isMeshDepthMaterial=!0;class hs extends We{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new Rt,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}hs.prototype.isMeshDistanceMaterial=!0;function us(t,e,n){let i=new ai;const r=new vt,s=new vt,a=new St,o=[],l=[],c={},h=n.maxTextureSize,u={0:1,1:0,2:2},d=new Xn({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new vt},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),m=d.clone();m.defines.HORIZONTAL_PASS=1;const f=new wn;f.setAttribute("position",new en(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const v=new Gn(f,d),y=this;function x(n,i){const r=e.update(v);d.uniforms.shadow_pass.value=n.map.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(i,null,r,d,v,null),m.uniforms.shadow_pass.value=n.mapPass.texture,m.uniforms.resolution.value=n.mapSize,m.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(i,null,r,m,v,null)}function _(t){const e=t<<0;let n=o[e];return void 0===n&&(n=new cs({depthPacking:3201,morphTargets:t}),o[e]=n),n}function b(t){const e=t<<0;let n=l[e];return void 0===n&&(n=new hs({morphTargets:t}),l[e]=n),n}function M(e,n,i,r,s,a,o){let l=null,h=_,d=e.customDepthMaterial;if(!0===r.isPointLight&&(h=b,d=e.customDistanceMaterial),void 0===d){let t=!1;!0===i.morphTargets&&(t=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0),l=h(t)}else l=d;if(t.localClippingEnabled&&!0===i.clipShadows&&0!==i.clippingPlanes.length){const t=l.uuid,e=i.uuid;let n=c[t];void 0===n&&(n={},c[t]=n);let r=n[e];void 0===r&&(r=l.clone(),n[e]=r),l=r}return l.visible=i.visible,l.wireframe=i.wireframe,l.side=3===o?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:u[i.side],l.clipShadows=i.clipShadows,l.clippingPlanes=i.clippingPlanes,l.clipIntersection=i.clipIntersection,l.wireframeLinewidth=i.wireframeLinewidth,l.linewidth=i.linewidth,!0===r.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(r.matrixWorld),l.nearDistance=s,l.farDistance=a),l}function w(n,r,s,a,o){if(!1===n.visible)return;if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===o)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,n.matrixWorld);const i=e.update(n),r=n.material;if(Array.isArray(r)){const e=i.groups;for(let l=0,c=e.length;lh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/m.x),r.x=s.x*m.x,u.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/m.y),r.y=s.y*m.y,u.mapSize.y=s.y)),null===u.map&&!u.isPointLightShadow&&3===this.type){const t={minFilter:g,magFilter:g,format:E};u.map=new Tt(r.x,r.y,t),u.map.texture.name=c.name+".shadowMap",u.mapPass=new Tt(r.x,r.y,t),u.camera.updateProjectionMatrix()}if(null===u.map){const t={minFilter:p,magFilter:p,format:E};u.map=new Tt(r.x,r.y,t),u.map.texture.name=c.name+".shadowMap",u.camera.updateProjectionMatrix()}t.setRenderTarget(u.map),t.clear();const f=u.getViewportCount();for(let t=0;t=1):-1!==R.indexOf("OpenGL ES")&&(L=parseFloat(/^OpenGL ES (\d)/.exec(R)[1]),A=L>=2);let C=null,P={};const D=t.getParameter(3088),I=t.getParameter(2978),N=(new St).fromArray(D),B=(new St).fromArray(I);function z(e,n,i){const r=new Uint8Array(4),s=t.createTexture();t.bindTexture(e,s),t.texParameteri(e,10241,9728),t.texParameteri(e,10240,9728);for(let e=0;ei||t.height>i)&&(r=i/Math.max(t.width,t.height)),r<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const i=e?ft:Math.floor,s=i(r*t.width),a=i(r*t.height);void 0===P&&(P=I(s,a));const o=n?I(s,a):P;o.width=s,o.height=a;return o.getContext("2d").drawImage(t,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+t.width+"x"+t.height+") to ("+s+"x"+a+")."),o}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+t.width+"x"+t.height+")."),t}return t}function B(t){return pt(t.width)&&pt(t.height)}function z(t,e){return t.generateMipmaps&&e&&t.minFilter!==p&&t.minFilter!==g}function F(e,n,r,s,a=1){t.generateMipmap(e);i.get(n).__maxMipLevel=Math.log2(Math.max(r,s,a))}function O(n,i,r){if(!1===o)return i;if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let s=i;return 6403===i&&(5126===r&&(s=33326),5131===r&&(s=33325),5121===r&&(s=33321)),6407===i&&(5126===r&&(s=34837),5131===r&&(s=34843),5121===r&&(s=32849)),6408===i&&(5126===r&&(s=34836),5131===r&&(s=34842),5121===r&&(s=32856)),33325!==s&&33326!==s&&34842!==s&&34836!==s||e.get("EXT_color_buffer_float"),s}function H(t){return t===p||t===m||t===f?9728:9729}function U(e){const n=e.target;n.removeEventListener("dispose",U),function(e){const n=i.get(e);if(void 0===n.__webglInit)return;t.deleteTexture(n.__webglTexture),i.remove(e)}(n),n.isVideoTexture&&C.delete(n),a.memory.textures--}function G(e){const n=e.target;n.removeEventListener("dispose",G),function(e){const n=e.texture,r=i.get(e),s=i.get(n);if(!e)return;void 0!==s.__webglTexture&&(t.deleteTexture(s.__webglTexture),a.memory.textures--);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++)t.deleteFramebuffer(r.__webglFramebuffer[e]),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer[e]);else t.deleteFramebuffer(r.__webglFramebuffer),r.__webglDepthbuffer&&t.deleteRenderbuffer(r.__webglDepthbuffer),r.__webglMultisampledFramebuffer&&t.deleteFramebuffer(r.__webglMultisampledFramebuffer),r.__webglColorRenderbuffer&&t.deleteRenderbuffer(r.__webglColorRenderbuffer),r.__webglDepthRenderbuffer&&t.deleteRenderbuffer(r.__webglDepthRenderbuffer);if(e.isWebGLMultipleRenderTargets)for(let e=0,r=n.length;e0&&r.__version!==t.version){const n=t.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void J(r,t,e);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+e),n.bindTexture(3553,r.__webglTexture)}function W(e,r){const a=i.get(e);e.version>0&&a.__version!==e.version?function(e,i,r){if(6!==i.image.length)return;Y(e,i),n.activeTexture(33984+r),n.bindTexture(34067,e.__webglTexture),t.pixelStorei(37440,i.flipY),t.pixelStorei(37441,i.premultiplyAlpha),t.pixelStorei(3317,i.unpackAlignment),t.pixelStorei(37443,0);const a=i&&(i.isCompressedTexture||i.image[0].isCompressedTexture),l=i.image[0]&&i.image[0].isDataTexture,h=[];for(let t=0;t<6;t++)h[t]=a||l?l?i.image[t].image:i.image[t]:N(i.image[t],!1,!0,c);const u=h[0],d=B(u)||o,p=s.convert(i.format),m=s.convert(i.type),f=O(i.internalFormat,p,m);let g;if(X(34067,i,d),a){for(let t=0;t<6;t++){g=h[t].mipmaps;for(let e=0;e1||i.get(s).__currentAnisotropy)&&(t.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,r.getMaxAnisotropy())),i.get(s).__currentAnisotropy=s.anisotropy)}}function Y(e,n){void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",U),e.__webglTexture=t.createTexture(),a.memory.textures++)}function J(e,i,r){let a=3553;i.isDataTexture2DArray&&(a=35866),i.isDataTexture3D&&(a=32879),Y(e,i),n.activeTexture(33984+r),n.bindTexture(a,e.__webglTexture),t.pixelStorei(37440,i.flipY),t.pixelStorei(37441,i.premultiplyAlpha),t.pixelStorei(3317,i.unpackAlignment),t.pixelStorei(37443,0);const l=function(t){return!o&&(t.wrapS!==u||t.wrapT!==u||t.minFilter!==p&&t.minFilter!==g)}(i)&&!1===B(i.image),c=N(i.image,l,!1,x),h=B(c)||o,d=s.convert(i.format);let m,f=s.convert(i.type),v=O(i.internalFormat,d,f);X(a,i,h);const y=i.mipmaps;if(i.isDepthTexture)v=6402,o?v=i.type===M?36012:i.type===b?33190:i.type===S?35056:33189:i.type===M&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===A&&6402===v&&i.type!==_&&i.type!==b&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=_,f=s.convert(i.type)),i.format===L&&6402===v&&(v=34041,i.type!==S&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=S,f=s.convert(i.type))),n.texImage2D(3553,0,v,c.width,c.height,0,d,f,null);else if(i.isDataTexture)if(y.length>0&&h){for(let t=0,e=y.length;t0&&h){for(let t=0,e=y.length;t=l&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+l),k+=1,t},this.resetTextureUnits=function(){k=0},this.setTexture2D=V,this.setTexture2DArray=function(t,e){const r=i.get(t);t.version>0&&r.__version!==t.version?J(r,t,e):(n.activeTexture(33984+e),n.bindTexture(35866,r.__webglTexture))},this.setTexture3D=function(t,e){const r=i.get(t);t.version>0&&r.__version!==t.version?J(r,t,e):(n.activeTexture(33984+e),n.bindTexture(32879,r.__webglTexture))},this.setTextureCube=W,this.setupRenderTarget=function(e){const l=e.texture,c=i.get(e),h=i.get(l);e.addEventListener("dispose",G),!0!==e.isWebGLMultipleRenderTargets&&(h.__webglTexture=t.createTexture(),h.__version=l.version,a.memory.textures++);const u=!0===e.isWebGLCubeRenderTarget,d=!0===e.isWebGLMultipleRenderTargets,p=!0===e.isWebGLMultisampleRenderTarget,m=l.isDataTexture3D||l.isDataTexture2DArray,f=B(e)||o;if(!o||l.format!==T||l.type!==M&&l.type!==w||(l.format=E,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),u){c.__webglFramebuffer=[];for(let e=0;e<6;e++)c.__webglFramebuffer[e]=t.createFramebuffer()}else if(c.__webglFramebuffer=t.createFramebuffer(),d)if(r.drawBuffers){const n=e.texture;for(let e=0,r=n.length;eo+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&a<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==o&&t.gripSpace&&(r=e.getPose(t.gripSpace,n),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==i),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==s),this}}class xs extends rt{constructor(t,e){super();const n=this,i=t.state;let r=null,s=1,a=null,o="local-floor",l=null,c=null,h=null,u=null;const d=[],p=new Map,m=new Jn;m.layers.enable(1),m.viewport=new St;const f=new Jn;f.layers.enable(2),f.viewport=new St;const g=[m,f],v=new fs;v.layers.enable(1),v.layers.enable(2);let y=null,x=null;function _(t){const e=p.get(t.inputSource);e&&e.dispatchEvent({type:t.type,data:t.inputSource})}function b(){p.forEach((function(t,e){t.disconnect(e)})),p.clear(),y=null,x=null,i.bindXRFramebuffer(null),t.setRenderTarget(t.getRenderTarget()),A.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function M(t){const e=r.inputSources;for(let t=0;t0&&(t.transmissionSamplerMap.value=i.texture,t.transmissionSamplerSize.value.set(i.width,i.height));t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap);t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor)}(t,i,a):n(t,i)):i.isMeshMatcapMaterial?(e(t,i),function(t,e){e.matcap&&(t.matcap.value=e.matcap);e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshDepthMaterial?(e(t,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isMeshDistanceMaterial?(e(t,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(t,i)):i.isMeshNormalMaterial?(e(t,i),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(t,i)):i.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity}(t,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,i)):i.isPointsMaterial?function(t,e,n,i){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*n,t.scale.value=.5*i,e.map&&(t.map.value=e.map);e.alphaMap&&(t.alphaMap.value=e.alphaMap);let r;e.map?r=e.map:e.alphaMap&&(r=e.alphaMap);void 0!==r&&(!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix))}(t,i,r,s):i.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map);e.alphaMap&&(t.alphaMap.value=e.alphaMap);let n;e.map?n=e.map:e.alphaMap&&(n=e.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),t.uvTransform.value.copy(n.matrix))}(t,i):i.isShadowMaterial?(t.color.value.copy(i.color),t.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function bs(t={}){const e=void 0!==t.canvas?t.canvas:function(){const t=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return t.style.display="block",t}(),n=void 0!==t.context?t.context:null,i=void 0!==t.alpha&&t.alpha,r=void 0===t.depth||t.depth,s=void 0===t.stencil||t.stencil,a=void 0!==t.antialias&&t.antialias,o=void 0===t.premultipliedAlpha||t.premultipliedAlpha,l=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,c=void 0!==t.powerPreference?t.powerPreference:"default",h=void 0!==t.failIfMajorPerformanceCaveat&&t.failIfMajorPerformanceCaveat;let d=null,m=null;const f=[],g=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=X,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const v=this;let _=!1,b=0,S=0,T=null,A=-1,L=null;const R=new St,C=new St;let P=null,D=e.width,I=e.height,N=1,B=null,z=null;const F=new St(0,0,D,I),O=new St(0,0,D,I);let H=!1;const U=[],G=new ai;let k=!1,V=!1,W=null;const j=new ae,q=new Rt,Y={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function J(){return null===T?N:1}let Z,Q,K,$,tt,et,nt,it,rt,st,at,ot,lt,ct,ht,ut,dt,pt,mt,ft,gt,vt,yt=n;function xt(t,n){for(let i=0;i0&&Nt(i,t,e),r.length>0&&function(t,e,n,i){if(null===W){const t=!0===a&&!0===Q.isWebGL2;W=new(t?At:Tt)(1024,1024,{generateMipmaps:!0,type:null!==gt.convert(w)?w:x,minFilter:y,magFilter:p,wrapS:u,wrapT:u})}const r=v.getRenderTarget();v.setRenderTarget(W),v.clear();const s=v.toneMapping;v.toneMapping=0,Nt(t,n,i),v.toneMapping=s,et.updateMultisampleRenderTarget(W),et.updateRenderTargetMipmap(W),v.setRenderTarget(r),Nt(e,n,i)}(i,r,t,e),s.length>0&&Nt(s,t,e),null!==T&&(et.updateMultisampleRenderTarget(T),et.updateRenderTargetMipmap(T)),!0===t.isScene&&t.onAfterRender(v,t,e),K.buffers.depth.setTest(!0),K.buffers.depth.setMask(!0),K.buffers.color.setMask(!0),K.setPolygonOffset(!1),vt.resetDefaultState(),A=-1,L=null,g.pop(),m=g.length>0?g[g.length-1]:null,f.pop(),d=f.length>0?f[f.length-1]:null},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return S},this.getRenderTarget=function(){return T},this.setRenderTarget=function(t,e=0,n=0){T=t,b=e,S=n,t&&void 0===tt.get(t).__webglFramebuffer&&et.setupRenderTarget(t);let i=null,r=!1,s=!1;if(t){const n=t.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(s=!0);const a=tt.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(i=a[e],r=!0):i=t.isWebGLMultisampleRenderTarget?tt.get(t).__webglMultisampledFramebuffer:a,R.copy(t.viewport),C.copy(t.scissor),P=t.scissorTest}else R.copy(F).multiplyScalar(N).floor(),C.copy(O).multiplyScalar(N).floor(),P=H;if(K.bindFramebuffer(36160,i)&&Q.drawBuffers){let e=!1;if(t)if(t.isWebGLMultipleRenderTargets){const n=t.texture;if(U.length!==n.length||36064!==U[0]){for(let t=0,e=n.length;t=0&&e<=t.width-i&&n>=0&&n<=t.height-r&&yt.readPixels(e,n,i,r,gt.convert(o),gt.convert(l),s):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const t=null!==T?tt.get(T).__webglFramebuffer:null;K.bindFramebuffer(36160,t)}}},this.copyFramebufferToTexture=function(t,e,n=0){const i=Math.pow(2,-n),r=Math.floor(e.image.width*i),s=Math.floor(e.image.height*i);let a=gt.convert(e.format);Q.isWebGL2&&(6407===a&&(a=32849),6408===a&&(a=32856)),et.setTexture2D(e,0),yt.copyTexImage2D(3553,n,a,t.x,t.y,r,s,0),K.unbindTexture()},this.copyTextureToTexture=function(t,e,n,i=0){const r=e.image.width,s=e.image.height,a=gt.convert(n.format),o=gt.convert(n.type);et.setTexture2D(n,0),yt.pixelStorei(37440,n.flipY),yt.pixelStorei(37441,n.premultiplyAlpha),yt.pixelStorei(3317,n.unpackAlignment),e.isDataTexture?yt.texSubImage2D(3553,i,t.x,t.y,r,s,a,o,e.image.data):e.isCompressedTexture?yt.compressedTexSubImage2D(3553,i,t.x,t.y,e.mipmaps[0].width,e.mipmaps[0].height,a,e.mipmaps[0].data):yt.texSubImage2D(3553,i,t.x,t.y,a,o,e.image),0===i&&n.generateMipmaps&&yt.generateMipmap(3553),K.unbindTexture()},this.copyTextureToTexture3D=function(t,e,n,i,r=0){if(v.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=t.max.x-t.min.x+1,a=t.max.y-t.min.y+1,o=t.max.z-t.min.z+1,l=gt.convert(i.format),c=gt.convert(i.type);let h;if(i.isDataTexture3D)et.setTexture3D(i,0),h=32879;else{if(!i.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");et.setTexture2DArray(i,0),h=35866}yt.pixelStorei(37440,i.flipY),yt.pixelStorei(37441,i.premultiplyAlpha),yt.pixelStorei(3317,i.unpackAlignment);const u=yt.getParameter(3314),d=yt.getParameter(32878),p=yt.getParameter(3316),m=yt.getParameter(3315),f=yt.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;yt.pixelStorei(3314,g.width),yt.pixelStorei(32878,g.height),yt.pixelStorei(3316,t.min.x),yt.pixelStorei(3315,t.min.y),yt.pixelStorei(32877,t.min.z),n.isDataTexture||n.isDataTexture3D?yt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),yt.compressedTexSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,g.data)):yt.texSubImage3D(h,r,e.x,e.y,e.z,s,a,o,l,c,g),yt.pixelStorei(3314,u),yt.pixelStorei(32878,d),yt.pixelStorei(3316,p),yt.pixelStorei(3315,m),yt.pixelStorei(32877,f),0===r&&i.generateMipmaps&&yt.generateMipmap(h),K.unbindTexture()},this.initTexture=function(t){et.setTexture2D(t,0),K.unbindTexture()},this.resetState=function(){b=0,S=0,T=null,K.reset(),vt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class Ms extends bs{}Ms.prototype.isWebGL1Renderer=!0;class ws{constructor(t,e=25e-5){this.name="",this.color=new Qe(t),this.density=e}clone(){return new ws(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}ws.prototype.isFogExp2=!0;class Ss{constructor(t,e=1,n=1e3){this.name="",this.color=new Qe(t),this.near=e,this.far=n}clone(){return new Ss(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}Ss.prototype.isFog=!0;class Ts extends Pe{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}Ts.prototype.isScene=!0;class Es{constructor(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=et,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=ct()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let i=0,r=this.stride;it.far||e.push({distance:o,point:Ps.clone(),uv:ke.getUV(Ps,Fs,Os,Hs,Us,Gs,ks,new vt),face:null,object:this})}copy(t){return super.copy(t),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function Ws(t,e,n,i,r,s){Ns.subVectors(t,n).addScalar(.5).multiply(i),void 0!==r?(Bs.x=s*Ns.x-r*Ns.y,Bs.y=r*Ns.x+s*Ns.y):Bs.copy(Ns),t.copy(e),t.x+=Bs.x,t.y+=Bs.y,t.applyMatrix4(zs)}Vs.prototype.isSprite=!0;const js=new Rt,qs=new Rt;class Xs extends Pe{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let t=0,n=e.length;t0){let n,i;for(n=1,i=e.length;n0){js.setFromMatrixPosition(this.matrixWorld);const n=t.ray.origin.distanceTo(js);this.getObjectForDistance(n).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){js.setFromMatrixPosition(t.matrixWorld),qs.setFromMatrixPosition(this.matrixWorld);const n=js.distanceTo(qs)/t.zoom;let i,r;for(e[0].object.visible=!0,i=1,r=e.length;i=e[i].distance;i++)e[i-1].object.visible=!1,e[i].object.visible=!0;for(this._currentLevel=i-1;io)continue;u.applyMatrix4(this.matrixWorld);const d=t.ray.origin.distanceTo(u);dt.far||e.push({distance:d,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,s.start),i=Math.min(r.count,s.start+s.count)-1;no)continue;u.applyMatrix4(this.matrixWorld);const i=t.ray.origin.distanceTo(u);it.far||e.push({distance:i,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const t=this.geometry;if(t.isBufferGeometry){const e=t.morphAttributes,n=Object.keys(e);if(n.length>0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}ga.prototype.isLine=!0;const va=new Rt,ya=new Rt;class xa extends ga{constructor(t,e){super(t,e),this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.isBufferGeometry)if(null===t.index){const e=t.attributes.position,n=[];for(let t=0,i=e.count;t0){const t=e[n[0]];if(void 0!==t){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,n=t.length;e0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function Aa(t,e,n,i,r,s,a){const o=wa.distanceSqToPoint(t);if(or.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:e,face:null,object:a})}}Ea.prototype.isPoints=!0;class La extends Mt{constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.format=void 0!==a?a:T,this.minFilter=void 0!==s?s:g,this.magFilter=void 0!==r?r:g,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1==="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}La.prototype.isVideoTexture=!0;class Ra extends Mt{constructor(t,e,n,i,r,s,a,o,l,c,h,u){super(null,s,a,o,l,c,i,r,h,u),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}Ra.prototype.isCompressedTexture=!0;class Ca extends Mt{constructor(t,e,n,i,r,s,a,o,l){super(t,e,n,i,r,s,a,o,l),this.needsUpdate=!0}}Ca.prototype.isCanvasTexture=!0;class Pa extends Mt{constructor(t,e,n,i,r,s,a,o,l,c){if((c=void 0!==c?c:A)!==A&&c!==L)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===A&&(n=_),void 0===n&&c===L&&(n=S),super(null,i,r,s,a,o,c,n,l),this.image={width:t,height:e},this.magFilter=void 0!==a?a:p,this.minFilter=void 0!==o?o:p,this.flipY=!1,this.generateMipmaps=!1}}Pa.prototype.isDepthTexture=!0;class Da extends wn{constructor(t=1,e=8,n=0,i=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:i},e=Math.max(3,e);const r=[],s=[],a=[],o=[],l=new Rt,c=new vt;s.push(0,0,0),a.push(0,0,1),o.push(.5,.5);for(let r=0,h=3;r<=e;r++,h+=3){const u=n+r/e*i;l.x=t*Math.cos(u),l.y=t*Math.sin(u),s.push(l.x,l.y,l.z),a.push(0,0,1),c.x=(s[h]/t+1)/2,c.y=(s[h+1]/t+1)/2,o.push(c.x,c.y)}for(let t=1;t<=e;t++)r.push(t,t+1,0);this.setIndex(r),this.setAttribute("position",new un(s,3)),this.setAttribute("normal",new un(a,3)),this.setAttribute("uv",new un(o,2))}static fromJSON(t){return new Da(t.radius,t.segments,t.thetaStart,t.thetaLength)}}class Ia extends wn{constructor(t=1,e=1,n=1,i=8,r=1,s=!1,a=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:a,thetaLength:o};const l=this;i=Math.floor(i),r=Math.floor(r);const c=[],h=[],u=[],d=[];let p=0;const m=[],f=n/2;let g=0;function v(n){const r=p,s=new vt,m=new Rt;let v=0;const y=!0===n?t:e,x=!0===n?1:-1;for(let t=1;t<=i;t++)h.push(0,f*x,0),u.push(0,x,0),d.push(.5,.5),p++;const _=p;for(let t=0;t<=i;t++){const e=t/i*o+a,n=Math.cos(e),r=Math.sin(e);m.x=y*r,m.y=f*x,m.z=y*n,h.push(m.x,m.y,m.z),u.push(0,x,0),s.x=.5*n+.5,s.y=.5*r*x+.5,d.push(s.x,s.y),p++}for(let t=0;t0&&v(!0),e>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new un(h,3)),this.setAttribute("normal",new un(u,3)),this.setAttribute("uv",new un(d,2))}static fromJSON(t){return new Ia(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Na extends Ia{constructor(t=1,e=1,n=8,i=1,r=!1,s=0,a=2*Math.PI){super(0,t,e,n,i,r,s,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:s,thetaLength:a}}static fromJSON(t){return new Na(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Ba extends wn{constructor(t,e,n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:n,detail:i};const r=[],s=[];function a(t,e,n,i){const r=i+1,s=[];for(let i=0;i<=r;i++){s[i]=[];const a=t.clone().lerp(n,i/r),o=e.clone().lerp(n,i/r),l=r-i;for(let t=0;t<=l;t++)s[i][t]=0===t&&i===r?a:a.clone().lerp(o,t/l)}for(let t=0;t.9&&a<.1&&(e<.2&&(s[t+0]+=1),n<.2&&(s[t+2]+=1),i<.2&&(s[t+4]+=1))}}()}(),this.setAttribute("position",new un(r,3)),this.setAttribute("normal",new un(r.slice(),3)),this.setAttribute("uv",new un(s,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(t){return new Ba(t.vertices,t.indices,t.radius,t.details)}}class za extends Ba{constructor(t=1,e=0){const n=(1+Math.sqrt(5))/2,i=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new za(t.radius,t.detail)}}const Fa=new Rt,Oa=new Rt,Ha=new Rt,Ua=new ke;class Ga extends wn{constructor(t,e){if(super(),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1,!0===t.isGeometry)return void console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");const n=Math.pow(10,4),i=Math.cos(ot*e),r=t.getIndex(),s=t.getAttribute("position"),a=r?r.count:s.count,o=[0,0,0],l=["a","b","c"],c=new Array(3),h={},u=[];for(let t=0;t0)){l=i;break}l=i-1}if(i=l,n[i]===s)return i/(r-1);const c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}getTangent(t,e){const n=1e-4;let i=t-n,r=t+n;i<0&&(i=0),r>1&&(r=1);const s=this.getPoint(i),a=this.getPoint(r),o=e||(s.isVector2?new vt:new Rt);return o.copy(a).sub(s).normalize(),o}getTangentAt(t,e){const n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e){const n=new Rt,i=[],r=[],s=[],a=new Rt,o=new ae;for(let e=0;e<=t;e++){const n=e/t;i[e]=this.getTangentAt(n,new Rt),i[e].normalize()}r[0]=new Rt,s[0]=new Rt;let l=Number.MAX_VALUE;const c=Math.abs(i[0].x),h=Math.abs(i[0].y),u=Math.abs(i[0].z);c<=l&&(l=c,n.set(1,0,0)),h<=l&&(l=h,n.set(0,1,0)),u<=l&&n.set(0,0,1),a.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],a),s[0].crossVectors(i[0],r[0]);for(let e=1;e<=t;e++){if(r[e]=r[e-1].clone(),s[e]=s[e-1].clone(),a.crossVectors(i[e-1],i[e]),a.length()>Number.EPSILON){a.normalize();const t=Math.acos(ht(i[e-1].dot(i[e]),-1,1));r[e].applyMatrix4(o.makeRotationAxis(a,t))}s[e].crossVectors(i[e],r[e])}if(!0===e){let e=Math.acos(ht(r[0].dot(r[t]),-1,1));e/=t,i[0].dot(a.crossVectors(r[0],r[t]))>0&&(e=-e);for(let n=1;n<=t;n++)r[n].applyMatrix4(o.makeRotationAxis(i[n],e*n)),s[n].crossVectors(i[n],r[n])}return{tangents:i,normals:r,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Va extends ka{constructor(t=0,e=0,n=1,i=1,r=0,s=2*Math.PI,a=!1,o=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=s,this.aClockwise=a,this.aRotation=o}getPoint(t,e){const n=e||new vt,i=2*Math.PI;let r=this.aEndAngle-this.aStartAngle;const s=Math.abs(r)i;)r-=i;r0?0:(Math.floor(Math.abs(l)/r)+1)*r:0===c&&l===r-1&&(l=r-2,c=1),this.closed||l>0?a=i[(l-1)%r]:(qa.subVectors(i[0],i[1]).add(i[0]),a=qa);const h=i[l%r],u=i[(l+1)%r];if(this.closed||l+2i.length-2?i.length-1:s+1],h=i[s>i.length-3?i.length-1:s+2];return n.set(Qa(a,o.x,l.x,c.x,h.x),Qa(a,o.y,l.y,c.y,h.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e80*n){o=c=t[0],l=h=t[1];for(let e=n;ec&&(c=u),d>h&&(h=d);p=Math.max(c-o,h-l),p=0!==p?1/p:0}return uo(s,a,n,o,l,p),a};function co(t,e,n,i,r){let s,a;if(r===function(t,e,n,i){let r=0;for(let s=e,a=n-i;s0)for(s=e;s=e;s-=i)a=Po(s,t[s],t[s+1],a);return a&&To(a,a.next)&&(Do(a),a=a.next),a}function ho(t,e){if(!t)return t;e||(e=t);let n,i=t;do{if(n=!1,i.steiner||!To(i,i.next)&&0!==So(i.prev,i,i.next))i=i.next;else{if(Do(i),i=e=i.prev,i===i.next)break;n=!0}}while(n||i!==e);return e}function uo(t,e,n,i,r,s,a){if(!t)return;!a&&s&&function(t,e,n,i){let r=t;do{null===r.z&&(r.z=_o(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){let e,n,i,r,s,a,o,l,c=1;do{for(n=t,t=null,s=null,a=0;n;){for(a++,i=n,o=0,e=0;e0||l>0&&i;)0!==o&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,o--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=i}s.nextZ=null,c*=2}while(a>1)}(r)}(t,i,r,s);let o,l,c=t;for(;t.prev!==t.next;)if(o=t.prev,l=t.next,s?mo(t,i,r,s):po(t))e.push(o.i/n),e.push(t.i/n),e.push(l.i/n),Do(t),t=l.next,c=l.next;else if((t=l)===c){a?1===a?uo(t=fo(ho(t),e,n),e,n,i,r,s,2):2===a&&go(t,e,n,i,r,s):uo(ho(t),e,n,i,r,s,1);break}}function po(t){const e=t.prev,n=t,i=t.next;if(So(e,n,i)>=0)return!1;let r=t.next.next;for(;r!==t.prev;){if(Mo(e.x,e.y,n.x,n.y,i.x,i.y,r.x,r.y)&&So(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function mo(t,e,n,i){const r=t.prev,s=t,a=t.next;if(So(r,s,a)>=0)return!1;const o=r.xs.x?r.x>a.x?r.x:a.x:s.x>a.x?s.x:a.x,h=r.y>s.y?r.y>a.y?r.y:a.y:s.y>a.y?s.y:a.y,u=_o(o,l,e,n,i),d=_o(c,h,e,n,i);let p=t.prevZ,m=t.nextZ;for(;p&&p.z>=u&&m&&m.z<=d;){if(p!==t.prev&&p!==t.next&&Mo(r.x,r.y,s.x,s.y,a.x,a.y,p.x,p.y)&&So(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,m!==t.prev&&m!==t.next&&Mo(r.x,r.y,s.x,s.y,a.x,a.y,m.x,m.y)&&So(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&Mo(r.x,r.y,s.x,s.y,a.x,a.y,p.x,p.y)&&So(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;m&&m.z<=d;){if(m!==t.prev&&m!==t.next&&Mo(r.x,r.y,s.x,s.y,a.x,a.y,m.x,m.y)&&So(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function fo(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!To(r,s)&&Eo(r,i,i.next,s)&&Ro(r,s)&&Ro(s,r)&&(e.push(r.i/n),e.push(i.i/n),e.push(s.i/n),Do(i),Do(i.next),i=t=s),i=i.next}while(i!==t);return ho(i)}function go(t,e,n,i,r,s){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.i!==t.i&&wo(a,t)){let o=Co(a,t);return a=ho(a,a.next),o=ho(o,o.next),uo(a,e,n,i,r,s),void uo(o,e,n,i,r,s)}t=t.next}a=a.next}while(a!==t)}function vo(t,e){return t.x-e.x}function yo(t,e){if(e=function(t,e){let n=e;const i=t.x,r=t.y;let s,a=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){const t=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=i&&t>a){if(a=t,t===i){if(r===n.y)return n;if(r===n.next.y)return n.next}s=n.x=n.x&&n.x>=l&&i!==n.x&&Mo(rs.x||n.x===s.x&&xo(s,n)))&&(s=n,u=h)),n=n.next}while(n!==o);return s}(t,e)){const n=Co(e,t);ho(e,e.next),ho(n,n.next)}}function xo(t,e){return So(t.prev,t,e.prev)<0&&So(e.next,t,t.next)<0}function _o(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function bo(t){let e=t,n=t;do{(e.x=0&&(t-a)*(i-o)-(n-a)*(e-o)>=0&&(n-a)*(s-o)-(r-a)*(i-o)>=0}function wo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&Eo(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(Ro(t,e)&&Ro(e,t)&&function(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(So(t.prev,t,e.prev)||So(t,e.prev,e))||To(t,e)&&So(t.prev,t,t.next)>0&&So(e.prev,e,e.next)>0)}function So(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function To(t,e){return t.x===e.x&&t.y===e.y}function Eo(t,e,n,i){const r=Lo(So(t,e,n)),s=Lo(So(t,e,i)),a=Lo(So(n,i,t)),o=Lo(So(n,i,e));return r!==s&&a!==o||(!(0!==r||!Ao(t,n,e))||(!(0!==s||!Ao(t,i,e))||(!(0!==a||!Ao(n,t,i))||!(0!==o||!Ao(n,e,i)))))}function Ao(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function Lo(t){return t>0?1:t<0?-1:0}function Ro(t,e){return So(t.prev,t,t.next)<0?So(t,e,t.next)>=0&&So(t,t.prev,e)>=0:So(t,e,t.prev)<0||So(t,t.next,e)<0}function Co(t,e){const n=new Io(t.i,t.x,t.y),i=new Io(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function Po(t,e,n,i){const r=new Io(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Do(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Io(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class No{static area(t){const e=t.length;let n=0;for(let i=e-1,r=0;r2&&t[e-1].equals(t[0])&&t.pop()}function zo(t,e){for(let n=0;nNumber.EPSILON){const u=Math.sqrt(h),d=Math.sqrt(l*l+c*c),p=e.x-o/u,m=e.y+a/u,f=((n.x-c/d-p)*c-(n.y+l/d-m)*l)/(a*c-o*l);i=p+a*f-t.x,r=m+o*f-t.y;const g=i*i+r*r;if(g<=2)return new vt(i,r);s=Math.sqrt(g/2)}else{let t=!1;a>Number.EPSILON?l>Number.EPSILON&&(t=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(t=!0):Math.sign(o)===Math.sign(c)&&(t=!0),t?(i=-o,r=a,s=Math.sqrt(h)):(i=a,r=o,s=Math.sqrt(h/2))}return new vt(i/s,r/s)}const P=[];for(let t=0,e=E.length,n=e-1,i=t+1;t=0;t--){const e=t/p,n=h*Math.cos(e*Math.PI/2),i=u*Math.sin(e*Math.PI/2)+d;for(let t=0,e=E.length;t=0;){const i=n;let r=n-1;r<0&&(r=t.length-1);for(let t=0,n=o+2*p;t=0?(t(i-o,p,h),u.subVectors(c,h)):(t(i+o,p,h),u.subVectors(h,c)),p-o>=0?(t(i,p-o,h),d.subVectors(c,h)):(t(i,p+o,h),d.subVectors(h,c)),l.crossVectors(u,d).normalize(),s.push(l.x,l.y,l.z),a.push(i,p)}}for(let t=0;t0)&&d.push(e,r,l),(t!==n-1||o=i)){l.push(e.times[t]);for(let n=0;ns.tracks[t].times[0]&&(o=s.tracks[t].times[0]);for(let t=0;t=i.times[u]){const t=u*l+o,e=t+l-o;d=hl.arraySlice(i.values,t,e)}else{const t=i.createInterpolant(),e=o,n=l-o;t.evaluate(s),d=hl.arraySlice(t.resultBuffer,e,n)}if("quaternion"===r){(new Lt).fromArray(d).normalize().conjugate().toArray(d)}const p=a.times.length;for(let t=0;t=r)break t;{const a=e[1];t=r)break e}s=n,n=0}}for(;n>>1;te;)--s;if(++s,0!==r||s!==i){r>=s&&(s=Math.max(s,1),r=s-1);const t=this.getValueSize();this.times=hl.arraySlice(n,r,s),this.values=hl.arraySlice(this.values,r*t,s*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,i=this.values,r=n.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let e=0;e!==r;e++){const i=n[e];if("number"==typeof i&&isNaN(i)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,i),t=!1;break}if(null!==s&&s>i){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,i,s),t=!1;break}s=i}if(void 0!==i&&hl.isTypedArray(i))for(let e=0,n=i.length;e!==n;++e){const n=i[e];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t}optimize(){const t=hl.arraySlice(this.times),e=hl.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===G,r=t.length-1;let s=1;for(let a=1;a0){t[s]=t[r];for(let t=r*n,i=s*n,a=0;a!==n;++a)e[i+a]=e[t+a];++s}return s!==t.length?(this.times=hl.arraySlice(t,0,s),this.values=hl.arraySlice(e,0,s*n)):(this.times=t,this.values=e),this}clone(){const t=hl.arraySlice(this.times,0),e=hl.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}fl.prototype.TimeBufferType=Float32Array,fl.prototype.ValueBufferType=Float32Array,fl.prototype.DefaultInterpolation=U;class gl extends fl{}gl.prototype.ValueTypeName="bool",gl.prototype.ValueBufferType=Array,gl.prototype.DefaultInterpolation=H,gl.prototype.InterpolantFactoryMethodLinear=void 0,gl.prototype.InterpolantFactoryMethodSmooth=void 0;class vl extends fl{}vl.prototype.ValueTypeName="color";class yl extends fl{}yl.prototype.ValueTypeName="number";class xl extends ul{constructor(t,e,n,i){super(t,e,n,i)}interpolate_(t,e,n,i){const r=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(n-e)/(i-e);let l=t*a;for(let t=l+a;l!==t;l+=4)Lt.slerpFlat(r,0,s,l-a,s,l,o);return r}}class _l extends fl{InterpolantFactoryMethodLinear(t){return new xl(this.times,this.values,this.getValueSize(),t)}}_l.prototype.ValueTypeName="quaternion",_l.prototype.DefaultInterpolation=U,_l.prototype.InterpolantFactoryMethodSmooth=void 0;class bl extends fl{}bl.prototype.ValueTypeName="string",bl.prototype.ValueBufferType=Array,bl.prototype.DefaultInterpolation=H,bl.prototype.InterpolantFactoryMethodLinear=void 0,bl.prototype.InterpolantFactoryMethodSmooth=void 0;class Ml extends fl{}Ml.prototype.ValueTypeName="vector";class wl{constructor(t,e=-1,n,i=2500){this.name=t,this.tracks=n,this.duration=e,this.blendMode=i,this.uuid=ct(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],n=t.tracks,i=1/(t.fps||1);for(let t=0,r=n.length;t!==r;++t)e.push(Sl(n[t]).scale(i));const r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r}static toJSON(t){const e=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,i=n.length;t!==i;++t)e.push(fl.toJSON(n[t]));return i}static CreateFromMorphTargetSequence(t,e,n,i){const r=e.length,s=[];for(let t=0;t1){const t=s[1];let e=i[t];e||(i[t]=e=[]),e.push(n)}}const s=[];for(const t in i)s.push(this.CreateFromMorphTargetSequence(t,i[t],e,n));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(t,e,n,i,r){if(0!==n.length){const s=[],a=[];hl.flattenJSON(n,s,a,i),0!==s.length&&r.push(new t(e,s,a))}},i=[],r=t.name||"default",s=t.fps||30,a=t.blendMode;let o=t.length||-1;const l=t.hierarchy||[];for(let t=0;t0||0===t.search(/^data\:image\/jpeg/);r.format=i?T:E,r.needsUpdate=!0,void 0!==e&&e(r)}),n,i),r}}class Bl extends ka{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){const t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new no(e,t))}getPoint(t){const e=t*this.getLength(),n=this.getCurveLengths();let i=0;for(;i=e){const t=n[i]-e,r=this.curves[i],s=r.getLength(),a=0===s?0:1-t/s;return r.getPointAt(a)}i++}return null}getLength(){const t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const t=[];let e=0;for(let n=0,i=this.curves.length;n1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e0){const t=l.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class Fl extends zl{constructor(t){super(t),this.uuid=ct(),this.type="Shape",this.holes=[]}getPointsHoles(t){const e=[];for(let n=0,i=this.holes.length;n0:i.vertexColors=t.vertexColors),void 0!==t.uniforms)for(const e in t.uniforms){const r=t.uniforms[e];switch(i.uniforms[e]={},r.type){case"t":i.uniforms[e].value=n(r.value);break;case"c":i.uniforms[e].value=(new Qe).setHex(r.value);break;case"v2":i.uniforms[e].value=(new vt).fromArray(r.value);break;case"v3":i.uniforms[e].value=(new Rt).fromArray(r.value);break;case"v4":i.uniforms[e].value=(new St).fromArray(r.value);break;case"m3":i.uniforms[e].value=(new yt).fromArray(r.value);break;case"m4":i.uniforms[e].value=(new ae).fromArray(r.value);break;default:i.uniforms[e].value=r.value}}if(void 0!==t.defines&&(i.defines=t.defines),void 0!==t.vertexShader&&(i.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(i.fragmentShader=t.fragmentShader),void 0!==t.extensions)for(const e in t.extensions)i.extensions[e]=t.extensions[e];if(void 0!==t.shading&&(i.flatShading=1===t.shading),void 0!==t.size&&(i.size=t.size),void 0!==t.sizeAttenuation&&(i.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(i.map=n(t.map)),void 0!==t.matcap&&(i.matcap=n(t.matcap)),void 0!==t.alphaMap&&(i.alphaMap=n(t.alphaMap)),void 0!==t.bumpMap&&(i.bumpMap=n(t.bumpMap)),void 0!==t.bumpScale&&(i.bumpScale=t.bumpScale),void 0!==t.normalMap&&(i.normalMap=n(t.normalMap)),void 0!==t.normalMapType&&(i.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),i.normalScale=(new vt).fromArray(e)}return void 0!==t.displacementMap&&(i.displacementMap=n(t.displacementMap)),void 0!==t.displacementScale&&(i.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(i.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(i.roughnessMap=n(t.roughnessMap)),void 0!==t.metalnessMap&&(i.metalnessMap=n(t.metalnessMap)),void 0!==t.emissiveMap&&(i.emissiveMap=n(t.emissiveMap)),void 0!==t.emissiveIntensity&&(i.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(i.specularMap=n(t.specularMap)),void 0!==t.envMap&&(i.envMap=n(t.envMap)),void 0!==t.envMapIntensity&&(i.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(i.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(i.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(i.lightMap=n(t.lightMap)),void 0!==t.lightMapIntensity&&(i.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(i.aoMap=n(t.aoMap)),void 0!==t.aoMapIntensity&&(i.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(i.gradientMap=n(t.gradientMap)),void 0!==t.clearcoatMap&&(i.clearcoatMap=n(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(i.clearcoatNormalScale=(new vt).fromArray(t.clearcoatNormalScale)),void 0!==t.transmissionMap&&(i.transmissionMap=n(t.transmissionMap)),void 0!==t.thicknessMap&&(i.thicknessMap=n(t.thicknessMap)),i}setTextures(t){return this.textures=t,this}}class sc{static decodeText(t){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);let e="";for(let n=0,i=t.length;nNumber.EPSILON){if(l<0&&(n=e[s],o=-o,a=e[r],l=-l),t.ya.y)continue;if(t.y===n.y){if(t.x===n.x)return!0}else{const e=l*(t.x-n.x)-o*(t.y-n.y);if(0===e)return!0;if(e<0)continue;i=!i}}else{if(t.y!==n.y)continue;if(a.x<=t.x&&t.x<=n.x||n.x<=t.x&&t.x<=a.x)return!0}}return i}const r=No.isClockWise,s=this.subPaths;if(0===s.length)return[];if(!0===e)return n(s);let a,o,l;const c=[];if(1===s.length)return o=s[0],l=new Fl,l.curves=o.curves,c.push(l),c;let h=!r(s[0].getPoints());h=t?!h:h;const u=[],d=[];let p,m,f=[],g=0;d[g]=void 0,f[g]=[];for(let e=0,n=s.length;e1){let t=!1;const e=[];for(let t=0,e=d.length;t0&&(t||(f=u))}for(let t=0,e=d.length;t0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t0&&this._mixBufferRegionAdditive(n,i,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(n[t]!==n[t+e]){a.setValue(n,i);break}}saveOriginalState(){const t=this.binding,e=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(e,i);for(let t=n,r=i;t!==r;++t)e[t]=e[i+t%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let n=t;n=.5)for(let i=0;i!==r;++i)t[e+i]=t[n+i]}_slerp(t,e,n,i){Lt.slerpFlat(t,e,t,e,t,n,i)}_slerpAdditive(t,e,n,i,r){const s=this._workIndex*r;Lt.multiplyQuaternionsFlat(t,s,t,e,t,n),Lt.slerpFlat(t,e,t,e,t,s,i)}_lerp(t,e,n,i,r){const s=1-i;for(let a=0;a!==r;++a){const r=e+a;t[r]=t[r]*s+t[n+a]*i}}_lerpAdditive(t,e,n,i,r){for(let s=0;s!==r;++s){const r=e+s;t[r]=t[r]+t[n+s]*i}}}const zc="\\[\\]\\.:\\/",Fc=new RegExp("[\\[\\]\\.:\\/]","g"),Oc="[^\\[\\]\\.:\\/]",Hc="[^"+zc.replace("\\.","")+"]",Uc=/((?:WC+[\/:])*)/.source.replace("WC",Oc),Gc=/(WCOD+)?/.source.replace("WCOD",Hc),kc=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Oc),Vc=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Oc),Wc=new RegExp("^"+Uc+Gc+kc+Vc+"$"),jc=["material","materials","bones"];class qc{constructor(t,e,n){this.path=e,this.parsedPath=n||qc.parseTrackName(e),this.node=qc.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new qc.Composite(t,e,n):new qc(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Fc,"")}static parseTrackName(t){const e=Wc.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){const t=n.nodeName.substring(i+1);-1!==jc.indexOf(t)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=t)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(!e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){const n=function(t){for(let i=0;i=r){const s=r++,c=t[s];e[c.uuid]=l,t[l]=c,e[o]=s,t[s]=a;for(let t=0,e=i;t!==e;++t){const e=n[t],i=e[s],r=e[l];e[l]=i,e[s]=r}}}this.nCachedObjects_=r}uncache(){const t=this._objects,e=this._indicesByUUID,n=this._bindings,i=n.length;let r=this.nCachedObjects_,s=t.length;for(let a=0,o=arguments.length;a!==o;++a){const o=arguments[a].uuid,l=e[o];if(void 0!==l)if(delete e[o],l0&&(e[a.uuid]=l),t[l]=a,t.pop();for(let t=0,e=i;t!==e;++t){const e=n[t];e[l]=e[r],e.pop()}}}this.nCachedObjects_=r}subscribe_(t,e){const n=this._bindingsIndicesByPath;let i=n[t];const r=this._bindings;if(void 0!==i)return r[i];const s=this._paths,a=this._parsedPaths,o=this._objects,l=o.length,c=this.nCachedObjects_,h=new Array(l);i=r.length,n[t]=i,s.push(t),a.push(e),r.push(h);for(let n=c,i=o.length;n!==i;++n){const i=o[n];h[n]=new qc(i,t,e)}return h}unsubscribe_(t){const e=this._bindingsIndicesByPath,n=e[t];if(void 0!==n){const i=this._paths,r=this._parsedPaths,s=this._bindings,a=s.length-1,o=s[a];e[t[a]]=n,s[n]=o,s.pop(),r[n]=r[a],r.pop(),i[n]=i[a],i.pop()}}}Xc.prototype.isAnimationObjectGroup=!0;class Yc{constructor(t,e,n=null,i=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=n,this.blendMode=i;const r=e.tracks,s=r.length,a=new Array(s),o={endingStart:k,endingEnd:k};for(let t=0;t!==s;++t){const e=r[t].createInterpolant(null);a[t]=e,e.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){const n=this._clip.duration,i=t._clip.duration,r=i/n,s=n/i;t.warp(1,r,e),this.warp(s,1,e)}return this}crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}stopFading(){const t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,n){const i=this._mixer,r=i.time,s=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=i._lendControlInterpolant(),this._timeScaleInterpolant=a);const o=a.parameterPositions,l=a.sampleValues;return o[0]=r,o[1]=r+n,l[0]=t/s,l[1]=e/s,this}stopWarping(){const t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,n,i){if(!this.enabled)return void this._updateWeight(t);const r=this._startTime;if(null!==r){const i=(t-r)*n;if(i<0||0===n)return;this._startTime=null,e=n*i}e*=this._updateTimeScale(t);const s=this._updateTime(e),a=this._updateWeight(t);if(a>0){const t=this._interpolants,e=this._propertyBindings;switch(this.blendMode){case q:for(let n=0,i=t.length;n!==i;++n)t[n].evaluate(s),e[n].accumulateAdditive(a);break;case j:default:for(let n=0,r=t.length;n!==r;++n)t[n].evaluate(s),e[n].accumulate(i,a)}}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const n=this._weightInterpolant;if(null!==n){const i=n.evaluate(t)[0];e*=i,t>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){e*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,n=this.loop;let i=this.time+t,r=this._loopCount;const s=2202===n;if(0===t)return-1===r?i:s&&1==(1&r)?e-i:i;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=e)i=e;else{if(!(i<0)){this.time=i;break t}i=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),i>=e||i<0){const n=Math.floor(i/e);i-=e*n,r+=Math.abs(n);const a=this.repetitions-r;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?e:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===a){const e=t<0;this._setEndings(e,!e,s)}else this._setEndings(!1,!1,s);this._loopCount=r,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(s&&1==(1&r))return e-i}return i}_setEndings(t,e,n){const i=this._interpolantSettings;n?(i.endingStart=V,i.endingEnd=V):(i.endingStart=t?this.zeroSlopeAtStart?V:k:W,i.endingEnd=e?this.zeroSlopeAtEnd?V:k:W)}_scheduleFading(t,e,n){const i=this._mixer,r=i.time;let s=this._weightInterpolant;null===s&&(s=i._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=r,o[0]=e,a[1]=r+t,o[1]=n,this}}class Jc extends rt{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const n=t._localRoot||this._root,i=t._clip.tracks,r=i.length,s=t._propertyBindings,a=t._interpolants,o=n.uuid,l=this._bindingsByRootAndName;let c=l[o];void 0===c&&(c={},l[o]=c);for(let t=0;t!==r;++t){const r=i[t],l=r.name;let h=c[l];if(void 0!==h)s[t]=h;else{if(h=s[t],void 0!==h){null===h._cacheIndex&&(++h.referenceCount,this._addInactiveBinding(h,o,l));continue}const i=e&&e._propertyBindings[t].binding.parsedPath;h=new Bc(qc.create(n,l,i),r.ValueTypeName,r.getValueSize()),++h.referenceCount,this._addInactiveBinding(h,o,l),s[t]=h}a[t].resultBuffer=h.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){const e=(t._localRoot||this._root).uuid,n=t._clip.uuid,i=this._actionsByClip[n];this._bindAction(t,i&&i.knownActions[0]),this._addInactiveAction(t,n,e)}const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let t=0,n=e.length;t!==n;++t){const n=e[t];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return null!==e&&e=0;--e)t[e].stop();return this}update(t){t*=this.timeScale;const e=this._actions,n=this._nActiveActions,i=this.time+=t,r=Math.sign(t),s=this._accuIndex^=1;for(let a=0;a!==n;++a){e[a]._update(i,t,r,s)}const a=this._bindings,o=this._nActiveBindings;for(let t=0;t!==o;++t)a[t].apply(s);return this}setTime(t){this.time=0;for(let t=0;tthis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return eh.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}nh.prototype.isBox2=!0;const ih=new Rt,rh=new Rt;class sh{constructor(t=new Rt,e=new Rt){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){ih.subVectors(t,this.start),rh.subVectors(this.end,this.start);const n=rh.dot(rh);let i=rh.dot(ih)/n;return e&&(i=ht(i,0,1)),i}closestPointToPoint(t,e,n){const i=this.closestPointToPointParameter(t,e);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}class ah extends Pe{constructor(t){super(),this.material=t,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}ah.prototype.isImmediateRenderObject=!0;const oh=new Rt;const lh=new Rt,ch=new ae,hh=new ae;class uh extends xa{constructor(t){const e=dh(t),n=new wn,i=[],r=[],s=new Qe(0,0,1),a=new Qe(0,1,0);for(let t=0;t4?a=Dh[r-8+4-1]:0==r&&(a=0),n.push(a);const o=1/(s-1),l=-o/2,c=1+o/2,h=[l,l,c,l,c,c,l,l,c,c,l,c],u=6,d=6,p=3,m=2,f=1,g=new Float32Array(p*d*u),v=new Float32Array(m*d*u),y=new Float32Array(f*d*u);for(let t=0;t2?0:-1,i=[e,n,0,e+2/3,n,0,e+2/3,n+1,0,e,n,0,e+2/3,n+1,0,e,n+1,0];g.set(i,p*d*t),v.set(h,m*d*t);const r=[t,t,t,t,t,t];y.set(r,f*d*t)}const x=new wn;x.setAttribute("position",new en(g,p)),x.setAttribute("uv",new en(v,m)),x.setAttribute("faceIndex",new en(y,f)),t.push(x),i>4&&i--}return{_lodPlanes:t,_sizeLods:e,_sigmas:n}}function Zh(t){const e=new Tt(3*Ph,3*Ph,t);return e.texture.mapping=l,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function Qh(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function Kh(){const t=new vt(1,1);return new tl({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:t},inputEncoding:{value:Bh[3e3]},outputEncoding:{value:Bh[3e3]}},vertexShader:tu(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t${eu()}\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,blending:0,depthTest:!1,depthWrite:!1})}function $h(){return new tl({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:Bh[3e3]},outputEncoding:{value:Bh[3e3]}},vertexShader:tu(),fragmentShader:`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t${eu()}\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,blending:0,depthTest:!1,depthWrite:!1})}function tu(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function eu(){return"\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include \n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t"}ka.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(ka.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},zl.prototype.fromPoints=function(t){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)},gh.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},uh.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Ll.prototype.extractUrlBase=function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),sc.extractUrlBase(t)},Ll.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},nh.prototype.center=function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},nh.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},nh.prototype.isIntersectionBox=function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},nh.prototype.size=function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)},Dt.prototype.center=function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Dt.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Dt.prototype.isIntersectionBox=function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},Dt.prototype.isIntersectionSphere=function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},Dt.prototype.size=function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)},Qt.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},ai.prototype.setFromMatrix=function(t){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(t)},sh.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},yt.prototype.flattenToArrayOffset=function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},yt.prototype.multiplyVector3=function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},yt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},yt.prototype.applyToBufferAttribute=function(t){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},yt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},yt.prototype.getInverse=function(t){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(t).invert()},ae.prototype.extractPosition=function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},ae.prototype.flattenToArrayOffset=function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},ae.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new Rt).setFromMatrixColumn(this,3)},ae.prototype.setRotationFromQuaternion=function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},ae.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},ae.prototype.multiplyVector3=function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},ae.prototype.multiplyVector4=function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},ae.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},ae.prototype.rotateAxis=function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},ae.prototype.crossVector=function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},ae.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},ae.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},ae.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},ae.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},ae.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},ae.prototype.applyToBufferAttribute=function(t){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},ae.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},ae.prototype.makeFrustum=function(t,e,n,i,r,s){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,i,n,r,s)},ae.prototype.getInverse=function(t){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(t).invert()},ii.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},Lt.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Lt.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},se.prototype.isIntersectionBox=function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},se.prototype.isIntersectionPlane=function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},se.prototype.isIntersectionSphere=function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},ke.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},ke.prototype.barycoordFromPoint=function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},ke.prototype.midpoint=function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},ke.prototypenormal=function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},ke.prototype.plane=function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)},ke.barycoordFromPoint=function(t,e,n,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),ke.getBarycoord(t,e,n,i,r)},ke.normal=function(t,e,n,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),ke.getNormal(t,e,n,i)},Fl.prototype.extractAllPoints=function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},Fl.prototype.extrude=function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Fo(this,t)},Fl.prototype.makeGeometry=function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Wo(this,t)},vt.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},vt.prototype.distanceToManhattan=function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},vt.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Rt.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},Rt.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},Rt.prototype.getPositionFromMatrix=function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},Rt.prototype.getScaleFromMatrix=function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},Rt.prototype.getColumnFromMatrix=function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},Rt.prototype.applyProjection=function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},Rt.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},Rt.prototype.distanceToManhattan=function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},Rt.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},St.prototype.fromAttribute=function(t,e,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,n)},St.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Pe.prototype.getChildByName=function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},Pe.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Pe.prototype.translate=function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},Pe.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Pe.prototype.applyMatrix=function(t){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)},Object.defineProperties(Pe.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Gn.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(Gn.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),$s.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Jn.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Ol.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(en.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===nt},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(nt)}}}),en.prototype.setDynamic=function(t){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===t?nt:et),this},en.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},en.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},wn.prototype.addIndex=function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},wn.prototype.addAttribute=function(t,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(t,e):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(t,new en(arguments[1],arguments[2])))},wn.prototype.addDrawCall=function(t,e,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},wn.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},wn.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},wn.prototype.removeAttribute=function(t){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(t)},wn.prototype.applyMatrix=function(t){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(t)},Object.defineProperties(wn.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Es.prototype.setDynamic=function(t){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===t?nt:et),this},Es.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Fo.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Fo.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Fo.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},Ts.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Zc.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(We.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Qe}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===t}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(t){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=t}}}),Object.defineProperties(Xn.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),bs.prototype.clearTarget=function(t,e,n,i){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,n,i)},bs.prototype.animate=function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},bs.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},bs.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},bs.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},bs.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},bs.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},bs.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},bs.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},bs.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},bs.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},bs.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},bs.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},bs.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},bs.prototype.enableScissorTest=function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},bs.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},bs.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},bs.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},bs.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},bs.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},bs.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},bs.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},bs.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},bs.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},bs.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(bs.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(t){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===t?Y:X}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(us.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Tt.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Rc.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const e=this;return(new yc).load(t,(function(t){e.setBuffer(t)})),this},Nc.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Qn.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},Qn.prototype.clear=function(t,e,n,i){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(t,e,n,i)},_t.crossOrigin=void 0,_t.loadTexture=function(t,e,n,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const r=new Nl;r.setCrossOrigin(this.crossOrigin);const s=r.load(t,n,void 0,i);return e&&(s.mapping=e),s},_t.loadTextureCube=function(t,e,n,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const r=new Dl;r.setCrossOrigin(this.crossOrigin);const s=r.load(t,n,void 0,i);return e&&(s.mapping=e),s},_t.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},_t.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const nu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:e}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=e),t.ACESFilmicToneMapping=4,t.AddEquation=n,t.AddOperation=2,t.AdditiveAnimationBlendMode=q,t.AdditiveBlending=2,t.AlphaFormat=1021,t.AlwaysDepth=1,t.AlwaysStencilFunc=519,t.AmbientLight=tc,t.AmbientLightProbe=_c,t.AnimationClip=wl,t.AnimationLoader=class extends Ll{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new Cl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(function(n){try{e(r.parse(JSON.parse(n)))}catch(e){i?i(e):console.error(e),r.manager.itemError(t)}}),n,i)}parse(t){const e=[];for(let n=0;n.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{Th.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(Th,e)}}setLength(t,e=.2*t,n=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}},t.Audio=Rc,t.AudioAnalyser=Nc,t.AudioContext=vc,t.AudioListener=class extends Pe{constructor(){super(),this.type="AudioListener",this.context=vc.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new wc}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const e=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Tc,Ec,Ac),Lc.set(0,0,-1).applyQuaternion(Ec),e.positionX){const t=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(Tc.x,t),e.positionY.linearRampToValueAtTime(Tc.y,t),e.positionZ.linearRampToValueAtTime(Tc.z,t),e.forwardX.linearRampToValueAtTime(Lc.x,t),e.forwardY.linearRampToValueAtTime(Lc.y,t),e.forwardZ.linearRampToValueAtTime(Lc.z,t),e.upX.linearRampToValueAtTime(n.x,t),e.upY.linearRampToValueAtTime(n.y,t),e.upZ.linearRampToValueAtTime(n.z,t)}else e.setPosition(Tc.x,Tc.y,Tc.z),e.setOrientation(Lc.x,Lc.y,Lc.z,n.x,n.y,n.z)}},t.AudioLoader=yc,t.AxesHelper=Lh,t.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Lh(t)},t.BackSide=1,t.BasicDepthPacking=3200,t.BasicShadowMap=0,t.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Il(t)},t.Bone=ta,t.BooleanKeyframeTrack=gl,t.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Sh(t,e)},t.Box2=nh,t.Box3=Dt,t.Box3Helper=class extends xa{constructor(t,e=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new wn;i.setIndex(new en(n,1)),i.setAttribute("position",new un([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(i,new ha({color:e,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){const e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}},t.BoxBufferGeometry=Vn,t.BoxGeometry=Vn,t.BoxHelper=Sh,t.BufferAttribute=en,t.BufferGeometry=wn,t.BufferGeometryLoader=lc,t.ByteType=1010,t.Cache=Tl,t.Camera=Yn,t.CameraHelper=class extends xa{constructor(t){const e=new wn,n=new ha({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],r=[],s={},a=new Qe(16755200),o=new Qe(16711680),l=new Qe(43775),c=new Qe(16777215),h=new Qe(3355443);function u(t,e,n){d(t,n),d(e,n)}function d(t,e){i.push(0,0,0),r.push(e.r,e.g,e.b),void 0===s[t]&&(s[t]=[]),s[t].push(i.length/3-1)}u("n1","n2",a),u("n2","n4",a),u("n4","n3",a),u("n3","n1",a),u("f1","f2",a),u("f2","f4",a),u("f4","f3",a),u("f3","f1",a),u("n1","f1",a),u("n2","f2",a),u("n3","f3",a),u("n4","f4",a),u("p","n1",o),u("p","n2",o),u("p","n3",o),u("p","n4",o),u("u1","u2",l),u("u2","u3",l),u("u3","u1",l),u("c","t",c),u("p","c",h),u("cn1","cn2",h),u("cn3","cn4",h),u("cf1","cf2",h),u("cf3","cf4",h),e.setAttribute("position",new un(i,3)),e.setAttribute("color",new un(r,3)),super(e,n),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update()}update(){const t=this.geometry,e=this.pointMap;bh.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Mh("c",e,t,bh,0,0,-1),Mh("t",e,t,bh,0,0,1),Mh("n1",e,t,bh,-1,-1,-1),Mh("n2",e,t,bh,1,-1,-1),Mh("n3",e,t,bh,-1,1,-1),Mh("n4",e,t,bh,1,1,-1),Mh("f1",e,t,bh,-1,-1,1),Mh("f2",e,t,bh,1,-1,1),Mh("f3",e,t,bh,-1,1,1),Mh("f4",e,t,bh,1,1,1),Mh("u1",e,t,bh,.7,1.1,-1),Mh("u2",e,t,bh,-.7,1.1,-1),Mh("u3",e,t,bh,0,2,-1),Mh("cf1",e,t,bh,-1,0,1),Mh("cf2",e,t,bh,1,0,1),Mh("cf3",e,t,bh,0,-1,1),Mh("cf4",e,t,bh,0,1,1),Mh("cn1",e,t,bh,-1,0,-1),Mh("cn2",e,t,bh,1,0,-1),Mh("cn3",e,t,bh,0,-1,-1),Mh("cn4",e,t,bh,0,1,-1),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},t.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},t.CanvasTexture=Ca,t.CatmullRomCurve3=Za,t.CineonToneMapping=3,t.CircleBufferGeometry=Da,t.CircleGeometry=Da,t.ClampToEdgeWrapping=u,t.Clock=wc,t.Color=Qe,t.ColorKeyframeTrack=vl,t.CompressedTexture=Ra,t.CompressedTextureLoader=class extends Ll{constructor(t){super(t)}load(t,e,n,i){const r=this,s=[],a=new Ra,o=new Cl(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(r.withCredentials);let l=0;function c(c){o.load(t[c],(function(t){const n=r.parse(t,!0);s[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(a.minFilter=g),a.image=s,a.format=n.format,a.needsUpdate=!0,e&&e(a))}),n,i)}if(Array.isArray(t))for(let e=0,n=t.length;e>16&32768,i=e>>12&2047;const r=e>>23&255;return r<103?n:r>142?(n|=31744,n|=(255==r?0:1)&&8388607&e,n):r<113?(i|=2048,n|=(i>>114-r)+(i>>113-r&1),n):(n|=r-112<<10|i>>1,n+=1&i,n)}},t.DecrementStencilOp=7683,t.DecrementWrapStencilOp=34056,t.DefaultLoadingManager=Al,t.DepthFormat=A,t.DepthStencilFormat=L,t.DepthTexture=Pa,t.DirectionalLight=$l,t.DirectionalLightHelper=class extends Pe{constructor(t,e,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,void 0===e&&(e=1);let i=new wn;i.setAttribute("position",new un([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));const r=new ha({fog:!1,toneMapped:!1});this.lightPlane=new ga(i,r),this.add(this.lightPlane),i=new wn,i.setAttribute("position",new un([0,0,0,0,0,1],3)),this.targetLine=new ga(i,r),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){vh.setFromMatrixPosition(this.light.matrixWorld),yh.setFromMatrixPosition(this.light.target.matrixWorld),xh.subVectors(yh,vh),this.lightPlane.lookAt(yh),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(yh),this.targetLine.scale.z=xh.length()}},t.DiscreteInterpolant=ml,t.DodecahedronBufferGeometry=za,t.DodecahedronGeometry=za,t.DoubleSide=2,t.DstAlphaFactor=206,t.DstColorFactor=208,t.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new en(t,e).setUsage(nt)},t.DynamicCopyUsage=35050,t.DynamicDrawUsage=nt,t.DynamicReadUsage=35049,t.EdgesGeometry=Ga,t.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new xa(new Ga(t.geometry),new ha({color:void 0!==e?e:16777215}))},t.EllipseCurve=Va,t.EqualDepth=4,t.EqualStencilFunc=514,t.EquirectangularReflectionMapping=a,t.EquirectangularRefractionMapping=o,t.Euler=ge,t.EventDispatcher=rt,t.ExtrudeBufferGeometry=Fo,t.ExtrudeGeometry=Fo,t.FaceColors=1,t.FileLoader=Cl,t.FlatShading=1,t.Float16BufferAttribute=hn,t.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new un(t,e)},t.Float32BufferAttribute=un,t.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new dn(t,e)},t.Float64BufferAttribute=dn,t.FloatType=M,t.Fog=Ss,t.FogExp2=ws,t.Font=mc,t.FontLoader=class extends Ll{constructor(t){super(t)}load(t,e,n,i){const r=this,s=new Cl(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(r.withCredentials),s.load(t,(function(t){let n;try{n=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),n=JSON.parse(t.substring(65,t.length-2))}const i=r.parse(n);e&&e(i)}),n,i)}parse(t){return new mc(t)}},t.FrontSide=0,t.Frustum=ai,t.GLBufferAttribute=Kc,t.GLSL1="100",t.GLSL3=it,t.GammaEncoding=J,t.GreaterDepth=6,t.GreaterEqualDepth=5,t.GreaterEqualStencilFunc=518,t.GreaterStencilFunc=516,t.GridHelper=gh,t.Group=gs,t.HalfFloatType=w,t.HemisphereLight=Hl,t.HemisphereLightHelper=class extends Pe{constructor(t,e,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;const i=new Go(e);i.rotateY(.5*Math.PI),this.material=new Ke({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const r=i.getAttribute("position"),s=new Float32Array(3*r.count);i.setAttribute("color",new en(s,3)),this.add(new Gn(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const t=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const e=t.geometry.getAttribute("color");mh.copy(this.light.color),fh.copy(this.light.groundColor);for(let t=0,n=e.count;t0){const n=new El(e);r=new Pl(n),r.setCrossOrigin(this.crossOrigin);for(let e=0,n=t.length;e0){i=new Pl(this.manager),i.setCrossOrigin(this.crossOrigin);for(let e=0,i=t.length;e\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,blending:0,depthTest:!1,depthWrite:!1})}(Nh),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,i=100){Vh=this._renderer.getRenderTarget();const r=this._allocateTargets();return this._sceneToCubeUV(t,n,i,r),e>0&&this._blur(r,0,0,e),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(t){return this._fromTexture(t)}fromCubemap(t){return this._fromTexture(t)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=$h(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=Kh(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let t=0;t2?Ph:0,Ph,Ph),o.setRenderTarget(i),u&&o.render(Fh,r),o.render(t,r)}o.toneMapping=h,o.outputEncoding=c,o.autoClear=l}_textureToCubeUV(t,e){const n=this._renderer;t.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=$h()):null==this._equirectShader&&(this._equirectShader=Kh());const i=t.isCubeTexture?this._cubemapShader:this._equirectShader,r=new Gn(Hh[0],i),s=i.uniforms;s.envMap.value=t,t.isCubeTexture||s.texelSize.value.set(1/t.image.width,1/t.image.height),s.inputEncoding.value=Bh[t.encoding],s.outputEncoding.value=Bh[e.texture.encoding],Qh(e,0,0,3*Ph,2*Ph),n.setRenderTarget(e),n.render(r,Oh)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let e=1;eNh&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${m} samples when the maximum is set to 20`);const f=[];let g=0;for(let t=0;t4?i-8+4:0),3*v,2*v),o.setRenderTarget(e),o.render(c,Oh)}},t.ParametricBufferGeometry=ko,t.ParametricGeometry=ko,t.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Vs(t)},t.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new ba(t)},t.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new Ea(t,e)},t.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new ba(t)},t.Path=zl,t.PerspectiveCamera=Jn,t.Plane=ii,t.PlaneBufferGeometry=ci,t.PlaneGeometry=ci,t.PlaneHelper=class extends ga{constructor(t,e=1,n=16776960){const i=n,r=new wn;r.setAttribute("position",new un([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),r.computeBoundingSphere(),super(r,new ha({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=t,this.size=e;const s=new wn;s.setAttribute("position",new un([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),s.computeBoundingSphere(),this.add(new Gn(s,new Ke({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(t){let e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=e<0?1:0,this.lookAt(this.plane.normal),super.updateMatrixWorld(t)}},t.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new Ea(t,e)},t.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new ba(t)},t.PointLight=Zl,t.PointLightHelper=class extends Gn{constructor(t,e,n){super(new jo(e,4,2),new Ke({wireframe:!0,fog:!1,toneMapped:!1})),this.light=t,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},t.Points=Ea,t.PointsMaterial=ba,t.PolarGridHelper=class extends xa{constructor(t=10,e=16,n=8,i=64,r=4473924,s=8947848){r=new Qe(r),s=new Qe(s);const a=[],o=[];for(let n=0;n<=e;n++){const i=n/e*(2*Math.PI),l=Math.sin(i)*t,c=Math.cos(i)*t;a.push(0,0,0),a.push(l,0,c);const h=1&n?r:s;o.push(h.r,h.g,h.b),o.push(h.r,h.g,h.b)}for(let e=0;e<=n;e++){const l=1&e?r:s,c=t-t/n*e;for(let t=0;t> 8 & 0xff ] + _lut[ d0 >> 16 & 0xff ] + _lut[ d0 >> 24 & 0xff ] + '-' + - _lut[ d1 & 0xff ] + _lut[ d1 >> 8 & 0xff ] + '-' + _lut[ d1 >> 16 & 0x0f | 0x40 ] + _lut[ d1 >> 24 & 0xff ] + '-' + - _lut[ d2 & 0x3f | 0x80 ] + _lut[ d2 >> 8 & 0xff ] + '-' + _lut[ d2 >> 16 & 0xff ] + _lut[ d2 >> 24 & 0xff ] + - _lut[ d3 & 0xff ] + _lut[ d3 >> 8 & 0xff ] + _lut[ d3 >> 16 & 0xff ] + _lut[ d3 >> 24 & 0xff ]; - - // .toUpperCase() here flattens concatenated strings to save heap memory space. - return uuid.toUpperCase(); - -} - -function clamp( value, min, max ) { - - return Math.max( min, Math.min( max, value ) ); - -} - -// compute euclidian modulo of m % n -// https://en.wikipedia.org/wiki/Modulo_operation -function euclideanModulo( n, m ) { - - return ( ( n % m ) + m ) % m; - -} - -// Linear mapping from range to range -function mapLinear( x, a1, a2, b1, b2 ) { - - return b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 ); - -} - -// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/ -function inverseLerp( x, y, value ) { - - if ( x !== y ) { - - return ( value - x ) / ( y - x ); - - } else { - - return 0; - - } - -} - -// https://en.wikipedia.org/wiki/Linear_interpolation -function lerp( x, y, t ) { - - return ( 1 - t ) * x + t * y; - -} - -// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/ -function damp( x, y, lambda, dt ) { - - return lerp( x, y, 1 - Math.exp( - lambda * dt ) ); - -} - -// https://www.desmos.com/calculator/vcsjnyz7x4 -function pingpong( x, length = 1 ) { - - return length - Math.abs( euclideanModulo( x, length * 2 ) - length ); - -} - -// http://en.wikipedia.org/wiki/Smoothstep -function smoothstep( x, min, max ) { - - if ( x <= min ) return 0; - if ( x >= max ) return 1; - - x = ( x - min ) / ( max - min ); - - return x * x * ( 3 - 2 * x ); - -} - -function smootherstep( x, min, max ) { - - if ( x <= min ) return 0; - if ( x >= max ) return 1; - - x = ( x - min ) / ( max - min ); - - return x * x * x * ( x * ( x * 6 - 15 ) + 10 ); - -} - -// Random integer from interval -function randInt( low, high ) { - - return low + Math.floor( Math.random() * ( high - low + 1 ) ); - -} - -// Random float from interval -function randFloat( low, high ) { - - return low + Math.random() * ( high - low ); - -} - -// Random float from <-range/2, range/2> interval -function randFloatSpread( range ) { - - return range * ( 0.5 - Math.random() ); - -} - -// Deterministic pseudo-random float in the interval [ 0, 1 ] -function seededRandom( s ) { - - if ( s !== undefined ) _seed = s % 2147483647; - - // Park-Miller algorithm - - _seed = _seed * 16807 % 2147483647; - - return ( _seed - 1 ) / 2147483646; - -} - -function degToRad( degrees ) { - - return degrees * DEG2RAD; - -} - -function radToDeg( radians ) { - - return radians * RAD2DEG; - -} - -function isPowerOfTwo( value ) { - - return ( value & ( value - 1 ) ) === 0 && value !== 0; - -} - -function ceilPowerOfTwo( value ) { - - return Math.pow( 2, Math.ceil( Math.log( value ) / Math.LN2 ) ); - -} - -function floorPowerOfTwo( value ) { - - return Math.pow( 2, Math.floor( Math.log( value ) / Math.LN2 ) ); - -} - -function setQuaternionFromProperEuler( q, a, b, c, order ) { - - // Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles - - // rotations are applied to the axes in the order specified by 'order' - // rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c' - // angles are in radians - - const cos = Math.cos; - const sin = Math.sin; - - const c2 = cos( b / 2 ); - const s2 = sin( b / 2 ); - - const c13 = cos( ( a + c ) / 2 ); - const s13 = sin( ( a + c ) / 2 ); - - const c1_3 = cos( ( a - c ) / 2 ); - const s1_3 = sin( ( a - c ) / 2 ); - - const c3_1 = cos( ( c - a ) / 2 ); - const s3_1 = sin( ( c - a ) / 2 ); - - switch ( order ) { - - case 'XYX': - q.set( c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13 ); - break; - - case 'YZY': - q.set( s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13 ); - break; - - case 'ZXZ': - q.set( s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13 ); - break; - - case 'XZX': - q.set( c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13 ); - break; - - case 'YXY': - q.set( s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13 ); - break; - - case 'ZYZ': - q.set( s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13 ); - break; - - default: - console.warn( 'THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order ); - - } - -} - -var MathUtils = /*#__PURE__*/Object.freeze({ - __proto__: null, - DEG2RAD: DEG2RAD, - RAD2DEG: RAD2DEG, - generateUUID: generateUUID, - clamp: clamp, - euclideanModulo: euclideanModulo, - mapLinear: mapLinear, - inverseLerp: inverseLerp, - lerp: lerp, - damp: damp, - pingpong: pingpong, - smoothstep: smoothstep, - smootherstep: smootherstep, - randInt: randInt, - randFloat: randFloat, - randFloatSpread: randFloatSpread, - seededRandom: seededRandom, - degToRad: degToRad, - radToDeg: radToDeg, - isPowerOfTwo: isPowerOfTwo, - ceilPowerOfTwo: ceilPowerOfTwo, - floorPowerOfTwo: floorPowerOfTwo, - setQuaternionFromProperEuler: setQuaternionFromProperEuler -}); - -class Vector2 { - - constructor( x = 0, y = 0 ) { - - this.x = x; - this.y = y; - - } - - get width() { - - return this.x; - - } - - set width( value ) { - - this.x = value; - - } - - get height() { - - return this.y; - - } - - set height( value ) { - - this.y = value; - - } - - set( x, y ) { - - this.x = x; - this.y = y; - - return this; - - } - - setScalar( scalar ) { - - this.x = scalar; - this.y = scalar; - - return this; - - } - - setX( x ) { - - this.x = x; - - return this; - - } - - setY( y ) { - - this.y = y; - - return this; - - } - - setComponent( index, value ) { - - switch ( index ) { - - case 0: this.x = value; break; - case 1: this.y = value; break; - default: throw new Error( 'index is out of range: ' + index ); - - } - - return this; - - } - - getComponent( index ) { - - switch ( index ) { - - case 0: return this.x; - case 1: return this.y; - default: throw new Error( 'index is out of range: ' + index ); - - } - - } - - clone() { - - return new this.constructor( this.x, this.y ); - - } - - copy( v ) { - - this.x = v.x; - this.y = v.y; - - return this; - - } - - add( v, w ) { - - if ( w !== undefined ) { - - console.warn( 'THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' ); - return this.addVectors( v, w ); - - } - - this.x += v.x; - this.y += v.y; - - return this; - - } - - addScalar( s ) { - - this.x += s; - this.y += s; - - return this; - - } - - addVectors( a, b ) { - - this.x = a.x + b.x; - this.y = a.y + b.y; - - return this; - - } - - addScaledVector( v, s ) { - - this.x += v.x * s; - this.y += v.y * s; - - return this; - - } - - sub( v, w ) { - - if ( w !== undefined ) { - - console.warn( 'THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' ); - return this.subVectors( v, w ); - - } - - this.x -= v.x; - this.y -= v.y; - - return this; - - } - - subScalar( s ) { - - this.x -= s; - this.y -= s; - - return this; - - } - - subVectors( a, b ) { - - this.x = a.x - b.x; - this.y = a.y - b.y; - - return this; - - } - - multiply( v ) { - - this.x *= v.x; - this.y *= v.y; - - return this; - - } - - multiplyScalar( scalar ) { - - this.x *= scalar; - this.y *= scalar; - - return this; - - } - - divide( v ) { - - this.x /= v.x; - this.y /= v.y; - - return this; - - } - - divideScalar( scalar ) { - - return this.multiplyScalar( 1 / scalar ); - - } - - applyMatrix3( m ) { - - const x = this.x, y = this.y; - const e = m.elements; - - this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ]; - this.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ]; - - return this; - - } - - min( v ) { - - this.x = Math.min( this.x, v.x ); - this.y = Math.min( this.y, v.y ); - - return this; - - } - - max( v ) { - - this.x = Math.max( this.x, v.x ); - this.y = Math.max( this.y, v.y ); - - return this; - - } - - clamp( min, max ) { - - // assumes min < max, componentwise - - this.x = Math.max( min.x, Math.min( max.x, this.x ) ); - this.y = Math.max( min.y, Math.min( max.y, this.y ) ); - - return this; - - } - - clampScalar( minVal, maxVal ) { - - this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); - this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); - - return this; - - } - - clampLength( min, max ) { - - const length = this.length(); - - return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); - - } - - floor() { - - this.x = Math.floor( this.x ); - this.y = Math.floor( this.y ); - - return this; - - } - - ceil() { - - this.x = Math.ceil( this.x ); - this.y = Math.ceil( this.y ); - - return this; - - } - - round() { - - this.x = Math.round( this.x ); - this.y = Math.round( this.y ); - - return this; - - } - - roundToZero() { - - this.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x ); - this.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y ); - - return this; - - } - - negate() { - - this.x = - this.x; - this.y = - this.y; - - return this; - - } - - dot( v ) { - - return this.x * v.x + this.y * v.y; - - } - - cross( v ) { - - return this.x * v.y - this.y * v.x; - - } - - lengthSq() { - - return this.x * this.x + this.y * this.y; - - } - - length() { - - return Math.sqrt( this.x * this.x + this.y * this.y ); - - } - - manhattanLength() { - - return Math.abs( this.x ) + Math.abs( this.y ); - - } - - normalize() { - - return this.divideScalar( this.length() || 1 ); - - } - - angle() { - - // computes the angle in radians with respect to the positive x-axis - - const angle = Math.atan2( - this.y, - this.x ) + Math.PI; - - return angle; - - } - - distanceTo( v ) { - - return Math.sqrt( this.distanceToSquared( v ) ); - - } - - distanceToSquared( v ) { - - const dx = this.x - v.x, dy = this.y - v.y; - return dx * dx + dy * dy; - - } - - manhattanDistanceTo( v ) { - - return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ); - - } - - setLength( length ) { - - return this.normalize().multiplyScalar( length ); - - } - - lerp( v, alpha ) { - - this.x += ( v.x - this.x ) * alpha; - this.y += ( v.y - this.y ) * alpha; - - return this; - - } - - lerpVectors( v1, v2, alpha ) { - - this.x = v1.x + ( v2.x - v1.x ) * alpha; - this.y = v1.y + ( v2.y - v1.y ) * alpha; - - return this; - - } - - equals( v ) { - - return ( ( v.x === this.x ) && ( v.y === this.y ) ); - - } - - fromArray( array, offset = 0 ) { - - this.x = array[ offset ]; - this.y = array[ offset + 1 ]; - - return this; - - } - - toArray( array = [], offset = 0 ) { - - array[ offset ] = this.x; - array[ offset + 1 ] = this.y; - - return array; - - } - - fromBufferAttribute( attribute, index, offset ) { - - if ( offset !== undefined ) { - - console.warn( 'THREE.Vector2: offset has been removed from .fromBufferAttribute().' ); - - } - - this.x = attribute.getX( index ); - this.y = attribute.getY( index ); - - return this; - - } - - rotateAround( center, angle ) { - - const c = Math.cos( angle ), s = Math.sin( angle ); - - const x = this.x - center.x; - const y = this.y - center.y; - - this.x = x * c - y * s + center.x; - this.y = x * s + y * c + center.y; - - return this; - - } - - random() { - - this.x = Math.random(); - this.y = Math.random(); - - return this; - - } - -} - -Vector2.prototype.isVector2 = true; - -class Matrix3 { - - constructor() { - - this.elements = [ - - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 - - ]; - - if ( arguments.length > 0 ) { - - console.error( 'THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.' ); - - } - - } - - set( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) { - - const te = this.elements; - - te[ 0 ] = n11; te[ 1 ] = n21; te[ 2 ] = n31; - te[ 3 ] = n12; te[ 4 ] = n22; te[ 5 ] = n32; - te[ 6 ] = n13; te[ 7 ] = n23; te[ 8 ] = n33; - - return this; - - } - - identity() { - - this.set( - - 1, 0, 0, - 0, 1, 0, - 0, 0, 1 - - ); - - return this; - - } - - copy( m ) { - - const te = this.elements; - const me = m.elements; - - te[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; - te[ 3 ] = me[ 3 ]; te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; - te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; te[ 8 ] = me[ 8 ]; - - return this; - - } - - extractBasis( xAxis, yAxis, zAxis ) { - - xAxis.setFromMatrix3Column( this, 0 ); - yAxis.setFromMatrix3Column( this, 1 ); - zAxis.setFromMatrix3Column( this, 2 ); - - return this; - - } - - setFromMatrix4( m ) { - - const me = m.elements; - - this.set( - - me[ 0 ], me[ 4 ], me[ 8 ], - me[ 1 ], me[ 5 ], me[ 9 ], - me[ 2 ], me[ 6 ], me[ 10 ] - - ); - - return this; - - } - - multiply( m ) { - - return this.multiplyMatrices( this, m ); - - } - - premultiply( m ) { - - return this.multiplyMatrices( m, this ); - - } - - multiplyMatrices( a, b ) { - - const ae = a.elements; - const be = b.elements; - const te = this.elements; - - const a11 = ae[ 0 ], a12 = ae[ 3 ], a13 = ae[ 6 ]; - const a21 = ae[ 1 ], a22 = ae[ 4 ], a23 = ae[ 7 ]; - const a31 = ae[ 2 ], a32 = ae[ 5 ], a33 = ae[ 8 ]; - - const b11 = be[ 0 ], b12 = be[ 3 ], b13 = be[ 6 ]; - const b21 = be[ 1 ], b22 = be[ 4 ], b23 = be[ 7 ]; - const b31 = be[ 2 ], b32 = be[ 5 ], b33 = be[ 8 ]; - - te[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31; - te[ 3 ] = a11 * b12 + a12 * b22 + a13 * b32; - te[ 6 ] = a11 * b13 + a12 * b23 + a13 * b33; - - te[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31; - te[ 4 ] = a21 * b12 + a22 * b22 + a23 * b32; - te[ 7 ] = a21 * b13 + a22 * b23 + a23 * b33; - - te[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31; - te[ 5 ] = a31 * b12 + a32 * b22 + a33 * b32; - te[ 8 ] = a31 * b13 + a32 * b23 + a33 * b33; - - return this; - - } - - multiplyScalar( s ) { - - const te = this.elements; - - te[ 0 ] *= s; te[ 3 ] *= s; te[ 6 ] *= s; - te[ 1 ] *= s; te[ 4 ] *= s; te[ 7 ] *= s; - te[ 2 ] *= s; te[ 5 ] *= s; te[ 8 ] *= s; - - return this; - - } - - determinant() { - - const te = this.elements; - - const a = te[ 0 ], b = te[ 1 ], c = te[ 2 ], - d = te[ 3 ], e = te[ 4 ], f = te[ 5 ], - g = te[ 6 ], h = te[ 7 ], i = te[ 8 ]; - - return a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g; - - } - - invert() { - - const te = this.elements, - - n11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], - n12 = te[ 3 ], n22 = te[ 4 ], n32 = te[ 5 ], - n13 = te[ 6 ], n23 = te[ 7 ], n33 = te[ 8 ], - - t11 = n33 * n22 - n32 * n23, - t12 = n32 * n13 - n33 * n12, - t13 = n23 * n12 - n22 * n13, - - det = n11 * t11 + n21 * t12 + n31 * t13; - - if ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0 ); - - const detInv = 1 / det; - - te[ 0 ] = t11 * detInv; - te[ 1 ] = ( n31 * n23 - n33 * n21 ) * detInv; - te[ 2 ] = ( n32 * n21 - n31 * n22 ) * detInv; - - te[ 3 ] = t12 * detInv; - te[ 4 ] = ( n33 * n11 - n31 * n13 ) * detInv; - te[ 5 ] = ( n31 * n12 - n32 * n11 ) * detInv; - - te[ 6 ] = t13 * detInv; - te[ 7 ] = ( n21 * n13 - n23 * n11 ) * detInv; - te[ 8 ] = ( n22 * n11 - n21 * n12 ) * detInv; - - return this; - - } - - transpose() { - - let tmp; - const m = this.elements; - - tmp = m[ 1 ]; m[ 1 ] = m[ 3 ]; m[ 3 ] = tmp; - tmp = m[ 2 ]; m[ 2 ] = m[ 6 ]; m[ 6 ] = tmp; - tmp = m[ 5 ]; m[ 5 ] = m[ 7 ]; m[ 7 ] = tmp; - - return this; - - } - - getNormalMatrix( matrix4 ) { - - return this.setFromMatrix4( matrix4 ).invert().transpose(); - - } - - transposeIntoArray( r ) { - - const m = this.elements; - - r[ 0 ] = m[ 0 ]; - r[ 1 ] = m[ 3 ]; - r[ 2 ] = m[ 6 ]; - r[ 3 ] = m[ 1 ]; - r[ 4 ] = m[ 4 ]; - r[ 5 ] = m[ 7 ]; - r[ 6 ] = m[ 2 ]; - r[ 7 ] = m[ 5 ]; - r[ 8 ] = m[ 8 ]; - - return this; - - } - - setUvTransform( tx, ty, sx, sy, rotation, cx, cy ) { - - const c = Math.cos( rotation ); - const s = Math.sin( rotation ); - - this.set( - sx * c, sx * s, - sx * ( c * cx + s * cy ) + cx + tx, - - sy * s, sy * c, - sy * ( - s * cx + c * cy ) + cy + ty, - 0, 0, 1 - ); - - return this; - - } - - scale( sx, sy ) { - - const te = this.elements; - - te[ 0 ] *= sx; te[ 3 ] *= sx; te[ 6 ] *= sx; - te[ 1 ] *= sy; te[ 4 ] *= sy; te[ 7 ] *= sy; - - return this; - - } - - rotate( theta ) { - - const c = Math.cos( theta ); - const s = Math.sin( theta ); - - const te = this.elements; - - const a11 = te[ 0 ], a12 = te[ 3 ], a13 = te[ 6 ]; - const a21 = te[ 1 ], a22 = te[ 4 ], a23 = te[ 7 ]; - - te[ 0 ] = c * a11 + s * a21; - te[ 3 ] = c * a12 + s * a22; - te[ 6 ] = c * a13 + s * a23; - - te[ 1 ] = - s * a11 + c * a21; - te[ 4 ] = - s * a12 + c * a22; - te[ 7 ] = - s * a13 + c * a23; - - return this; - - } - - translate( tx, ty ) { - - const te = this.elements; - - te[ 0 ] += tx * te[ 2 ]; te[ 3 ] += tx * te[ 5 ]; te[ 6 ] += tx * te[ 8 ]; - te[ 1 ] += ty * te[ 2 ]; te[ 4 ] += ty * te[ 5 ]; te[ 7 ] += ty * te[ 8 ]; - - return this; - - } - - equals( matrix ) { - - const te = this.elements; - const me = matrix.elements; - - for ( let i = 0; i < 9; i ++ ) { - - if ( te[ i ] !== me[ i ] ) return false; - - } - - return true; - - } - - fromArray( array, offset = 0 ) { - - for ( let i = 0; i < 9; i ++ ) { - - this.elements[ i ] = array[ i + offset ]; - - } - - return this; - - } - - toArray( array = [], offset = 0 ) { - - const te = this.elements; - - array[ offset ] = te[ 0 ]; - array[ offset + 1 ] = te[ 1 ]; - array[ offset + 2 ] = te[ 2 ]; - - array[ offset + 3 ] = te[ 3 ]; - array[ offset + 4 ] = te[ 4 ]; - array[ offset + 5 ] = te[ 5 ]; - - array[ offset + 6 ] = te[ 6 ]; - array[ offset + 7 ] = te[ 7 ]; - array[ offset + 8 ] = te[ 8 ]; - - return array; - - } - - clone() { - - return new this.constructor().fromArray( this.elements ); - - } - -} - -Matrix3.prototype.isMatrix3 = true; - -let _canvas; - -class ImageUtils { - - static getDataURL( image ) { - - if ( /^data:/i.test( image.src ) ) { - - return image.src; - - } - - if ( typeof HTMLCanvasElement == 'undefined' ) { - - return image.src; - - } - - let canvas; - - if ( image instanceof HTMLCanvasElement ) { - - canvas = image; - - } else { - - if ( _canvas === undefined ) _canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' ); - - _canvas.width = image.width; - _canvas.height = image.height; - - const context = _canvas.getContext( '2d' ); - - if ( image instanceof ImageData ) { - - context.putImageData( image, 0, 0 ); - - } else { - - context.drawImage( image, 0, 0, image.width, image.height ); - - } - - canvas = _canvas; - - } - - if ( canvas.width > 2048 || canvas.height > 2048 ) { - - console.warn( 'THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image ); - - return canvas.toDataURL( 'image/jpeg', 0.6 ); - - } else { - - return canvas.toDataURL( 'image/png' ); - - } - - } - -} - -let textureId = 0; - -class Texture extends EventDispatcher { - - constructor( image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1, encoding = LinearEncoding ) { - - super(); - - Object.defineProperty( this, 'id', { value: textureId ++ } ); - - this.uuid = generateUUID(); - - this.name = ''; - - this.image = image; - this.mipmaps = []; - - this.mapping = mapping; - - this.wrapS = wrapS; - this.wrapT = wrapT; - - this.magFilter = magFilter; - this.minFilter = minFilter; - - this.anisotropy = anisotropy; - - this.format = format; - this.internalFormat = null; - this.type = type; - - this.offset = new Vector2( 0, 0 ); - this.repeat = new Vector2( 1, 1 ); - this.center = new Vector2( 0, 0 ); - this.rotation = 0; - - this.matrixAutoUpdate = true; - this.matrix = new Matrix3(); - - this.generateMipmaps = true; - this.premultiplyAlpha = false; - this.flipY = true; - this.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml) - - // Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap. - // - // Also changing the encoding after already used by a Material will not automatically make the Material - // update. You need to explicitly call Material.needsUpdate to trigger it to recompile. - this.encoding = encoding; - - this.version = 0; - this.onUpdate = null; - - } - - updateMatrix() { - - this.matrix.setUvTransform( this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y ); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - copy( source ) { - - this.name = source.name; - - this.image = source.image; - this.mipmaps = source.mipmaps.slice( 0 ); - - this.mapping = source.mapping; - - this.wrapS = source.wrapS; - this.wrapT = source.wrapT; - - this.magFilter = source.magFilter; - this.minFilter = source.minFilter; - - this.anisotropy = source.anisotropy; - - this.format = source.format; - this.internalFormat = source.internalFormat; - this.type = source.type; - - this.offset.copy( source.offset ); - this.repeat.copy( source.repeat ); - this.center.copy( source.center ); - this.rotation = source.rotation; - - this.matrixAutoUpdate = source.matrixAutoUpdate; - this.matrix.copy( source.matrix ); - - this.generateMipmaps = source.generateMipmaps; - this.premultiplyAlpha = source.premultiplyAlpha; - this.flipY = source.flipY; - this.unpackAlignment = source.unpackAlignment; - this.encoding = source.encoding; - - return this; - - } - - toJSON( meta ) { - - const isRootObject = ( meta === undefined || typeof meta === 'string' ); - - if ( ! isRootObject && meta.textures[ this.uuid ] !== undefined ) { - - return meta.textures[ this.uuid ]; - - } - - const output = { - - metadata: { - version: 4.5, - type: 'Texture', - generator: 'Texture.toJSON' - }, - - uuid: this.uuid, - name: this.name, - - mapping: this.mapping, - - repeat: [ this.repeat.x, this.repeat.y ], - offset: [ this.offset.x, this.offset.y ], - center: [ this.center.x, this.center.y ], - rotation: this.rotation, - - wrap: [ this.wrapS, this.wrapT ], - - format: this.format, - type: this.type, - encoding: this.encoding, - - minFilter: this.minFilter, - magFilter: this.magFilter, - anisotropy: this.anisotropy, - - flipY: this.flipY, - - premultiplyAlpha: this.premultiplyAlpha, - unpackAlignment: this.unpackAlignment - - }; - - if ( this.image !== undefined ) { - - // TODO: Move to THREE.Image - - const image = this.image; - - if ( image.uuid === undefined ) { - - image.uuid = generateUUID(); // UGH - - } - - if ( ! isRootObject && meta.images[ image.uuid ] === undefined ) { - - let url; - - if ( Array.isArray( image ) ) { - - // process array of images e.g. CubeTexture - - url = []; - - for ( let i = 0, l = image.length; i < l; i ++ ) { - - // check cube texture with data textures - - if ( image[ i ].isDataTexture ) { - - url.push( serializeImage( image[ i ].image ) ); - - } else { - - url.push( serializeImage( image[ i ] ) ); - - } - - } - - } else { - - // process single image - - url = serializeImage( image ); - - } - - meta.images[ image.uuid ] = { - uuid: image.uuid, - url: url - }; - - } - - output.image = image.uuid; - - } - - if ( ! isRootObject ) { - - meta.textures[ this.uuid ] = output; - - } - - return output; - - } - - dispose() { - - this.dispatchEvent( { type: 'dispose' } ); - - } - - transformUv( uv ) { - - if ( this.mapping !== UVMapping ) return uv; - - uv.applyMatrix3( this.matrix ); - - if ( uv.x < 0 || uv.x > 1 ) { - - switch ( this.wrapS ) { - - case RepeatWrapping: - - uv.x = uv.x - Math.floor( uv.x ); - break; - - case ClampToEdgeWrapping: - - uv.x = uv.x < 0 ? 0 : 1; - break; - - case MirroredRepeatWrapping: - - if ( Math.abs( Math.floor( uv.x ) % 2 ) === 1 ) { - - uv.x = Math.ceil( uv.x ) - uv.x; - - } else { - - uv.x = uv.x - Math.floor( uv.x ); - - } - - break; - - } - - } - - if ( uv.y < 0 || uv.y > 1 ) { - - switch ( this.wrapT ) { - - case RepeatWrapping: - - uv.y = uv.y - Math.floor( uv.y ); - break; - - case ClampToEdgeWrapping: - - uv.y = uv.y < 0 ? 0 : 1; - break; - - case MirroredRepeatWrapping: - - if ( Math.abs( Math.floor( uv.y ) % 2 ) === 1 ) { - - uv.y = Math.ceil( uv.y ) - uv.y; - - } else { - - uv.y = uv.y - Math.floor( uv.y ); - - } - - break; - - } - - } - - if ( this.flipY ) { - - uv.y = 1 - uv.y; - - } - - return uv; - - } - - set needsUpdate( value ) { - - if ( value === true ) this.version ++; - - } - -} - -Texture.DEFAULT_IMAGE = undefined; -Texture.DEFAULT_MAPPING = UVMapping; - -Texture.prototype.isTexture = true; - -function serializeImage( image ) { - - if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || - ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || - ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) { - - // default images - - return ImageUtils.getDataURL( image ); - - } else { - - if ( image.data ) { - - // images of DataTexture - - return { - data: Array.prototype.slice.call( image.data ), - width: image.width, - height: image.height, - type: image.data.constructor.name - }; - - } else { - - console.warn( 'THREE.Texture: Unable to serialize Texture.' ); - return {}; - - } - - } - -} - -class Vector4 { - - constructor( x = 0, y = 0, z = 0, w = 1 ) { - - this.x = x; - this.y = y; - this.z = z; - this.w = w; - - } - - get width() { - - return this.z; - - } - - set width( value ) { - - this.z = value; - - } - - get height() { - - return this.w; - - } - - set height( value ) { - - this.w = value; - - } - - set( x, y, z, w ) { - - this.x = x; - this.y = y; - this.z = z; - this.w = w; - - return this; - - } - - setScalar( scalar ) { - - this.x = scalar; - this.y = scalar; - this.z = scalar; - this.w = scalar; - - return this; - - } - - setX( x ) { - - this.x = x; - - return this; - - } - - setY( y ) { - - this.y = y; - - return this; - - } - - setZ( z ) { - - this.z = z; - - return this; - - } - - setW( w ) { - - this.w = w; - - return this; - - } - - setComponent( index, value ) { - - switch ( index ) { - - case 0: this.x = value; break; - case 1: this.y = value; break; - case 2: this.z = value; break; - case 3: this.w = value; break; - default: throw new Error( 'index is out of range: ' + index ); - - } - - return this; - - } - - getComponent( index ) { - - switch ( index ) { - - case 0: return this.x; - case 1: return this.y; - case 2: return this.z; - case 3: return this.w; - default: throw new Error( 'index is out of range: ' + index ); - - } - - } - - clone() { - - return new this.constructor( this.x, this.y, this.z, this.w ); - - } - - copy( v ) { - - this.x = v.x; - this.y = v.y; - this.z = v.z; - this.w = ( v.w !== undefined ) ? v.w : 1; - - return this; - - } - - add( v, w ) { - - if ( w !== undefined ) { - - console.warn( 'THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' ); - return this.addVectors( v, w ); - - } - - this.x += v.x; - this.y += v.y; - this.z += v.z; - this.w += v.w; - - return this; - - } - - addScalar( s ) { - - this.x += s; - this.y += s; - this.z += s; - this.w += s; - - return this; - - } - - addVectors( a, b ) { - - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - this.w = a.w + b.w; - - return this; - - } - - addScaledVector( v, s ) { - - this.x += v.x * s; - this.y += v.y * s; - this.z += v.z * s; - this.w += v.w * s; - - return this; - - } - - sub( v, w ) { - - if ( w !== undefined ) { - - console.warn( 'THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' ); - return this.subVectors( v, w ); - - } - - this.x -= v.x; - this.y -= v.y; - this.z -= v.z; - this.w -= v.w; - - return this; - - } - - subScalar( s ) { - - this.x -= s; - this.y -= s; - this.z -= s; - this.w -= s; - - return this; - - } - - subVectors( a, b ) { - - this.x = a.x - b.x; - this.y = a.y - b.y; - this.z = a.z - b.z; - this.w = a.w - b.w; - - return this; - - } - - multiply( v ) { - - this.x *= v.x; - this.y *= v.y; - this.z *= v.z; - this.w *= v.w; - - return this; - - } - - multiplyScalar( scalar ) { - - this.x *= scalar; - this.y *= scalar; - this.z *= scalar; - this.w *= scalar; - - return this; - - } - - applyMatrix4( m ) { - - const x = this.x, y = this.y, z = this.z, w = this.w; - const e = m.elements; - - this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] * w; - this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] * w; - this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] * w; - this.w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] * w; - - return this; - - } - - divideScalar( scalar ) { - - return this.multiplyScalar( 1 / scalar ); - - } - - setAxisAngleFromQuaternion( q ) { - - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm - - // q is assumed to be normalized - - this.w = 2 * Math.acos( q.w ); - - const s = Math.sqrt( 1 - q.w * q.w ); - - if ( s < 0.0001 ) { - - this.x = 1; - this.y = 0; - this.z = 0; - - } else { - - this.x = q.x / s; - this.y = q.y / s; - this.z = q.z / s; - - } - - return this; - - } - - setAxisAngleFromRotationMatrix( m ) { - - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm - - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - - let angle, x, y, z; // variables for result - const epsilon = 0.01, // margin to allow for rounding errors - epsilon2 = 0.1, // margin to distinguish between 0 and 180 degrees - - te = m.elements, - - m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ], - m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ], - m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ]; - - if ( ( Math.abs( m12 - m21 ) < epsilon ) && - ( Math.abs( m13 - m31 ) < epsilon ) && - ( Math.abs( m23 - m32 ) < epsilon ) ) { - - // singularity found - // first check for identity matrix which must have +1 for all terms - // in leading diagonal and zero in other terms - - if ( ( Math.abs( m12 + m21 ) < epsilon2 ) && - ( Math.abs( m13 + m31 ) < epsilon2 ) && - ( Math.abs( m23 + m32 ) < epsilon2 ) && - ( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) { - - // this singularity is identity matrix so angle = 0 - - this.set( 1, 0, 0, 0 ); - - return this; // zero angle, arbitrary axis - - } - - // otherwise this singularity is angle = 180 - - angle = Math.PI; - - const xx = ( m11 + 1 ) / 2; - const yy = ( m22 + 1 ) / 2; - const zz = ( m33 + 1 ) / 2; - const xy = ( m12 + m21 ) / 4; - const xz = ( m13 + m31 ) / 4; - const yz = ( m23 + m32 ) / 4; - - if ( ( xx > yy ) && ( xx > zz ) ) { - - // m11 is the largest diagonal term - - if ( xx < epsilon ) { - - x = 0; - y = 0.707106781; - z = 0.707106781; - - } else { - - x = Math.sqrt( xx ); - y = xy / x; - z = xz / x; - - } - - } else if ( yy > zz ) { - - // m22 is the largest diagonal term - - if ( yy < epsilon ) { - - x = 0.707106781; - y = 0; - z = 0.707106781; - - } else { - - y = Math.sqrt( yy ); - x = xy / y; - z = yz / y; - - } - - } else { - - // m33 is the largest diagonal term so base result on this - - if ( zz < epsilon ) { - - x = 0.707106781; - y = 0.707106781; - z = 0; - - } else { - - z = Math.sqrt( zz ); - x = xz / z; - y = yz / z; - - } - - } - - this.set( x, y, z, angle ); - - return this; // return 180 deg rotation - - } - - // as we have reached here there are no singularities so we can handle normally - - let s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 ) + - ( m13 - m31 ) * ( m13 - m31 ) + - ( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize - - if ( Math.abs( s ) < 0.001 ) s = 1; - - // prevent divide by zero, should not happen if matrix is orthogonal and should be - // caught by singularity test above, but I've left it in just in case - - this.x = ( m32 - m23 ) / s; - this.y = ( m13 - m31 ) / s; - this.z = ( m21 - m12 ) / s; - this.w = Math.acos( ( m11 + m22 + m33 - 1 ) / 2 ); - - return this; - - } - - min( v ) { - - this.x = Math.min( this.x, v.x ); - this.y = Math.min( this.y, v.y ); - this.z = Math.min( this.z, v.z ); - this.w = Math.min( this.w, v.w ); - - return this; - - } - - max( v ) { - - this.x = Math.max( this.x, v.x ); - this.y = Math.max( this.y, v.y ); - this.z = Math.max( this.z, v.z ); - this.w = Math.max( this.w, v.w ); - - return this; - - } - - clamp( min, max ) { - - // assumes min < max, componentwise - - this.x = Math.max( min.x, Math.min( max.x, this.x ) ); - this.y = Math.max( min.y, Math.min( max.y, this.y ) ); - this.z = Math.max( min.z, Math.min( max.z, this.z ) ); - this.w = Math.max( min.w, Math.min( max.w, this.w ) ); - - return this; - - } - - clampScalar( minVal, maxVal ) { - - this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); - this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); - this.z = Math.max( minVal, Math.min( maxVal, this.z ) ); - this.w = Math.max( minVal, Math.min( maxVal, this.w ) ); - - return this; - - } - - clampLength( min, max ) { - - const length = this.length(); - - return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); - - } - - floor() { - - this.x = Math.floor( this.x ); - this.y = Math.floor( this.y ); - this.z = Math.floor( this.z ); - this.w = Math.floor( this.w ); - - return this; - - } - - ceil() { - - this.x = Math.ceil( this.x ); - this.y = Math.ceil( this.y ); - this.z = Math.ceil( this.z ); - this.w = Math.ceil( this.w ); - - return this; - - } - - round() { - - this.x = Math.round( this.x ); - this.y = Math.round( this.y ); - this.z = Math.round( this.z ); - this.w = Math.round( this.w ); - - return this; - - } - - roundToZero() { - - this.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x ); - this.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y ); - this.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z ); - this.w = ( this.w < 0 ) ? Math.ceil( this.w ) : Math.floor( this.w ); - - return this; - - } - - negate() { - - this.x = - this.x; - this.y = - this.y; - this.z = - this.z; - this.w = - this.w; - - return this; - - } - - dot( v ) { - - return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w; - - } - - lengthSq() { - - return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; - - } - - length() { - - return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w ); - - } - - manhattanLength() { - - return Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ) + Math.abs( this.w ); - - } - - normalize() { - - return this.divideScalar( this.length() || 1 ); - - } - - setLength( length ) { - - return this.normalize().multiplyScalar( length ); - - } - - lerp( v, alpha ) { - - this.x += ( v.x - this.x ) * alpha; - this.y += ( v.y - this.y ) * alpha; - this.z += ( v.z - this.z ) * alpha; - this.w += ( v.w - this.w ) * alpha; - - return this; - - } - - lerpVectors( v1, v2, alpha ) { - - this.x = v1.x + ( v2.x - v1.x ) * alpha; - this.y = v1.y + ( v2.y - v1.y ) * alpha; - this.z = v1.z + ( v2.z - v1.z ) * alpha; - this.w = v1.w + ( v2.w - v1.w ) * alpha; - - return this; - - } - - equals( v ) { - - return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) && ( v.w === this.w ) ); - - } - - fromArray( array, offset = 0 ) { - - this.x = array[ offset ]; - this.y = array[ offset + 1 ]; - this.z = array[ offset + 2 ]; - this.w = array[ offset + 3 ]; - - return this; - - } - - toArray( array = [], offset = 0 ) { - - array[ offset ] = this.x; - array[ offset + 1 ] = this.y; - array[ offset + 2 ] = this.z; - array[ offset + 3 ] = this.w; - - return array; - - } - - fromBufferAttribute( attribute, index, offset ) { - - if ( offset !== undefined ) { - - console.warn( 'THREE.Vector4: offset has been removed from .fromBufferAttribute().' ); - - } - - this.x = attribute.getX( index ); - this.y = attribute.getY( index ); - this.z = attribute.getZ( index ); - this.w = attribute.getW( index ); - - return this; - - } - - random() { - - this.x = Math.random(); - this.y = Math.random(); - this.z = Math.random(); - this.w = Math.random(); - - return this; - - } - -} - -Vector4.prototype.isVector4 = true; - -/* - In options, we can specify: - * Texture parameters for an auto-generated target texture - * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers -*/ -class WebGLRenderTarget extends EventDispatcher { - - constructor( width, height, options = {} ) { - - super(); - - this.width = width; - this.height = height; - this.depth = 1; - - this.scissor = new Vector4( 0, 0, width, height ); - this.scissorTest = false; - - this.viewport = new Vector4( 0, 0, width, height ); - - this.texture = new Texture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding ); - - this.texture.image = { width: width, height: height, depth: 1 }; - - this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false; - this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter; - - this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true; - this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false; - this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null; - - } - - setTexture( texture ) { - - texture.image = { - width: this.width, - height: this.height, - depth: this.depth - }; - - this.texture = texture; - - } - - setSize( width, height, depth = 1 ) { - - if ( this.width !== width || this.height !== height || this.depth !== depth ) { - - this.width = width; - this.height = height; - this.depth = depth; - - this.texture.image.width = width; - this.texture.image.height = height; - this.texture.image.depth = depth; - - this.dispose(); - - } - - this.viewport.set( 0, 0, width, height ); - this.scissor.set( 0, 0, width, height ); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - copy( source ) { - - this.width = source.width; - this.height = source.height; - this.depth = source.depth; - - this.viewport.copy( source.viewport ); - - this.texture = source.texture.clone(); - this.texture.image = { ...this.texture.image }; // See #20328. - - this.depthBuffer = source.depthBuffer; - this.stencilBuffer = source.stencilBuffer; - this.depthTexture = source.depthTexture; - - return this; - - } - - dispose() { - - this.dispatchEvent( { type: 'dispose' } ); - - } - -} - -WebGLRenderTarget.prototype.isWebGLRenderTarget = true; - -class WebGLMultipleRenderTargets extends WebGLRenderTarget { - - constructor( width, height, count ) { - - super( width, height ); - - const texture = this.texture; - - this.texture = []; - - for ( let i = 0; i < count; i ++ ) { - - this.texture[ i ] = texture.clone(); - - } - - } - - setSize( width, height, depth = 1 ) { - - if ( this.width !== width || this.height !== height || this.depth !== depth ) { - - this.width = width; - this.height = height; - this.depth = depth; - - for ( let i = 0, il = this.texture.length; i < il; i ++ ) { - - this.texture[ i ].image.width = width; - this.texture[ i ].image.height = height; - this.texture[ i ].image.depth = depth; - - } - - this.dispose(); - - } - - this.viewport.set( 0, 0, width, height ); - this.scissor.set( 0, 0, width, height ); - - return this; - - } - - copy( source ) { - - this.dispose(); - - this.width = source.width; - this.height = source.height; - this.depth = source.depth; - - this.viewport.set( 0, 0, this.width, this.height ); - this.scissor.set( 0, 0, this.width, this.height ); - - this.depthBuffer = source.depthBuffer; - this.stencilBuffer = source.stencilBuffer; - this.depthTexture = source.depthTexture; - - this.texture.length = 0; - - for ( let i = 0, il = source.texture.length; i < il; i ++ ) { - - this.texture[ i ] = source.texture[ i ].clone(); - - } - - return this; - - } - -} - -WebGLMultipleRenderTargets.prototype.isWebGLMultipleRenderTargets = true; - -class WebGLMultisampleRenderTarget extends WebGLRenderTarget { - - constructor( width, height, options ) { - - super( width, height, options ); - - this.samples = 4; - - } - - copy( source ) { - - super.copy.call( this, source ); - - this.samples = source.samples; - - return this; - - } - -} - -WebGLMultisampleRenderTarget.prototype.isWebGLMultisampleRenderTarget = true; - -class Quaternion { - - constructor( x = 0, y = 0, z = 0, w = 1 ) { - - this._x = x; - this._y = y; - this._z = z; - this._w = w; - - } - - static slerp( qa, qb, qm, t ) { - - console.warn( 'THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead.' ); - return qm.slerpQuaternions( qa, qb, t ); - - } - - static slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) { - - // fuzz-free, array-based Quaternion SLERP operation - - let x0 = src0[ srcOffset0 + 0 ], - y0 = src0[ srcOffset0 + 1 ], - z0 = src0[ srcOffset0 + 2 ], - w0 = src0[ srcOffset0 + 3 ]; - - const x1 = src1[ srcOffset1 + 0 ], - y1 = src1[ srcOffset1 + 1 ], - z1 = src1[ srcOffset1 + 2 ], - w1 = src1[ srcOffset1 + 3 ]; - - if ( t === 0 ) { - - dst[ dstOffset + 0 ] = x0; - dst[ dstOffset + 1 ] = y0; - dst[ dstOffset + 2 ] = z0; - dst[ dstOffset + 3 ] = w0; - return; - - } - - if ( t === 1 ) { - - dst[ dstOffset + 0 ] = x1; - dst[ dstOffset + 1 ] = y1; - dst[ dstOffset + 2 ] = z1; - dst[ dstOffset + 3 ] = w1; - return; - - } - - if ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) { - - let s = 1 - t; - const cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1, - dir = ( cos >= 0 ? 1 : - 1 ), - sqrSin = 1 - cos * cos; - - // Skip the Slerp for tiny steps to avoid numeric problems: - if ( sqrSin > Number.EPSILON ) { - - const sin = Math.sqrt( sqrSin ), - len = Math.atan2( sin, cos * dir ); - - s = Math.sin( s * len ) / sin; - t = Math.sin( t * len ) / sin; - - } - - const tDir = t * dir; - - x0 = x0 * s + x1 * tDir; - y0 = y0 * s + y1 * tDir; - z0 = z0 * s + z1 * tDir; - w0 = w0 * s + w1 * tDir; - - // Normalize in case we just did a lerp: - if ( s === 1 - t ) { - - const f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 ); - - x0 *= f; - y0 *= f; - z0 *= f; - w0 *= f; - - } - - } - - dst[ dstOffset ] = x0; - dst[ dstOffset + 1 ] = y0; - dst[ dstOffset + 2 ] = z0; - dst[ dstOffset + 3 ] = w0; - - } - - static multiplyQuaternionsFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1 ) { - - const x0 = src0[ srcOffset0 ]; - const y0 = src0[ srcOffset0 + 1 ]; - const z0 = src0[ srcOffset0 + 2 ]; - const w0 = src0[ srcOffset0 + 3 ]; - - const x1 = src1[ srcOffset1 ]; - const y1 = src1[ srcOffset1 + 1 ]; - const z1 = src1[ srcOffset1 + 2 ]; - const w1 = src1[ srcOffset1 + 3 ]; - - dst[ dstOffset ] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1; - dst[ dstOffset + 1 ] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1; - dst[ dstOffset + 2 ] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1; - dst[ dstOffset + 3 ] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1; - - return dst; - - } - - get x() { - - return this._x; - - } - - set x( value ) { - - this._x = value; - this._onChangeCallback(); - - } - - get y() { - - return this._y; - - } - - set y( value ) { - - this._y = value; - this._onChangeCallback(); - - } - - get z() { - - return this._z; - - } - - set z( value ) { - - this._z = value; - this._onChangeCallback(); - - } - - get w() { - - return this._w; - - } - - set w( value ) { - - this._w = value; - this._onChangeCallback(); - - } - - set( x, y, z, w ) { - - this._x = x; - this._y = y; - this._z = z; - this._w = w; - - this._onChangeCallback(); - - return this; - - } - - clone() { - - return new this.constructor( this._x, this._y, this._z, this._w ); - - } - - copy( quaternion ) { - - this._x = quaternion.x; - this._y = quaternion.y; - this._z = quaternion.z; - this._w = quaternion.w; - - this._onChangeCallback(); - - return this; - - } - - setFromEuler( euler, update ) { - - if ( ! ( euler && euler.isEuler ) ) { - - throw new Error( 'THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.' ); - - } - - const x = euler._x, y = euler._y, z = euler._z, order = euler._order; - - // http://www.mathworks.com/matlabcentral/fileexchange/ - // 20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/ - // content/SpinCalc.m - - const cos = Math.cos; - const sin = Math.sin; - - const c1 = cos( x / 2 ); - const c2 = cos( y / 2 ); - const c3 = cos( z / 2 ); - - const s1 = sin( x / 2 ); - const s2 = sin( y / 2 ); - const s3 = sin( z / 2 ); - - switch ( order ) { - - case 'XYZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'YXZ': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'ZXY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'ZYX': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - case 'YZX': - this._x = s1 * c2 * c3 + c1 * s2 * s3; - this._y = c1 * s2 * c3 + s1 * c2 * s3; - this._z = c1 * c2 * s3 - s1 * s2 * c3; - this._w = c1 * c2 * c3 - s1 * s2 * s3; - break; - - case 'XZY': - this._x = s1 * c2 * c3 - c1 * s2 * s3; - this._y = c1 * s2 * c3 - s1 * c2 * s3; - this._z = c1 * c2 * s3 + s1 * s2 * c3; - this._w = c1 * c2 * c3 + s1 * s2 * s3; - break; - - default: - console.warn( 'THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order ); - - } - - if ( update !== false ) this._onChangeCallback(); - - return this; - - } - - setFromAxisAngle( axis, angle ) { - - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm - - // assumes axis is normalized - - const halfAngle = angle / 2, s = Math.sin( halfAngle ); - - this._x = axis.x * s; - this._y = axis.y * s; - this._z = axis.z * s; - this._w = Math.cos( halfAngle ); - - this._onChangeCallback(); - - return this; - - } - - setFromRotationMatrix( m ) { - - // http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm - - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - - const te = m.elements, - - m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ], - m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ], - m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ], - - trace = m11 + m22 + m33; - - if ( trace > 0 ) { - - const s = 0.5 / Math.sqrt( trace + 1.0 ); - - this._w = 0.25 / s; - this._x = ( m32 - m23 ) * s; - this._y = ( m13 - m31 ) * s; - this._z = ( m21 - m12 ) * s; - - } else if ( m11 > m22 && m11 > m33 ) { - - const s = 2.0 * Math.sqrt( 1.0 + m11 - m22 - m33 ); - - this._w = ( m32 - m23 ) / s; - this._x = 0.25 * s; - this._y = ( m12 + m21 ) / s; - this._z = ( m13 + m31 ) / s; - - } else if ( m22 > m33 ) { - - const s = 2.0 * Math.sqrt( 1.0 + m22 - m11 - m33 ); - - this._w = ( m13 - m31 ) / s; - this._x = ( m12 + m21 ) / s; - this._y = 0.25 * s; - this._z = ( m23 + m32 ) / s; - - } else { - - const s = 2.0 * Math.sqrt( 1.0 + m33 - m11 - m22 ); - - this._w = ( m21 - m12 ) / s; - this._x = ( m13 + m31 ) / s; - this._y = ( m23 + m32 ) / s; - this._z = 0.25 * s; - - } - - this._onChangeCallback(); - - return this; - - } - - setFromUnitVectors( vFrom, vTo ) { - - // assumes direction vectors vFrom and vTo are normalized - - let r = vFrom.dot( vTo ) + 1; - - if ( r < Number.EPSILON ) { - - // vFrom and vTo point in opposite directions - - r = 0; - - if ( Math.abs( vFrom.x ) > Math.abs( vFrom.z ) ) { - - this._x = - vFrom.y; - this._y = vFrom.x; - this._z = 0; - this._w = r; - - } else { - - this._x = 0; - this._y = - vFrom.z; - this._z = vFrom.y; - this._w = r; - - } - - } else { - - // crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3 - - this._x = vFrom.y * vTo.z - vFrom.z * vTo.y; - this._y = vFrom.z * vTo.x - vFrom.x * vTo.z; - this._z = vFrom.x * vTo.y - vFrom.y * vTo.x; - this._w = r; - - } - - return this.normalize(); - - } - - angleTo( q ) { - - return 2 * Math.acos( Math.abs( clamp( this.dot( q ), - 1, 1 ) ) ); - - } - - rotateTowards( q, step ) { - - const angle = this.angleTo( q ); - - if ( angle === 0 ) return this; - - const t = Math.min( 1, step / angle ); - - this.slerp( q, t ); - - return this; - - } - - identity() { - - return this.set( 0, 0, 0, 1 ); - - } - - invert() { - - // quaternion is assumed to have unit length - - return this.conjugate(); - - } - - conjugate() { - - this._x *= - 1; - this._y *= - 1; - this._z *= - 1; - - this._onChangeCallback(); - - return this; - - } - - dot( v ) { - - return this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w; - - } - - lengthSq() { - - return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; - - } - - length() { - - return Math.sqrt( this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w ); - - } - - normalize() { - - let l = this.length(); - - if ( l === 0 ) { - - this._x = 0; - this._y = 0; - this._z = 0; - this._w = 1; - - } else { - - l = 1 / l; - - this._x = this._x * l; - this._y = this._y * l; - this._z = this._z * l; - this._w = this._w * l; - - } - - this._onChangeCallback(); - - return this; - - } - - multiply( q, p ) { - - if ( p !== undefined ) { - - console.warn( 'THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.' ); - return this.multiplyQuaternions( q, p ); - - } - - return this.multiplyQuaternions( this, q ); - - } - - premultiply( q ) { - - return this.multiplyQuaternions( q, this ); - - } - - multiplyQuaternions( a, b ) { - - // from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm - - const qax = a._x, qay = a._y, qaz = a._z, qaw = a._w; - const qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w; - - this._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby; - this._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz; - this._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx; - this._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz; - - this._onChangeCallback(); - - return this; - - } - - slerp( qb, t ) { - - if ( t === 0 ) return this; - if ( t === 1 ) return this.copy( qb ); - - const x = this._x, y = this._y, z = this._z, w = this._w; - - // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/ - - let cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z; - - if ( cosHalfTheta < 0 ) { - - this._w = - qb._w; - this._x = - qb._x; - this._y = - qb._y; - this._z = - qb._z; - - cosHalfTheta = - cosHalfTheta; - - } else { - - this.copy( qb ); - - } - - if ( cosHalfTheta >= 1.0 ) { - - this._w = w; - this._x = x; - this._y = y; - this._z = z; - - return this; - - } - - const sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta; - - if ( sqrSinHalfTheta <= Number.EPSILON ) { - - const s = 1 - t; - this._w = s * w + t * this._w; - this._x = s * x + t * this._x; - this._y = s * y + t * this._y; - this._z = s * z + t * this._z; - - this.normalize(); - this._onChangeCallback(); - - return this; - - } - - const sinHalfTheta = Math.sqrt( sqrSinHalfTheta ); - const halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta ); - const ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta, - ratioB = Math.sin( t * halfTheta ) / sinHalfTheta; - - this._w = ( w * ratioA + this._w * ratioB ); - this._x = ( x * ratioA + this._x * ratioB ); - this._y = ( y * ratioA + this._y * ratioB ); - this._z = ( z * ratioA + this._z * ratioB ); - - this._onChangeCallback(); - - return this; - - } - - slerpQuaternions( qa, qb, t ) { - - this.copy( qa ).slerp( qb, t ); - - } - - equals( quaternion ) { - - return ( quaternion._x === this._x ) && ( quaternion._y === this._y ) && ( quaternion._z === this._z ) && ( quaternion._w === this._w ); - - } - - fromArray( array, offset = 0 ) { - - this._x = array[ offset ]; - this._y = array[ offset + 1 ]; - this._z = array[ offset + 2 ]; - this._w = array[ offset + 3 ]; - - this._onChangeCallback(); - - return this; - - } - - toArray( array = [], offset = 0 ) { - - array[ offset ] = this._x; - array[ offset + 1 ] = this._y; - array[ offset + 2 ] = this._z; - array[ offset + 3 ] = this._w; - - return array; - - } - - fromBufferAttribute( attribute, index ) { - - this._x = attribute.getX( index ); - this._y = attribute.getY( index ); - this._z = attribute.getZ( index ); - this._w = attribute.getW( index ); - - return this; - - } - - _onChange( callback ) { - - this._onChangeCallback = callback; - - return this; - - } - - _onChangeCallback() {} - -} - -Quaternion.prototype.isQuaternion = true; - -class Vector3 { - - constructor( x = 0, y = 0, z = 0 ) { - - this.x = x; - this.y = y; - this.z = z; - - } - - set( x, y, z ) { - - if ( z === undefined ) z = this.z; // sprite.scale.set(x,y) - - this.x = x; - this.y = y; - this.z = z; - - return this; - - } - - setScalar( scalar ) { - - this.x = scalar; - this.y = scalar; - this.z = scalar; - - return this; - - } - - setX( x ) { - - this.x = x; - - return this; - - } - - setY( y ) { - - this.y = y; - - return this; - - } - - setZ( z ) { - - this.z = z; - - return this; - - } - - setComponent( index, value ) { - - switch ( index ) { - - case 0: this.x = value; break; - case 1: this.y = value; break; - case 2: this.z = value; break; - default: throw new Error( 'index is out of range: ' + index ); - - } - - return this; - - } - - getComponent( index ) { - - switch ( index ) { - - case 0: return this.x; - case 1: return this.y; - case 2: return this.z; - default: throw new Error( 'index is out of range: ' + index ); - - } - - } - - clone() { - - return new this.constructor( this.x, this.y, this.z ); - - } - - copy( v ) { - - this.x = v.x; - this.y = v.y; - this.z = v.z; - - return this; - - } - - add( v, w ) { - - if ( w !== undefined ) { - - console.warn( 'THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' ); - return this.addVectors( v, w ); - - } - - this.x += v.x; - this.y += v.y; - this.z += v.z; - - return this; - - } - - addScalar( s ) { - - this.x += s; - this.y += s; - this.z += s; - - return this; - - } - - addVectors( a, b ) { - - this.x = a.x + b.x; - this.y = a.y + b.y; - this.z = a.z + b.z; - - return this; - - } - - addScaledVector( v, s ) { - - this.x += v.x * s; - this.y += v.y * s; - this.z += v.z * s; - - return this; - - } - - sub( v, w ) { - - if ( w !== undefined ) { - - console.warn( 'THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' ); - return this.subVectors( v, w ); - - } - - this.x -= v.x; - this.y -= v.y; - this.z -= v.z; - - return this; - - } - - subScalar( s ) { - - this.x -= s; - this.y -= s; - this.z -= s; - - return this; - - } - - subVectors( a, b ) { - - this.x = a.x - b.x; - this.y = a.y - b.y; - this.z = a.z - b.z; - - return this; - - } - - multiply( v, w ) { - - if ( w !== undefined ) { - - console.warn( 'THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.' ); - return this.multiplyVectors( v, w ); - - } - - this.x *= v.x; - this.y *= v.y; - this.z *= v.z; - - return this; - - } - - multiplyScalar( scalar ) { - - this.x *= scalar; - this.y *= scalar; - this.z *= scalar; - - return this; - - } - - multiplyVectors( a, b ) { - - this.x = a.x * b.x; - this.y = a.y * b.y; - this.z = a.z * b.z; - - return this; - - } - - applyEuler( euler ) { - - if ( ! ( euler && euler.isEuler ) ) { - - console.error( 'THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.' ); - - } - - return this.applyQuaternion( _quaternion$4.setFromEuler( euler ) ); - - } - - applyAxisAngle( axis, angle ) { - - return this.applyQuaternion( _quaternion$4.setFromAxisAngle( axis, angle ) ); - - } - - applyMatrix3( m ) { - - const x = this.x, y = this.y, z = this.z; - const e = m.elements; - - this.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z; - this.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z; - this.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z; - - return this; - - } - - applyNormalMatrix( m ) { - - return this.applyMatrix3( m ).normalize(); - - } - - applyMatrix4( m ) { - - const x = this.x, y = this.y, z = this.z; - const e = m.elements; - - const w = 1 / ( e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] ); - - this.x = ( e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] ) * w; - this.y = ( e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] ) * w; - this.z = ( e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] ) * w; - - return this; - - } - - applyQuaternion( q ) { - - const x = this.x, y = this.y, z = this.z; - const qx = q.x, qy = q.y, qz = q.z, qw = q.w; - - // calculate quat * vector - - const ix = qw * x + qy * z - qz * y; - const iy = qw * y + qz * x - qx * z; - const iz = qw * z + qx * y - qy * x; - const iw = - qx * x - qy * y - qz * z; - - // calculate result * inverse quat - - this.x = ix * qw + iw * - qx + iy * - qz - iz * - qy; - this.y = iy * qw + iw * - qy + iz * - qx - ix * - qz; - this.z = iz * qw + iw * - qz + ix * - qy - iy * - qx; - - return this; - - } - - project( camera ) { - - return this.applyMatrix4( camera.matrixWorldInverse ).applyMatrix4( camera.projectionMatrix ); - - } - - unproject( camera ) { - - return this.applyMatrix4( camera.projectionMatrixInverse ).applyMatrix4( camera.matrixWorld ); - - } - - transformDirection( m ) { - - // input: THREE.Matrix4 affine matrix - // vector interpreted as a direction - - const x = this.x, y = this.y, z = this.z; - const e = m.elements; - - this.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z; - this.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z; - this.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z; - - return this.normalize(); - - } - - divide( v ) { - - this.x /= v.x; - this.y /= v.y; - this.z /= v.z; - - return this; - - } - - divideScalar( scalar ) { - - return this.multiplyScalar( 1 / scalar ); - - } - - min( v ) { - - this.x = Math.min( this.x, v.x ); - this.y = Math.min( this.y, v.y ); - this.z = Math.min( this.z, v.z ); - - return this; - - } - - max( v ) { - - this.x = Math.max( this.x, v.x ); - this.y = Math.max( this.y, v.y ); - this.z = Math.max( this.z, v.z ); - - return this; - - } - - clamp( min, max ) { - - // assumes min < max, componentwise - - this.x = Math.max( min.x, Math.min( max.x, this.x ) ); - this.y = Math.max( min.y, Math.min( max.y, this.y ) ); - this.z = Math.max( min.z, Math.min( max.z, this.z ) ); - - return this; - - } - - clampScalar( minVal, maxVal ) { - - this.x = Math.max( minVal, Math.min( maxVal, this.x ) ); - this.y = Math.max( minVal, Math.min( maxVal, this.y ) ); - this.z = Math.max( minVal, Math.min( maxVal, this.z ) ); - - return this; - - } - - clampLength( min, max ) { - - const length = this.length(); - - return this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) ); - - } - - floor() { - - this.x = Math.floor( this.x ); - this.y = Math.floor( this.y ); - this.z = Math.floor( this.z ); - - return this; - - } - - ceil() { - - this.x = Math.ceil( this.x ); - this.y = Math.ceil( this.y ); - this.z = Math.ceil( this.z ); - - return this; - - } - - round() { - - this.x = Math.round( this.x ); - this.y = Math.round( this.y ); - this.z = Math.round( this.z ); - - return this; - - } - - roundToZero() { - - this.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x ); - this.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y ); - this.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z ); - - return this; - - } - - negate() { - - this.x = - this.x; - this.y = - this.y; - this.z = - this.z; - - return this; - - } - - dot( v ) { - - return this.x * v.x + this.y * v.y + this.z * v.z; - - } - - // TODO lengthSquared? - - lengthSq() { - - return this.x * this.x + this.y * this.y + this.z * this.z; - - } - - length() { - - return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z ); - - } - - manhattanLength() { - - return Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ); - - } - - normalize() { - - return this.divideScalar( this.length() || 1 ); - - } - - setLength( length ) { - - return this.normalize().multiplyScalar( length ); - - } - - lerp( v, alpha ) { - - this.x += ( v.x - this.x ) * alpha; - this.y += ( v.y - this.y ) * alpha; - this.z += ( v.z - this.z ) * alpha; - - return this; - - } - - lerpVectors( v1, v2, alpha ) { - - this.x = v1.x + ( v2.x - v1.x ) * alpha; - this.y = v1.y + ( v2.y - v1.y ) * alpha; - this.z = v1.z + ( v2.z - v1.z ) * alpha; - - return this; - - } - - cross( v, w ) { - - if ( w !== undefined ) { - - console.warn( 'THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.' ); - return this.crossVectors( v, w ); - - } - - return this.crossVectors( this, v ); - - } - - crossVectors( a, b ) { - - const ax = a.x, ay = a.y, az = a.z; - const bx = b.x, by = b.y, bz = b.z; - - this.x = ay * bz - az * by; - this.y = az * bx - ax * bz; - this.z = ax * by - ay * bx; - - return this; - - } - - projectOnVector( v ) { - - const denominator = v.lengthSq(); - - if ( denominator === 0 ) return this.set( 0, 0, 0 ); - - const scalar = v.dot( this ) / denominator; - - return this.copy( v ).multiplyScalar( scalar ); - - } - - projectOnPlane( planeNormal ) { - - _vector$c.copy( this ).projectOnVector( planeNormal ); - - return this.sub( _vector$c ); - - } - - reflect( normal ) { - - // reflect incident vector off plane orthogonal to normal - // normal is assumed to have unit length - - return this.sub( _vector$c.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) ); - - } - - angleTo( v ) { - - const denominator = Math.sqrt( this.lengthSq() * v.lengthSq() ); - - if ( denominator === 0 ) return Math.PI / 2; - - const theta = this.dot( v ) / denominator; - - // clamp, to handle numerical problems - - return Math.acos( clamp( theta, - 1, 1 ) ); - - } - - distanceTo( v ) { - - return Math.sqrt( this.distanceToSquared( v ) ); - - } - - distanceToSquared( v ) { - - const dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z; - - return dx * dx + dy * dy + dz * dz; - - } - - manhattanDistanceTo( v ) { - - return Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z ); - - } - - setFromSpherical( s ) { - - return this.setFromSphericalCoords( s.radius, s.phi, s.theta ); - - } - - setFromSphericalCoords( radius, phi, theta ) { - - const sinPhiRadius = Math.sin( phi ) * radius; - - this.x = sinPhiRadius * Math.sin( theta ); - this.y = Math.cos( phi ) * radius; - this.z = sinPhiRadius * Math.cos( theta ); - - return this; - - } - - setFromCylindrical( c ) { - - return this.setFromCylindricalCoords( c.radius, c.theta, c.y ); - - } - - setFromCylindricalCoords( radius, theta, y ) { - - this.x = radius * Math.sin( theta ); - this.y = y; - this.z = radius * Math.cos( theta ); - - return this; - - } - - setFromMatrixPosition( m ) { - - const e = m.elements; - - this.x = e[ 12 ]; - this.y = e[ 13 ]; - this.z = e[ 14 ]; - - return this; - - } - - setFromMatrixScale( m ) { - - const sx = this.setFromMatrixColumn( m, 0 ).length(); - const sy = this.setFromMatrixColumn( m, 1 ).length(); - const sz = this.setFromMatrixColumn( m, 2 ).length(); - - this.x = sx; - this.y = sy; - this.z = sz; - - return this; - - } - - setFromMatrixColumn( m, index ) { - - return this.fromArray( m.elements, index * 4 ); - - } - - setFromMatrix3Column( m, index ) { - - return this.fromArray( m.elements, index * 3 ); - - } - - equals( v ) { - - return ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) ); - - } - - fromArray( array, offset = 0 ) { - - this.x = array[ offset ]; - this.y = array[ offset + 1 ]; - this.z = array[ offset + 2 ]; - - return this; - - } - - toArray( array = [], offset = 0 ) { - - array[ offset ] = this.x; - array[ offset + 1 ] = this.y; - array[ offset + 2 ] = this.z; - - return array; - - } - - fromBufferAttribute( attribute, index, offset ) { - - if ( offset !== undefined ) { - - console.warn( 'THREE.Vector3: offset has been removed from .fromBufferAttribute().' ); - - } - - this.x = attribute.getX( index ); - this.y = attribute.getY( index ); - this.z = attribute.getZ( index ); - - return this; - - } - - random() { - - this.x = Math.random(); - this.y = Math.random(); - this.z = Math.random(); - - return this; - - } - -} - -Vector3.prototype.isVector3 = true; - -const _vector$c = /*@__PURE__*/ new Vector3(); -const _quaternion$4 = /*@__PURE__*/ new Quaternion(); - -class Box3 { - - constructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) { - - this.min = min; - this.max = max; - - } - - set( min, max ) { - - this.min.copy( min ); - this.max.copy( max ); - - return this; - - } - - setFromArray( array ) { - - let minX = + Infinity; - let minY = + Infinity; - let minZ = + Infinity; - - let maxX = - Infinity; - let maxY = - Infinity; - let maxZ = - Infinity; - - for ( let i = 0, l = array.length; i < l; i += 3 ) { - - const x = array[ i ]; - const y = array[ i + 1 ]; - const z = array[ i + 2 ]; - - if ( x < minX ) minX = x; - if ( y < minY ) minY = y; - if ( z < minZ ) minZ = z; - - if ( x > maxX ) maxX = x; - if ( y > maxY ) maxY = y; - if ( z > maxZ ) maxZ = z; - - } - - this.min.set( minX, minY, minZ ); - this.max.set( maxX, maxY, maxZ ); - - return this; - - } - - setFromBufferAttribute( attribute ) { - - let minX = + Infinity; - let minY = + Infinity; - let minZ = + Infinity; - - let maxX = - Infinity; - let maxY = - Infinity; - let maxZ = - Infinity; - - for ( let i = 0, l = attribute.count; i < l; i ++ ) { - - const x = attribute.getX( i ); - const y = attribute.getY( i ); - const z = attribute.getZ( i ); - - if ( x < minX ) minX = x; - if ( y < minY ) minY = y; - if ( z < minZ ) minZ = z; - - if ( x > maxX ) maxX = x; - if ( y > maxY ) maxY = y; - if ( z > maxZ ) maxZ = z; - - } - - this.min.set( minX, minY, minZ ); - this.max.set( maxX, maxY, maxZ ); - - return this; - - } - - setFromPoints( points ) { - - this.makeEmpty(); - - for ( let i = 0, il = points.length; i < il; i ++ ) { - - this.expandByPoint( points[ i ] ); - - } - - return this; - - } - - setFromCenterAndSize( center, size ) { - - const halfSize = _vector$b.copy( size ).multiplyScalar( 0.5 ); - - this.min.copy( center ).sub( halfSize ); - this.max.copy( center ).add( halfSize ); - - return this; - - } - - setFromObject( object ) { - - this.makeEmpty(); - - return this.expandByObject( object ); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - copy( box ) { - - this.min.copy( box.min ); - this.max.copy( box.max ); - - return this; - - } - - makeEmpty() { - - this.min.x = this.min.y = this.min.z = + Infinity; - this.max.x = this.max.y = this.max.z = - Infinity; - - return this; - - } - - isEmpty() { - - // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes - - return ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ) || ( this.max.z < this.min.z ); - - } - - getCenter( target ) { - - return this.isEmpty() ? target.set( 0, 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 ); - - } - - getSize( target ) { - - return this.isEmpty() ? target.set( 0, 0, 0 ) : target.subVectors( this.max, this.min ); - - } - - expandByPoint( point ) { - - this.min.min( point ); - this.max.max( point ); - - return this; - - } - - expandByVector( vector ) { - - this.min.sub( vector ); - this.max.add( vector ); - - return this; - - } - - expandByScalar( scalar ) { - - this.min.addScalar( - scalar ); - this.max.addScalar( scalar ); - - return this; - - } - - expandByObject( object ) { - - // Computes the world-axis-aligned bounding box of an object (including its children), - // accounting for both the object's, and children's, world transforms - - object.updateWorldMatrix( false, false ); - - const geometry = object.geometry; - - if ( geometry !== undefined ) { - - if ( geometry.boundingBox === null ) { - - geometry.computeBoundingBox(); - - } - - _box$3.copy( geometry.boundingBox ); - _box$3.applyMatrix4( object.matrixWorld ); - - this.union( _box$3 ); - - } - - const children = object.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - this.expandByObject( children[ i ] ); - - } - - return this; - - } - - containsPoint( point ) { - - return point.x < this.min.x || point.x > this.max.x || - point.y < this.min.y || point.y > this.max.y || - point.z < this.min.z || point.z > this.max.z ? false : true; - - } - - containsBox( box ) { - - return this.min.x <= box.min.x && box.max.x <= this.max.x && - this.min.y <= box.min.y && box.max.y <= this.max.y && - this.min.z <= box.min.z && box.max.z <= this.max.z; - - } - - getParameter( point, target ) { - - // This can potentially have a divide by zero if the box - // has a size dimension of 0. - - return target.set( - ( point.x - this.min.x ) / ( this.max.x - this.min.x ), - ( point.y - this.min.y ) / ( this.max.y - this.min.y ), - ( point.z - this.min.z ) / ( this.max.z - this.min.z ) - ); - - } - - intersectsBox( box ) { - - // using 6 splitting planes to rule out intersections. - return box.max.x < this.min.x || box.min.x > this.max.x || - box.max.y < this.min.y || box.min.y > this.max.y || - box.max.z < this.min.z || box.min.z > this.max.z ? false : true; - - } - - intersectsSphere( sphere ) { - - // Find the point on the AABB closest to the sphere center. - this.clampPoint( sphere.center, _vector$b ); - - // If that point is inside the sphere, the AABB and sphere intersect. - return _vector$b.distanceToSquared( sphere.center ) <= ( sphere.radius * sphere.radius ); - - } - - intersectsPlane( plane ) { - - // We compute the minimum and maximum dot product values. If those values - // are on the same side (back or front) of the plane, then there is no intersection. - - let min, max; - - if ( plane.normal.x > 0 ) { - - min = plane.normal.x * this.min.x; - max = plane.normal.x * this.max.x; - - } else { - - min = plane.normal.x * this.max.x; - max = plane.normal.x * this.min.x; - - } - - if ( plane.normal.y > 0 ) { - - min += plane.normal.y * this.min.y; - max += plane.normal.y * this.max.y; - - } else { - - min += plane.normal.y * this.max.y; - max += plane.normal.y * this.min.y; - - } - - if ( plane.normal.z > 0 ) { - - min += plane.normal.z * this.min.z; - max += plane.normal.z * this.max.z; - - } else { - - min += plane.normal.z * this.max.z; - max += plane.normal.z * this.min.z; - - } - - return ( min <= - plane.constant && max >= - plane.constant ); - - } - - intersectsTriangle( triangle ) { - - if ( this.isEmpty() ) { - - return false; - - } - - // compute box center and extents - this.getCenter( _center ); - _extents.subVectors( this.max, _center ); - - // translate triangle to aabb origin - _v0$2.subVectors( triangle.a, _center ); - _v1$7.subVectors( triangle.b, _center ); - _v2$3.subVectors( triangle.c, _center ); - - // compute edge vectors for triangle - _f0.subVectors( _v1$7, _v0$2 ); - _f1.subVectors( _v2$3, _v1$7 ); - _f2.subVectors( _v0$2, _v2$3 ); - - // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb - // make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation - // axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned) - let axes = [ - 0, - _f0.z, _f0.y, 0, - _f1.z, _f1.y, 0, - _f2.z, _f2.y, - _f0.z, 0, - _f0.x, _f1.z, 0, - _f1.x, _f2.z, 0, - _f2.x, - - _f0.y, _f0.x, 0, - _f1.y, _f1.x, 0, - _f2.y, _f2.x, 0 - ]; - if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents ) ) { - - return false; - - } - - // test 3 face normals from the aabb - axes = [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ]; - if ( ! satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents ) ) { - - return false; - - } - - // finally testing the face normal of the triangle - // use already existing triangle edge vectors here - _triangleNormal.crossVectors( _f0, _f1 ); - axes = [ _triangleNormal.x, _triangleNormal.y, _triangleNormal.z ]; - - return satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents ); - - } - - clampPoint( point, target ) { - - return target.copy( point ).clamp( this.min, this.max ); - - } - - distanceToPoint( point ) { - - const clampedPoint = _vector$b.copy( point ).clamp( this.min, this.max ); - - return clampedPoint.sub( point ).length(); - - } - - getBoundingSphere( target ) { - - this.getCenter( target.center ); - - target.radius = this.getSize( _vector$b ).length() * 0.5; - - return target; - - } - - intersect( box ) { - - this.min.max( box.min ); - this.max.min( box.max ); - - // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values. - if ( this.isEmpty() ) this.makeEmpty(); - - return this; - - } - - union( box ) { - - this.min.min( box.min ); - this.max.max( box.max ); - - return this; - - } - - applyMatrix4( matrix ) { - - // transform of empty box is an empty box. - if ( this.isEmpty() ) return this; - - // NOTE: I am using a binary pattern to specify all 2^3 combinations below - _points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000 - _points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001 - _points[ 2 ].set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 010 - _points[ 3 ].set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 011 - _points[ 4 ].set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 100 - _points[ 5 ].set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 101 - _points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110 - _points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111 - - this.setFromPoints( _points ); - - return this; - - } - - translate( offset ) { - - this.min.add( offset ); - this.max.add( offset ); - - return this; - - } - - equals( box ) { - - return box.min.equals( this.min ) && box.max.equals( this.max ); - - } - -} - -Box3.prototype.isBox3 = true; - -const _points = [ - /*@__PURE__*/ new Vector3(), - /*@__PURE__*/ new Vector3(), - /*@__PURE__*/ new Vector3(), - /*@__PURE__*/ new Vector3(), - /*@__PURE__*/ new Vector3(), - /*@__PURE__*/ new Vector3(), - /*@__PURE__*/ new Vector3(), - /*@__PURE__*/ new Vector3() -]; - -const _vector$b = /*@__PURE__*/ new Vector3(); - -const _box$3 = /*@__PURE__*/ new Box3(); - -// triangle centered vertices - -const _v0$2 = /*@__PURE__*/ new Vector3(); -const _v1$7 = /*@__PURE__*/ new Vector3(); -const _v2$3 = /*@__PURE__*/ new Vector3(); - -// triangle edge vectors - -const _f0 = /*@__PURE__*/ new Vector3(); -const _f1 = /*@__PURE__*/ new Vector3(); -const _f2 = /*@__PURE__*/ new Vector3(); - -const _center = /*@__PURE__*/ new Vector3(); -const _extents = /*@__PURE__*/ new Vector3(); -const _triangleNormal = /*@__PURE__*/ new Vector3(); -const _testAxis = /*@__PURE__*/ new Vector3(); - -function satForAxes( axes, v0, v1, v2, extents ) { - - for ( let i = 0, j = axes.length - 3; i <= j; i += 3 ) { - - _testAxis.fromArray( axes, i ); - // project the aabb onto the seperating axis - const r = extents.x * Math.abs( _testAxis.x ) + extents.y * Math.abs( _testAxis.y ) + extents.z * Math.abs( _testAxis.z ); - // project all 3 vertices of the triangle onto the seperating axis - const p0 = v0.dot( _testAxis ); - const p1 = v1.dot( _testAxis ); - const p2 = v2.dot( _testAxis ); - // actual test, basically see if either of the most extreme of the triangle points intersects r - if ( Math.max( - Math.max( p0, p1, p2 ), Math.min( p0, p1, p2 ) ) > r ) { - - // points of the projected triangle are outside the projected half-length of the aabb - // the axis is seperating and we can exit - return false; - - } - - } - - return true; - -} - -const _box$2 = /*@__PURE__*/ new Box3(); -const _v1$6 = /*@__PURE__*/ new Vector3(); -const _toFarthestPoint = /*@__PURE__*/ new Vector3(); -const _toPoint = /*@__PURE__*/ new Vector3(); - -class Sphere { - - constructor( center = new Vector3(), radius = - 1 ) { - - this.center = center; - this.radius = radius; - - } - - set( center, radius ) { - - this.center.copy( center ); - this.radius = radius; - - return this; - - } - - setFromPoints( points, optionalCenter ) { - - const center = this.center; - - if ( optionalCenter !== undefined ) { - - center.copy( optionalCenter ); - - } else { - - _box$2.setFromPoints( points ).getCenter( center ); - - } - - let maxRadiusSq = 0; - - for ( let i = 0, il = points.length; i < il; i ++ ) { - - maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) ); - - } - - this.radius = Math.sqrt( maxRadiusSq ); - - return this; - - } - - copy( sphere ) { - - this.center.copy( sphere.center ); - this.radius = sphere.radius; - - return this; - - } - - isEmpty() { - - return ( this.radius < 0 ); - - } - - makeEmpty() { - - this.center.set( 0, 0, 0 ); - this.radius = - 1; - - return this; - - } - - containsPoint( point ) { - - return ( point.distanceToSquared( this.center ) <= ( this.radius * this.radius ) ); - - } - - distanceToPoint( point ) { - - return ( point.distanceTo( this.center ) - this.radius ); - - } - - intersectsSphere( sphere ) { - - const radiusSum = this.radius + sphere.radius; - - return sphere.center.distanceToSquared( this.center ) <= ( radiusSum * radiusSum ); - - } - - intersectsBox( box ) { - - return box.intersectsSphere( this ); - - } - - intersectsPlane( plane ) { - - return Math.abs( plane.distanceToPoint( this.center ) ) <= this.radius; - - } - - clampPoint( point, target ) { - - const deltaLengthSq = this.center.distanceToSquared( point ); - - target.copy( point ); - - if ( deltaLengthSq > ( this.radius * this.radius ) ) { - - target.sub( this.center ).normalize(); - target.multiplyScalar( this.radius ).add( this.center ); - - } - - return target; - - } - - getBoundingBox( target ) { - - if ( this.isEmpty() ) { - - // Empty sphere produces empty bounding box - target.makeEmpty(); - return target; - - } - - target.set( this.center, this.center ); - target.expandByScalar( this.radius ); - - return target; - - } - - applyMatrix4( matrix ) { - - this.center.applyMatrix4( matrix ); - this.radius = this.radius * matrix.getMaxScaleOnAxis(); - - return this; - - } - - translate( offset ) { - - this.center.add( offset ); - - return this; - - } - - expandByPoint( point ) { - - // from https://github.com/juj/MathGeoLib/blob/2940b99b99cfe575dd45103ef20f4019dee15b54/src/Geometry/Sphere.cpp#L649-L671 - - _toPoint.subVectors( point, this.center ); - - const lengthSq = _toPoint.lengthSq(); - - if ( lengthSq > ( this.radius * this.radius ) ) { - - const length = Math.sqrt( lengthSq ); - const missingRadiusHalf = ( length - this.radius ) * 0.5; - - // Nudge this sphere towards the target point. Add half the missing distance to radius, - // and the other half to position. This gives a tighter enclosure, instead of if - // the whole missing distance were just added to radius. - - this.center.add( _toPoint.multiplyScalar( missingRadiusHalf / length ) ); - this.radius += missingRadiusHalf; - - } - - return this; - - } - - union( sphere ) { - - // from https://github.com/juj/MathGeoLib/blob/2940b99b99cfe575dd45103ef20f4019dee15b54/src/Geometry/Sphere.cpp#L759-L769 - - // To enclose another sphere into this sphere, we only need to enclose two points: - // 1) Enclose the farthest point on the other sphere into this sphere. - // 2) Enclose the opposite point of the farthest point into this sphere. - - _toFarthestPoint.subVectors( sphere.center, this.center ).normalize().multiplyScalar( sphere.radius ); - - this.expandByPoint( _v1$6.copy( sphere.center ).add( _toFarthestPoint ) ); - this.expandByPoint( _v1$6.copy( sphere.center ).sub( _toFarthestPoint ) ); - - return this; - - } - - equals( sphere ) { - - return sphere.center.equals( this.center ) && ( sphere.radius === this.radius ); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - -} - -const _vector$a = /*@__PURE__*/ new Vector3(); -const _segCenter = /*@__PURE__*/ new Vector3(); -const _segDir = /*@__PURE__*/ new Vector3(); -const _diff = /*@__PURE__*/ new Vector3(); - -const _edge1 = /*@__PURE__*/ new Vector3(); -const _edge2 = /*@__PURE__*/ new Vector3(); -const _normal$1 = /*@__PURE__*/ new Vector3(); - -class Ray { - - constructor( origin = new Vector3(), direction = new Vector3( 0, 0, - 1 ) ) { - - this.origin = origin; - this.direction = direction; - - } - - set( origin, direction ) { - - this.origin.copy( origin ); - this.direction.copy( direction ); - - return this; - - } - - copy( ray ) { - - this.origin.copy( ray.origin ); - this.direction.copy( ray.direction ); - - return this; - - } - - at( t, target ) { - - return target.copy( this.direction ).multiplyScalar( t ).add( this.origin ); - - } - - lookAt( v ) { - - this.direction.copy( v ).sub( this.origin ).normalize(); - - return this; - - } - - recast( t ) { - - this.origin.copy( this.at( t, _vector$a ) ); - - return this; - - } - - closestPointToPoint( point, target ) { - - target.subVectors( point, this.origin ); - - const directionDistance = target.dot( this.direction ); - - if ( directionDistance < 0 ) { - - return target.copy( this.origin ); - - } - - return target.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin ); - - } - - distanceToPoint( point ) { - - return Math.sqrt( this.distanceSqToPoint( point ) ); - - } - - distanceSqToPoint( point ) { - - const directionDistance = _vector$a.subVectors( point, this.origin ).dot( this.direction ); - - // point behind the ray - - if ( directionDistance < 0 ) { - - return this.origin.distanceToSquared( point ); - - } - - _vector$a.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin ); - - return _vector$a.distanceToSquared( point ); - - } - - distanceSqToSegment( v0, v1, optionalPointOnRay, optionalPointOnSegment ) { - - // from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteDistRaySegment.h - // It returns the min distance between the ray and the segment - // defined by v0 and v1 - // It can also set two optional targets : - // - The closest point on the ray - // - The closest point on the segment - - _segCenter.copy( v0 ).add( v1 ).multiplyScalar( 0.5 ); - _segDir.copy( v1 ).sub( v0 ).normalize(); - _diff.copy( this.origin ).sub( _segCenter ); - - const segExtent = v0.distanceTo( v1 ) * 0.5; - const a01 = - this.direction.dot( _segDir ); - const b0 = _diff.dot( this.direction ); - const b1 = - _diff.dot( _segDir ); - const c = _diff.lengthSq(); - const det = Math.abs( 1 - a01 * a01 ); - let s0, s1, sqrDist, extDet; - - if ( det > 0 ) { - - // The ray and segment are not parallel. - - s0 = a01 * b1 - b0; - s1 = a01 * b0 - b1; - extDet = segExtent * det; - - if ( s0 >= 0 ) { - - if ( s1 >= - extDet ) { - - if ( s1 <= extDet ) { - - // region 0 - // Minimum at interior points of ray and segment. - - const invDet = 1 / det; - s0 *= invDet; - s1 *= invDet; - sqrDist = s0 * ( s0 + a01 * s1 + 2 * b0 ) + s1 * ( a01 * s0 + s1 + 2 * b1 ) + c; - - } else { - - // region 1 - - s1 = segExtent; - s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); - sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; - - } - - } else { - - // region 5 - - s1 = - segExtent; - s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); - sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; - - } - - } else { - - if ( s1 <= - extDet ) { - - // region 4 - - s0 = Math.max( 0, - ( - a01 * segExtent + b0 ) ); - s1 = ( s0 > 0 ) ? - segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent ); - sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; - - } else if ( s1 <= extDet ) { - - // region 3 - - s0 = 0; - s1 = Math.min( Math.max( - segExtent, - b1 ), segExtent ); - sqrDist = s1 * ( s1 + 2 * b1 ) + c; - - } else { - - // region 2 - - s0 = Math.max( 0, - ( a01 * segExtent + b0 ) ); - s1 = ( s0 > 0 ) ? segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent ); - sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; - - } - - } - - } else { - - // Ray and segment are parallel. - - s1 = ( a01 > 0 ) ? - segExtent : segExtent; - s0 = Math.max( 0, - ( a01 * s1 + b0 ) ); - sqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c; - - } - - if ( optionalPointOnRay ) { - - optionalPointOnRay.copy( this.direction ).multiplyScalar( s0 ).add( this.origin ); - - } - - if ( optionalPointOnSegment ) { - - optionalPointOnSegment.copy( _segDir ).multiplyScalar( s1 ).add( _segCenter ); - - } - - return sqrDist; - - } - - intersectSphere( sphere, target ) { - - _vector$a.subVectors( sphere.center, this.origin ); - const tca = _vector$a.dot( this.direction ); - const d2 = _vector$a.dot( _vector$a ) - tca * tca; - const radius2 = sphere.radius * sphere.radius; - - if ( d2 > radius2 ) return null; - - const thc = Math.sqrt( radius2 - d2 ); - - // t0 = first intersect point - entrance on front of sphere - const t0 = tca - thc; - - // t1 = second intersect point - exit point on back of sphere - const t1 = tca + thc; - - // test to see if both t0 and t1 are behind the ray - if so, return null - if ( t0 < 0 && t1 < 0 ) return null; - - // test to see if t0 is behind the ray: - // if it is, the ray is inside the sphere, so return the second exit point scaled by t1, - // in order to always return an intersect point that is in front of the ray. - if ( t0 < 0 ) return this.at( t1, target ); - - // else t0 is in front of the ray, so return the first collision point scaled by t0 - return this.at( t0, target ); - - } - - intersectsSphere( sphere ) { - - return this.distanceSqToPoint( sphere.center ) <= ( sphere.radius * sphere.radius ); - - } - - distanceToPlane( plane ) { - - const denominator = plane.normal.dot( this.direction ); - - if ( denominator === 0 ) { - - // line is coplanar, return origin - if ( plane.distanceToPoint( this.origin ) === 0 ) { - - return 0; - - } - - // Null is preferable to undefined since undefined means.... it is undefined - - return null; - - } - - const t = - ( this.origin.dot( plane.normal ) + plane.constant ) / denominator; - - // Return if the ray never intersects the plane - - return t >= 0 ? t : null; - - } - - intersectPlane( plane, target ) { - - const t = this.distanceToPlane( plane ); - - if ( t === null ) { - - return null; - - } - - return this.at( t, target ); - - } - - intersectsPlane( plane ) { - - // check if the ray lies on the plane first - - const distToPoint = plane.distanceToPoint( this.origin ); - - if ( distToPoint === 0 ) { - - return true; - - } - - const denominator = plane.normal.dot( this.direction ); - - if ( denominator * distToPoint < 0 ) { - - return true; - - } - - // ray origin is behind the plane (and is pointing behind it) - - return false; - - } - - intersectBox( box, target ) { - - let tmin, tmax, tymin, tymax, tzmin, tzmax; - - const invdirx = 1 / this.direction.x, - invdiry = 1 / this.direction.y, - invdirz = 1 / this.direction.z; - - const origin = this.origin; - - if ( invdirx >= 0 ) { - - tmin = ( box.min.x - origin.x ) * invdirx; - tmax = ( box.max.x - origin.x ) * invdirx; - - } else { - - tmin = ( box.max.x - origin.x ) * invdirx; - tmax = ( box.min.x - origin.x ) * invdirx; - - } - - if ( invdiry >= 0 ) { - - tymin = ( box.min.y - origin.y ) * invdiry; - tymax = ( box.max.y - origin.y ) * invdiry; - - } else { - - tymin = ( box.max.y - origin.y ) * invdiry; - tymax = ( box.min.y - origin.y ) * invdiry; - - } - - if ( ( tmin > tymax ) || ( tymin > tmax ) ) return null; - - // These lines also handle the case where tmin or tmax is NaN - // (result of 0 * Infinity). x !== x returns true if x is NaN - - if ( tymin > tmin || tmin !== tmin ) tmin = tymin; - - if ( tymax < tmax || tmax !== tmax ) tmax = tymax; - - if ( invdirz >= 0 ) { - - tzmin = ( box.min.z - origin.z ) * invdirz; - tzmax = ( box.max.z - origin.z ) * invdirz; - - } else { - - tzmin = ( box.max.z - origin.z ) * invdirz; - tzmax = ( box.min.z - origin.z ) * invdirz; - - } - - if ( ( tmin > tzmax ) || ( tzmin > tmax ) ) return null; - - if ( tzmin > tmin || tmin !== tmin ) tmin = tzmin; - - if ( tzmax < tmax || tmax !== tmax ) tmax = tzmax; - - //return point closest to the ray (positive side) - - if ( tmax < 0 ) return null; - - return this.at( tmin >= 0 ? tmin : tmax, target ); - - } - - intersectsBox( box ) { - - return this.intersectBox( box, _vector$a ) !== null; - - } - - intersectTriangle( a, b, c, backfaceCulling, target ) { - - // Compute the offset origin, edges, and normal. - - // from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h - - _edge1.subVectors( b, a ); - _edge2.subVectors( c, a ); - _normal$1.crossVectors( _edge1, _edge2 ); - - // Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction, - // E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by - // |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2)) - // |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q)) - // |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N) - let DdN = this.direction.dot( _normal$1 ); - let sign; - - if ( DdN > 0 ) { - - if ( backfaceCulling ) return null; - sign = 1; - - } else if ( DdN < 0 ) { - - sign = - 1; - DdN = - DdN; - - } else { - - return null; - - } - - _diff.subVectors( this.origin, a ); - const DdQxE2 = sign * this.direction.dot( _edge2.crossVectors( _diff, _edge2 ) ); - - // b1 < 0, no intersection - if ( DdQxE2 < 0 ) { - - return null; - - } - - const DdE1xQ = sign * this.direction.dot( _edge1.cross( _diff ) ); - - // b2 < 0, no intersection - if ( DdE1xQ < 0 ) { - - return null; - - } - - // b1+b2 > 1, no intersection - if ( DdQxE2 + DdE1xQ > DdN ) { - - return null; - - } - - // Line intersects triangle, check if ray does. - const QdN = - sign * _diff.dot( _normal$1 ); - - // t < 0, no intersection - if ( QdN < 0 ) { - - return null; - - } - - // Ray intersects triangle. - return this.at( QdN / DdN, target ); - - } - - applyMatrix4( matrix4 ) { - - this.origin.applyMatrix4( matrix4 ); - this.direction.transformDirection( matrix4 ); - - return this; - - } - - equals( ray ) { - - return ray.origin.equals( this.origin ) && ray.direction.equals( this.direction ); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - -} - -class Matrix4 { - - constructor() { - - this.elements = [ - - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1 - - ]; - - if ( arguments.length > 0 ) { - - console.error( 'THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.' ); - - } - - } - - set( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) { - - const te = this.elements; - - te[ 0 ] = n11; te[ 4 ] = n12; te[ 8 ] = n13; te[ 12 ] = n14; - te[ 1 ] = n21; te[ 5 ] = n22; te[ 9 ] = n23; te[ 13 ] = n24; - te[ 2 ] = n31; te[ 6 ] = n32; te[ 10 ] = n33; te[ 14 ] = n34; - te[ 3 ] = n41; te[ 7 ] = n42; te[ 11 ] = n43; te[ 15 ] = n44; - - return this; - - } - - identity() { - - this.set( - - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1 - - ); - - return this; - - } - - clone() { - - return new Matrix4().fromArray( this.elements ); - - } - - copy( m ) { - - const te = this.elements; - const me = m.elements; - - te[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; te[ 3 ] = me[ 3 ]; - te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; - te[ 8 ] = me[ 8 ]; te[ 9 ] = me[ 9 ]; te[ 10 ] = me[ 10 ]; te[ 11 ] = me[ 11 ]; - te[ 12 ] = me[ 12 ]; te[ 13 ] = me[ 13 ]; te[ 14 ] = me[ 14 ]; te[ 15 ] = me[ 15 ]; - - return this; - - } - - copyPosition( m ) { - - const te = this.elements, me = m.elements; - - te[ 12 ] = me[ 12 ]; - te[ 13 ] = me[ 13 ]; - te[ 14 ] = me[ 14 ]; - - return this; - - } - - setFromMatrix3( m ) { - - const me = m.elements; - - this.set( - - me[ 0 ], me[ 3 ], me[ 6 ], 0, - me[ 1 ], me[ 4 ], me[ 7 ], 0, - me[ 2 ], me[ 5 ], me[ 8 ], 0, - 0, 0, 0, 1 - - ); - - return this; - - } - - extractBasis( xAxis, yAxis, zAxis ) { - - xAxis.setFromMatrixColumn( this, 0 ); - yAxis.setFromMatrixColumn( this, 1 ); - zAxis.setFromMatrixColumn( this, 2 ); - - return this; - - } - - makeBasis( xAxis, yAxis, zAxis ) { - - this.set( - xAxis.x, yAxis.x, zAxis.x, 0, - xAxis.y, yAxis.y, zAxis.y, 0, - xAxis.z, yAxis.z, zAxis.z, 0, - 0, 0, 0, 1 - ); - - return this; - - } - - extractRotation( m ) { - - // this method does not support reflection matrices - - const te = this.elements; - const me = m.elements; - - const scaleX = 1 / _v1$5.setFromMatrixColumn( m, 0 ).length(); - const scaleY = 1 / _v1$5.setFromMatrixColumn( m, 1 ).length(); - const scaleZ = 1 / _v1$5.setFromMatrixColumn( m, 2 ).length(); - - te[ 0 ] = me[ 0 ] * scaleX; - te[ 1 ] = me[ 1 ] * scaleX; - te[ 2 ] = me[ 2 ] * scaleX; - te[ 3 ] = 0; - - te[ 4 ] = me[ 4 ] * scaleY; - te[ 5 ] = me[ 5 ] * scaleY; - te[ 6 ] = me[ 6 ] * scaleY; - te[ 7 ] = 0; - - te[ 8 ] = me[ 8 ] * scaleZ; - te[ 9 ] = me[ 9 ] * scaleZ; - te[ 10 ] = me[ 10 ] * scaleZ; - te[ 11 ] = 0; - - te[ 12 ] = 0; - te[ 13 ] = 0; - te[ 14 ] = 0; - te[ 15 ] = 1; - - return this; - - } - - makeRotationFromEuler( euler ) { - - if ( ! ( euler && euler.isEuler ) ) { - - console.error( 'THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.' ); - - } - - const te = this.elements; - - const x = euler.x, y = euler.y, z = euler.z; - const a = Math.cos( x ), b = Math.sin( x ); - const c = Math.cos( y ), d = Math.sin( y ); - const e = Math.cos( z ), f = Math.sin( z ); - - if ( euler.order === 'XYZ' ) { - - const ae = a * e, af = a * f, be = b * e, bf = b * f; - - te[ 0 ] = c * e; - te[ 4 ] = - c * f; - te[ 8 ] = d; - - te[ 1 ] = af + be * d; - te[ 5 ] = ae - bf * d; - te[ 9 ] = - b * c; - - te[ 2 ] = bf - ae * d; - te[ 6 ] = be + af * d; - te[ 10 ] = a * c; - - } else if ( euler.order === 'YXZ' ) { - - const ce = c * e, cf = c * f, de = d * e, df = d * f; - - te[ 0 ] = ce + df * b; - te[ 4 ] = de * b - cf; - te[ 8 ] = a * d; - - te[ 1 ] = a * f; - te[ 5 ] = a * e; - te[ 9 ] = - b; - - te[ 2 ] = cf * b - de; - te[ 6 ] = df + ce * b; - te[ 10 ] = a * c; - - } else if ( euler.order === 'ZXY' ) { - - const ce = c * e, cf = c * f, de = d * e, df = d * f; - - te[ 0 ] = ce - df * b; - te[ 4 ] = - a * f; - te[ 8 ] = de + cf * b; - - te[ 1 ] = cf + de * b; - te[ 5 ] = a * e; - te[ 9 ] = df - ce * b; - - te[ 2 ] = - a * d; - te[ 6 ] = b; - te[ 10 ] = a * c; - - } else if ( euler.order === 'ZYX' ) { - - const ae = a * e, af = a * f, be = b * e, bf = b * f; - - te[ 0 ] = c * e; - te[ 4 ] = be * d - af; - te[ 8 ] = ae * d + bf; - - te[ 1 ] = c * f; - te[ 5 ] = bf * d + ae; - te[ 9 ] = af * d - be; - - te[ 2 ] = - d; - te[ 6 ] = b * c; - te[ 10 ] = a * c; - - } else if ( euler.order === 'YZX' ) { - - const ac = a * c, ad = a * d, bc = b * c, bd = b * d; - - te[ 0 ] = c * e; - te[ 4 ] = bd - ac * f; - te[ 8 ] = bc * f + ad; - - te[ 1 ] = f; - te[ 5 ] = a * e; - te[ 9 ] = - b * e; - - te[ 2 ] = - d * e; - te[ 6 ] = ad * f + bc; - te[ 10 ] = ac - bd * f; - - } else if ( euler.order === 'XZY' ) { - - const ac = a * c, ad = a * d, bc = b * c, bd = b * d; - - te[ 0 ] = c * e; - te[ 4 ] = - f; - te[ 8 ] = d * e; - - te[ 1 ] = ac * f + bd; - te[ 5 ] = a * e; - te[ 9 ] = ad * f - bc; - - te[ 2 ] = bc * f - ad; - te[ 6 ] = b * e; - te[ 10 ] = bd * f + ac; - - } - - // bottom row - te[ 3 ] = 0; - te[ 7 ] = 0; - te[ 11 ] = 0; - - // last column - te[ 12 ] = 0; - te[ 13 ] = 0; - te[ 14 ] = 0; - te[ 15 ] = 1; - - return this; - - } - - makeRotationFromQuaternion( q ) { - - return this.compose( _zero, q, _one ); - - } - - lookAt( eye, target, up ) { - - const te = this.elements; - - _z.subVectors( eye, target ); - - if ( _z.lengthSq() === 0 ) { - - // eye and target are in the same position - - _z.z = 1; - - } - - _z.normalize(); - _x.crossVectors( up, _z ); - - if ( _x.lengthSq() === 0 ) { - - // up and z are parallel - - if ( Math.abs( up.z ) === 1 ) { - - _z.x += 0.0001; - - } else { - - _z.z += 0.0001; - - } - - _z.normalize(); - _x.crossVectors( up, _z ); - - } - - _x.normalize(); - _y.crossVectors( _z, _x ); - - te[ 0 ] = _x.x; te[ 4 ] = _y.x; te[ 8 ] = _z.x; - te[ 1 ] = _x.y; te[ 5 ] = _y.y; te[ 9 ] = _z.y; - te[ 2 ] = _x.z; te[ 6 ] = _y.z; te[ 10 ] = _z.z; - - return this; - - } - - multiply( m, n ) { - - if ( n !== undefined ) { - - console.warn( 'THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.' ); - return this.multiplyMatrices( m, n ); - - } - - return this.multiplyMatrices( this, m ); - - } - - premultiply( m ) { - - return this.multiplyMatrices( m, this ); - - } - - multiplyMatrices( a, b ) { - - const ae = a.elements; - const be = b.elements; - const te = this.elements; - - const a11 = ae[ 0 ], a12 = ae[ 4 ], a13 = ae[ 8 ], a14 = ae[ 12 ]; - const a21 = ae[ 1 ], a22 = ae[ 5 ], a23 = ae[ 9 ], a24 = ae[ 13 ]; - const a31 = ae[ 2 ], a32 = ae[ 6 ], a33 = ae[ 10 ], a34 = ae[ 14 ]; - const a41 = ae[ 3 ], a42 = ae[ 7 ], a43 = ae[ 11 ], a44 = ae[ 15 ]; - - const b11 = be[ 0 ], b12 = be[ 4 ], b13 = be[ 8 ], b14 = be[ 12 ]; - const b21 = be[ 1 ], b22 = be[ 5 ], b23 = be[ 9 ], b24 = be[ 13 ]; - const b31 = be[ 2 ], b32 = be[ 6 ], b33 = be[ 10 ], b34 = be[ 14 ]; - const b41 = be[ 3 ], b42 = be[ 7 ], b43 = be[ 11 ], b44 = be[ 15 ]; - - te[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41; - te[ 4 ] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42; - te[ 8 ] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43; - te[ 12 ] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44; - - te[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41; - te[ 5 ] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42; - te[ 9 ] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43; - te[ 13 ] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44; - - te[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41; - te[ 6 ] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42; - te[ 10 ] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43; - te[ 14 ] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44; - - te[ 3 ] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41; - te[ 7 ] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42; - te[ 11 ] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43; - te[ 15 ] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44; - - return this; - - } - - multiplyScalar( s ) { - - const te = this.elements; - - te[ 0 ] *= s; te[ 4 ] *= s; te[ 8 ] *= s; te[ 12 ] *= s; - te[ 1 ] *= s; te[ 5 ] *= s; te[ 9 ] *= s; te[ 13 ] *= s; - te[ 2 ] *= s; te[ 6 ] *= s; te[ 10 ] *= s; te[ 14 ] *= s; - te[ 3 ] *= s; te[ 7 ] *= s; te[ 11 ] *= s; te[ 15 ] *= s; - - return this; - - } - - determinant() { - - const te = this.elements; - - const n11 = te[ 0 ], n12 = te[ 4 ], n13 = te[ 8 ], n14 = te[ 12 ]; - const n21 = te[ 1 ], n22 = te[ 5 ], n23 = te[ 9 ], n24 = te[ 13 ]; - const n31 = te[ 2 ], n32 = te[ 6 ], n33 = te[ 10 ], n34 = te[ 14 ]; - const n41 = te[ 3 ], n42 = te[ 7 ], n43 = te[ 11 ], n44 = te[ 15 ]; - - //TODO: make this more efficient - //( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm ) - - return ( - n41 * ( - + n14 * n23 * n32 - - n13 * n24 * n32 - - n14 * n22 * n33 - + n12 * n24 * n33 - + n13 * n22 * n34 - - n12 * n23 * n34 - ) + - n42 * ( - + n11 * n23 * n34 - - n11 * n24 * n33 - + n14 * n21 * n33 - - n13 * n21 * n34 - + n13 * n24 * n31 - - n14 * n23 * n31 - ) + - n43 * ( - + n11 * n24 * n32 - - n11 * n22 * n34 - - n14 * n21 * n32 - + n12 * n21 * n34 - + n14 * n22 * n31 - - n12 * n24 * n31 - ) + - n44 * ( - - n13 * n22 * n31 - - n11 * n23 * n32 - + n11 * n22 * n33 - + n13 * n21 * n32 - - n12 * n21 * n33 - + n12 * n23 * n31 - ) - - ); - - } - - transpose() { - - const te = this.elements; - let tmp; - - tmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp; - tmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp; - tmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp; - - tmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp; - tmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp; - tmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp; - - return this; - - } - - setPosition( x, y, z ) { - - const te = this.elements; - - if ( x.isVector3 ) { - - te[ 12 ] = x.x; - te[ 13 ] = x.y; - te[ 14 ] = x.z; - - } else { - - te[ 12 ] = x; - te[ 13 ] = y; - te[ 14 ] = z; - - } - - return this; - - } - - invert() { - - // based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm - const te = this.elements, - - n11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], n41 = te[ 3 ], - n12 = te[ 4 ], n22 = te[ 5 ], n32 = te[ 6 ], n42 = te[ 7 ], - n13 = te[ 8 ], n23 = te[ 9 ], n33 = te[ 10 ], n43 = te[ 11 ], - n14 = te[ 12 ], n24 = te[ 13 ], n34 = te[ 14 ], n44 = te[ 15 ], - - t11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44, - t12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44, - t13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44, - t14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34; - - const det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14; - - if ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); - - const detInv = 1 / det; - - te[ 0 ] = t11 * detInv; - te[ 1 ] = ( n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44 ) * detInv; - te[ 2 ] = ( n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44 ) * detInv; - te[ 3 ] = ( n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43 ) * detInv; - - te[ 4 ] = t12 * detInv; - te[ 5 ] = ( n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44 ) * detInv; - te[ 6 ] = ( n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44 ) * detInv; - te[ 7 ] = ( n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43 ) * detInv; - - te[ 8 ] = t13 * detInv; - te[ 9 ] = ( n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44 ) * detInv; - te[ 10 ] = ( n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44 ) * detInv; - te[ 11 ] = ( n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43 ) * detInv; - - te[ 12 ] = t14 * detInv; - te[ 13 ] = ( n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34 ) * detInv; - te[ 14 ] = ( n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34 ) * detInv; - te[ 15 ] = ( n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33 ) * detInv; - - return this; - - } - - scale( v ) { - - const te = this.elements; - const x = v.x, y = v.y, z = v.z; - - te[ 0 ] *= x; te[ 4 ] *= y; te[ 8 ] *= z; - te[ 1 ] *= x; te[ 5 ] *= y; te[ 9 ] *= z; - te[ 2 ] *= x; te[ 6 ] *= y; te[ 10 ] *= z; - te[ 3 ] *= x; te[ 7 ] *= y; te[ 11 ] *= z; - - return this; - - } - - getMaxScaleOnAxis() { - - const te = this.elements; - - const scaleXSq = te[ 0 ] * te[ 0 ] + te[ 1 ] * te[ 1 ] + te[ 2 ] * te[ 2 ]; - const scaleYSq = te[ 4 ] * te[ 4 ] + te[ 5 ] * te[ 5 ] + te[ 6 ] * te[ 6 ]; - const scaleZSq = te[ 8 ] * te[ 8 ] + te[ 9 ] * te[ 9 ] + te[ 10 ] * te[ 10 ]; - - return Math.sqrt( Math.max( scaleXSq, scaleYSq, scaleZSq ) ); - - } - - makeTranslation( x, y, z ) { - - this.set( - - 1, 0, 0, x, - 0, 1, 0, y, - 0, 0, 1, z, - 0, 0, 0, 1 - - ); - - return this; - - } - - makeRotationX( theta ) { - - const c = Math.cos( theta ), s = Math.sin( theta ); - - this.set( - - 1, 0, 0, 0, - 0, c, - s, 0, - 0, s, c, 0, - 0, 0, 0, 1 - - ); - - return this; - - } - - makeRotationY( theta ) { - - const c = Math.cos( theta ), s = Math.sin( theta ); - - this.set( - - c, 0, s, 0, - 0, 1, 0, 0, - - s, 0, c, 0, - 0, 0, 0, 1 - - ); - - return this; - - } - - makeRotationZ( theta ) { - - const c = Math.cos( theta ), s = Math.sin( theta ); - - this.set( - - c, - s, 0, 0, - s, c, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1 - - ); - - return this; - - } - - makeRotationAxis( axis, angle ) { - - // Based on http://www.gamedev.net/reference/articles/article1199.asp - - const c = Math.cos( angle ); - const s = Math.sin( angle ); - const t = 1 - c; - const x = axis.x, y = axis.y, z = axis.z; - const tx = t * x, ty = t * y; - - this.set( - - tx * x + c, tx * y - s * z, tx * z + s * y, 0, - tx * y + s * z, ty * y + c, ty * z - s * x, 0, - tx * z - s * y, ty * z + s * x, t * z * z + c, 0, - 0, 0, 0, 1 - - ); - - return this; - - } - - makeScale( x, y, z ) { - - this.set( - - x, 0, 0, 0, - 0, y, 0, 0, - 0, 0, z, 0, - 0, 0, 0, 1 - - ); - - return this; - - } - - makeShear( xy, xz, yx, yz, zx, zy ) { - - this.set( - - 1, yx, zx, 0, - xy, 1, zy, 0, - xz, yz, 1, 0, - 0, 0, 0, 1 - - ); - - return this; - - } - - compose( position, quaternion, scale ) { - - const te = this.elements; - - const x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w; - const x2 = x + x, y2 = y + y, z2 = z + z; - const xx = x * x2, xy = x * y2, xz = x * z2; - const yy = y * y2, yz = y * z2, zz = z * z2; - const wx = w * x2, wy = w * y2, wz = w * z2; - - const sx = scale.x, sy = scale.y, sz = scale.z; - - te[ 0 ] = ( 1 - ( yy + zz ) ) * sx; - te[ 1 ] = ( xy + wz ) * sx; - te[ 2 ] = ( xz - wy ) * sx; - te[ 3 ] = 0; - - te[ 4 ] = ( xy - wz ) * sy; - te[ 5 ] = ( 1 - ( xx + zz ) ) * sy; - te[ 6 ] = ( yz + wx ) * sy; - te[ 7 ] = 0; - - te[ 8 ] = ( xz + wy ) * sz; - te[ 9 ] = ( yz - wx ) * sz; - te[ 10 ] = ( 1 - ( xx + yy ) ) * sz; - te[ 11 ] = 0; - - te[ 12 ] = position.x; - te[ 13 ] = position.y; - te[ 14 ] = position.z; - te[ 15 ] = 1; - - return this; - - } - - decompose( position, quaternion, scale ) { - - const te = this.elements; - - let sx = _v1$5.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length(); - const sy = _v1$5.set( te[ 4 ], te[ 5 ], te[ 6 ] ).length(); - const sz = _v1$5.set( te[ 8 ], te[ 9 ], te[ 10 ] ).length(); - - // if determine is negative, we need to invert one scale - const det = this.determinant(); - if ( det < 0 ) sx = - sx; - - position.x = te[ 12 ]; - position.y = te[ 13 ]; - position.z = te[ 14 ]; - - // scale the rotation part - _m1$2.copy( this ); - - const invSX = 1 / sx; - const invSY = 1 / sy; - const invSZ = 1 / sz; - - _m1$2.elements[ 0 ] *= invSX; - _m1$2.elements[ 1 ] *= invSX; - _m1$2.elements[ 2 ] *= invSX; - - _m1$2.elements[ 4 ] *= invSY; - _m1$2.elements[ 5 ] *= invSY; - _m1$2.elements[ 6 ] *= invSY; - - _m1$2.elements[ 8 ] *= invSZ; - _m1$2.elements[ 9 ] *= invSZ; - _m1$2.elements[ 10 ] *= invSZ; - - quaternion.setFromRotationMatrix( _m1$2 ); - - scale.x = sx; - scale.y = sy; - scale.z = sz; - - return this; - - } - - makePerspective( left, right, top, bottom, near, far ) { - - if ( far === undefined ) { - - console.warn( 'THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.' ); - - } - - const te = this.elements; - const x = 2 * near / ( right - left ); - const y = 2 * near / ( top - bottom ); - - const a = ( right + left ) / ( right - left ); - const b = ( top + bottom ) / ( top - bottom ); - const c = - ( far + near ) / ( far - near ); - const d = - 2 * far * near / ( far - near ); - - te[ 0 ] = x; te[ 4 ] = 0; te[ 8 ] = a; te[ 12 ] = 0; - te[ 1 ] = 0; te[ 5 ] = y; te[ 9 ] = b; te[ 13 ] = 0; - te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = c; te[ 14 ] = d; - te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = - 1; te[ 15 ] = 0; - - return this; - - } - - makeOrthographic( left, right, top, bottom, near, far ) { - - const te = this.elements; - const w = 1.0 / ( right - left ); - const h = 1.0 / ( top - bottom ); - const p = 1.0 / ( far - near ); - - const x = ( right + left ) * w; - const y = ( top + bottom ) * h; - const z = ( far + near ) * p; - - te[ 0 ] = 2 * w; te[ 4 ] = 0; te[ 8 ] = 0; te[ 12 ] = - x; - te[ 1 ] = 0; te[ 5 ] = 2 * h; te[ 9 ] = 0; te[ 13 ] = - y; - te[ 2 ] = 0; te[ 6 ] = 0; te[ 10 ] = - 2 * p; te[ 14 ] = - z; - te[ 3 ] = 0; te[ 7 ] = 0; te[ 11 ] = 0; te[ 15 ] = 1; - - return this; - - } - - equals( matrix ) { - - const te = this.elements; - const me = matrix.elements; - - for ( let i = 0; i < 16; i ++ ) { - - if ( te[ i ] !== me[ i ] ) return false; - - } - - return true; - - } - - fromArray( array, offset = 0 ) { - - for ( let i = 0; i < 16; i ++ ) { - - this.elements[ i ] = array[ i + offset ]; - - } - - return this; - - } - - toArray( array = [], offset = 0 ) { - - const te = this.elements; - - array[ offset ] = te[ 0 ]; - array[ offset + 1 ] = te[ 1 ]; - array[ offset + 2 ] = te[ 2 ]; - array[ offset + 3 ] = te[ 3 ]; - - array[ offset + 4 ] = te[ 4 ]; - array[ offset + 5 ] = te[ 5 ]; - array[ offset + 6 ] = te[ 6 ]; - array[ offset + 7 ] = te[ 7 ]; - - array[ offset + 8 ] = te[ 8 ]; - array[ offset + 9 ] = te[ 9 ]; - array[ offset + 10 ] = te[ 10 ]; - array[ offset + 11 ] = te[ 11 ]; - - array[ offset + 12 ] = te[ 12 ]; - array[ offset + 13 ] = te[ 13 ]; - array[ offset + 14 ] = te[ 14 ]; - array[ offset + 15 ] = te[ 15 ]; - - return array; - - } - -} - -Matrix4.prototype.isMatrix4 = true; - -const _v1$5 = /*@__PURE__*/ new Vector3(); -const _m1$2 = /*@__PURE__*/ new Matrix4(); -const _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 ); -const _one = /*@__PURE__*/ new Vector3( 1, 1, 1 ); -const _x = /*@__PURE__*/ new Vector3(); -const _y = /*@__PURE__*/ new Vector3(); -const _z = /*@__PURE__*/ new Vector3(); - -const _matrix$1 = /*@__PURE__*/ new Matrix4(); -const _quaternion$3 = /*@__PURE__*/ new Quaternion(); - -class Euler { - - constructor( x = 0, y = 0, z = 0, order = Euler.DefaultOrder ) { - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - } - - get x() { - - return this._x; - - } - - set x( value ) { - - this._x = value; - this._onChangeCallback(); - - } - - get y() { - - return this._y; - - } - - set y( value ) { - - this._y = value; - this._onChangeCallback(); - - } - - get z() { - - return this._z; - - } - - set z( value ) { - - this._z = value; - this._onChangeCallback(); - - } - - get order() { - - return this._order; - - } - - set order( value ) { - - this._order = value; - this._onChangeCallback(); - - } - - set( x, y, z, order = this._order ) { - - this._x = x; - this._y = y; - this._z = z; - this._order = order; - - this._onChangeCallback(); - - return this; - - } - - clone() { - - return new this.constructor( this._x, this._y, this._z, this._order ); - - } - - copy( euler ) { - - this._x = euler._x; - this._y = euler._y; - this._z = euler._z; - this._order = euler._order; - - this._onChangeCallback(); - - return this; - - } - - setFromRotationMatrix( m, order = this._order, update = true ) { - - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - - const te = m.elements; - const m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ]; - const m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ]; - const m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ]; - - switch ( order ) { - - case 'XYZ': - - this._y = Math.asin( clamp( m13, - 1, 1 ) ); - - if ( Math.abs( m13 ) < 0.9999999 ) { - - this._x = Math.atan2( - m23, m33 ); - this._z = Math.atan2( - m12, m11 ); - - } else { - - this._x = Math.atan2( m32, m22 ); - this._z = 0; - - } - - break; - - case 'YXZ': - - this._x = Math.asin( - clamp( m23, - 1, 1 ) ); - - if ( Math.abs( m23 ) < 0.9999999 ) { - - this._y = Math.atan2( m13, m33 ); - this._z = Math.atan2( m21, m22 ); - - } else { - - this._y = Math.atan2( - m31, m11 ); - this._z = 0; - - } - - break; - - case 'ZXY': - - this._x = Math.asin( clamp( m32, - 1, 1 ) ); - - if ( Math.abs( m32 ) < 0.9999999 ) { - - this._y = Math.atan2( - m31, m33 ); - this._z = Math.atan2( - m12, m22 ); - - } else { - - this._y = 0; - this._z = Math.atan2( m21, m11 ); - - } - - break; - - case 'ZYX': - - this._y = Math.asin( - clamp( m31, - 1, 1 ) ); - - if ( Math.abs( m31 ) < 0.9999999 ) { - - this._x = Math.atan2( m32, m33 ); - this._z = Math.atan2( m21, m11 ); - - } else { - - this._x = 0; - this._z = Math.atan2( - m12, m22 ); - - } - - break; - - case 'YZX': - - this._z = Math.asin( clamp( m21, - 1, 1 ) ); - - if ( Math.abs( m21 ) < 0.9999999 ) { - - this._x = Math.atan2( - m23, m22 ); - this._y = Math.atan2( - m31, m11 ); - - } else { - - this._x = 0; - this._y = Math.atan2( m13, m33 ); - - } - - break; - - case 'XZY': - - this._z = Math.asin( - clamp( m12, - 1, 1 ) ); - - if ( Math.abs( m12 ) < 0.9999999 ) { - - this._x = Math.atan2( m32, m22 ); - this._y = Math.atan2( m13, m11 ); - - } else { - - this._x = Math.atan2( - m23, m33 ); - this._y = 0; - - } - - break; - - default: - - console.warn( 'THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order ); - - } - - this._order = order; - - if ( update === true ) this._onChangeCallback(); - - return this; - - } - - setFromQuaternion( q, order, update ) { - - _matrix$1.makeRotationFromQuaternion( q ); - - return this.setFromRotationMatrix( _matrix$1, order, update ); - - } - - setFromVector3( v, order = this._order ) { - - return this.set( v.x, v.y, v.z, order ); - - } - - reorder( newOrder ) { - - // WARNING: this discards revolution information -bhouston - - _quaternion$3.setFromEuler( this ); - - return this.setFromQuaternion( _quaternion$3, newOrder ); - - } - - equals( euler ) { - - return ( euler._x === this._x ) && ( euler._y === this._y ) && ( euler._z === this._z ) && ( euler._order === this._order ); - - } - - fromArray( array ) { - - this._x = array[ 0 ]; - this._y = array[ 1 ]; - this._z = array[ 2 ]; - if ( array[ 3 ] !== undefined ) this._order = array[ 3 ]; - - this._onChangeCallback(); - - return this; - - } - - toArray( array = [], offset = 0 ) { - - array[ offset ] = this._x; - array[ offset + 1 ] = this._y; - array[ offset + 2 ] = this._z; - array[ offset + 3 ] = this._order; - - return array; - - } - - toVector3( optionalResult ) { - - if ( optionalResult ) { - - return optionalResult.set( this._x, this._y, this._z ); - - } else { - - return new Vector3( this._x, this._y, this._z ); - - } - - } - - _onChange( callback ) { - - this._onChangeCallback = callback; - - return this; - - } - - _onChangeCallback() {} - -} - -Euler.prototype.isEuler = true; - -Euler.DefaultOrder = 'XYZ'; -Euler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ]; - -class Layers { - - constructor() { - - this.mask = 1 | 0; - - } - - set( channel ) { - - this.mask = 1 << channel | 0; - - } - - enable( channel ) { - - this.mask |= 1 << channel | 0; - - } - - enableAll() { - - this.mask = 0xffffffff | 0; - - } - - toggle( channel ) { - - this.mask ^= 1 << channel | 0; - - } - - disable( channel ) { - - this.mask &= ~ ( 1 << channel | 0 ); - - } - - disableAll() { - - this.mask = 0; - - } - - test( layers ) { - - return ( this.mask & layers.mask ) !== 0; - - } - -} - -let _object3DId = 0; - -const _v1$4 = /*@__PURE__*/ new Vector3(); -const _q1 = /*@__PURE__*/ new Quaternion(); -const _m1$1 = /*@__PURE__*/ new Matrix4(); -const _target = /*@__PURE__*/ new Vector3(); - -const _position$3 = /*@__PURE__*/ new Vector3(); -const _scale$2 = /*@__PURE__*/ new Vector3(); -const _quaternion$2 = /*@__PURE__*/ new Quaternion(); - -const _xAxis = /*@__PURE__*/ new Vector3( 1, 0, 0 ); -const _yAxis = /*@__PURE__*/ new Vector3( 0, 1, 0 ); -const _zAxis = /*@__PURE__*/ new Vector3( 0, 0, 1 ); - -const _addedEvent = { type: 'added' }; -const _removedEvent = { type: 'removed' }; - -class Object3D extends EventDispatcher { - - constructor() { - - super(); - - Object.defineProperty( this, 'id', { value: _object3DId ++ } ); - - this.uuid = generateUUID(); - - this.name = ''; - this.type = 'Object3D'; - - this.parent = null; - this.children = []; - - this.up = Object3D.DefaultUp.clone(); - - const position = new Vector3(); - const rotation = new Euler(); - const quaternion = new Quaternion(); - const scale = new Vector3( 1, 1, 1 ); - - function onRotationChange() { - - quaternion.setFromEuler( rotation, false ); - - } - - function onQuaternionChange() { - - rotation.setFromQuaternion( quaternion, undefined, false ); - - } - - rotation._onChange( onRotationChange ); - quaternion._onChange( onQuaternionChange ); - - Object.defineProperties( this, { - position: { - configurable: true, - enumerable: true, - value: position - }, - rotation: { - configurable: true, - enumerable: true, - value: rotation - }, - quaternion: { - configurable: true, - enumerable: true, - value: quaternion - }, - scale: { - configurable: true, - enumerable: true, - value: scale - }, - modelViewMatrix: { - value: new Matrix4() - }, - normalMatrix: { - value: new Matrix3() - } - } ); - - this.matrix = new Matrix4(); - this.matrixWorld = new Matrix4(); - - this.matrixAutoUpdate = Object3D.DefaultMatrixAutoUpdate; - this.matrixWorldNeedsUpdate = false; - - this.layers = new Layers(); - this.visible = true; - - this.castShadow = false; - this.receiveShadow = false; - - this.frustumCulled = true; - this.renderOrder = 0; - - this.animations = []; - - this.userData = {}; - - } - - onBeforeRender() {} - onAfterRender() {} - - applyMatrix4( matrix ) { - - if ( this.matrixAutoUpdate ) this.updateMatrix(); - - this.matrix.premultiply( matrix ); - - this.matrix.decompose( this.position, this.quaternion, this.scale ); - - } - - applyQuaternion( q ) { - - this.quaternion.premultiply( q ); - - return this; - - } - - setRotationFromAxisAngle( axis, angle ) { - - // assumes axis is normalized - - this.quaternion.setFromAxisAngle( axis, angle ); - - } - - setRotationFromEuler( euler ) { - - this.quaternion.setFromEuler( euler, true ); - - } - - setRotationFromMatrix( m ) { - - // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled) - - this.quaternion.setFromRotationMatrix( m ); - - } - - setRotationFromQuaternion( q ) { - - // assumes q is normalized - - this.quaternion.copy( q ); - - } - - rotateOnAxis( axis, angle ) { - - // rotate object on axis in object space - // axis is assumed to be normalized - - _q1.setFromAxisAngle( axis, angle ); - - this.quaternion.multiply( _q1 ); - - return this; - - } - - rotateOnWorldAxis( axis, angle ) { - - // rotate object on axis in world space - // axis is assumed to be normalized - // method assumes no rotated parent - - _q1.setFromAxisAngle( axis, angle ); - - this.quaternion.premultiply( _q1 ); - - return this; - - } - - rotateX( angle ) { - - return this.rotateOnAxis( _xAxis, angle ); - - } - - rotateY( angle ) { - - return this.rotateOnAxis( _yAxis, angle ); - - } - - rotateZ( angle ) { - - return this.rotateOnAxis( _zAxis, angle ); - - } - - translateOnAxis( axis, distance ) { - - // translate object by distance along axis in object space - // axis is assumed to be normalized - - _v1$4.copy( axis ).applyQuaternion( this.quaternion ); - - this.position.add( _v1$4.multiplyScalar( distance ) ); - - return this; - - } - - translateX( distance ) { - - return this.translateOnAxis( _xAxis, distance ); - - } - - translateY( distance ) { - - return this.translateOnAxis( _yAxis, distance ); - - } - - translateZ( distance ) { - - return this.translateOnAxis( _zAxis, distance ); - - } - - localToWorld( vector ) { - - return vector.applyMatrix4( this.matrixWorld ); - - } - - worldToLocal( vector ) { - - return vector.applyMatrix4( _m1$1.copy( this.matrixWorld ).invert() ); - - } - - lookAt( x, y, z ) { - - // This method does not support objects having non-uniformly-scaled parent(s) - - if ( x.isVector3 ) { - - _target.copy( x ); - - } else { - - _target.set( x, y, z ); - - } - - const parent = this.parent; - - this.updateWorldMatrix( true, false ); - - _position$3.setFromMatrixPosition( this.matrixWorld ); - - if ( this.isCamera || this.isLight ) { - - _m1$1.lookAt( _position$3, _target, this.up ); - - } else { - - _m1$1.lookAt( _target, _position$3, this.up ); - - } - - this.quaternion.setFromRotationMatrix( _m1$1 ); - - if ( parent ) { - - _m1$1.extractRotation( parent.matrixWorld ); - _q1.setFromRotationMatrix( _m1$1 ); - this.quaternion.premultiply( _q1.invert() ); - - } - - } - - add( object ) { - - if ( arguments.length > 1 ) { - - for ( let i = 0; i < arguments.length; i ++ ) { - - this.add( arguments[ i ] ); - - } - - return this; - - } - - if ( object === this ) { - - console.error( 'THREE.Object3D.add: object can\'t be added as a child of itself.', object ); - return this; - - } - - if ( object && object.isObject3D ) { - - if ( object.parent !== null ) { - - object.parent.remove( object ); - - } - - object.parent = this; - this.children.push( object ); - - object.dispatchEvent( _addedEvent ); - - } else { - - console.error( 'THREE.Object3D.add: object not an instance of THREE.Object3D.', object ); - - } - - return this; - - } - - remove( object ) { - - if ( arguments.length > 1 ) { - - for ( let i = 0; i < arguments.length; i ++ ) { - - this.remove( arguments[ i ] ); - - } - - return this; - - } - - const index = this.children.indexOf( object ); - - if ( index !== - 1 ) { - - object.parent = null; - this.children.splice( index, 1 ); - - object.dispatchEvent( _removedEvent ); - - } - - return this; - - } - - removeFromParent() { - - const parent = this.parent; - - if ( parent !== null ) { - - parent.remove( this ); - - } - - return this; - - } - - clear() { - - for ( let i = 0; i < this.children.length; i ++ ) { - - const object = this.children[ i ]; - - object.parent = null; - - object.dispatchEvent( _removedEvent ); - - } - - this.children.length = 0; - - return this; - - - } - - attach( object ) { - - // adds object as a child of this, while maintaining the object's world transform - - this.updateWorldMatrix( true, false ); - - _m1$1.copy( this.matrixWorld ).invert(); - - if ( object.parent !== null ) { - - object.parent.updateWorldMatrix( true, false ); - - _m1$1.multiply( object.parent.matrixWorld ); - - } - - object.applyMatrix4( _m1$1 ); - - this.add( object ); - - object.updateWorldMatrix( false, true ); - - return this; - - } - - getObjectById( id ) { - - return this.getObjectByProperty( 'id', id ); - - } - - getObjectByName( name ) { - - return this.getObjectByProperty( 'name', name ); - - } - - getObjectByProperty( name, value ) { - - if ( this[ name ] === value ) return this; - - for ( let i = 0, l = this.children.length; i < l; i ++ ) { - - const child = this.children[ i ]; - const object = child.getObjectByProperty( name, value ); - - if ( object !== undefined ) { - - return object; - - } - - } - - return undefined; - - } - - getWorldPosition( target ) { - - this.updateWorldMatrix( true, false ); - - return target.setFromMatrixPosition( this.matrixWorld ); - - } - - getWorldQuaternion( target ) { - - this.updateWorldMatrix( true, false ); - - this.matrixWorld.decompose( _position$3, target, _scale$2 ); - - return target; - - } - - getWorldScale( target ) { - - this.updateWorldMatrix( true, false ); - - this.matrixWorld.decompose( _position$3, _quaternion$2, target ); - - return target; - - } - - getWorldDirection( target ) { - - this.updateWorldMatrix( true, false ); - - const e = this.matrixWorld.elements; - - return target.set( e[ 8 ], e[ 9 ], e[ 10 ] ).normalize(); - - } - - raycast() {} - - traverse( callback ) { - - callback( this ); - - const children = this.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - children[ i ].traverse( callback ); - - } - - } - - traverseVisible( callback ) { - - if ( this.visible === false ) return; - - callback( this ); - - const children = this.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - children[ i ].traverseVisible( callback ); - - } - - } - - traverseAncestors( callback ) { - - const parent = this.parent; - - if ( parent !== null ) { - - callback( parent ); - - parent.traverseAncestors( callback ); - - } - - } - - updateMatrix() { - - this.matrix.compose( this.position, this.quaternion, this.scale ); - - this.matrixWorldNeedsUpdate = true; - - } - - updateMatrixWorld( force ) { - - if ( this.matrixAutoUpdate ) this.updateMatrix(); - - if ( this.matrixWorldNeedsUpdate || force ) { - - if ( this.parent === null ) { - - this.matrixWorld.copy( this.matrix ); - - } else { - - this.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix ); - - } - - this.matrixWorldNeedsUpdate = false; - - force = true; - - } - - // update children - - const children = this.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - children[ i ].updateMatrixWorld( force ); - - } - - } - - updateWorldMatrix( updateParents, updateChildren ) { - - const parent = this.parent; - - if ( updateParents === true && parent !== null ) { - - parent.updateWorldMatrix( true, false ); - - } - - if ( this.matrixAutoUpdate ) this.updateMatrix(); - - if ( this.parent === null ) { - - this.matrixWorld.copy( this.matrix ); - - } else { - - this.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix ); - - } - - // update children - - if ( updateChildren === true ) { - - const children = this.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - children[ i ].updateWorldMatrix( false, true ); - - } - - } - - } - - toJSON( meta ) { - - // meta is a string when called from JSON.stringify - const isRootObject = ( meta === undefined || typeof meta === 'string' ); - - const output = {}; - - // meta is a hash used to collect geometries, materials. - // not providing it implies that this is the root object - // being serialized. - if ( isRootObject ) { - - // initialize meta obj - meta = { - geometries: {}, - materials: {}, - textures: {}, - images: {}, - shapes: {}, - skeletons: {}, - animations: {} - }; - - output.metadata = { - version: 4.5, - type: 'Object', - generator: 'Object3D.toJSON' - }; - - } - - // standard Object3D serialization - - const object = {}; - - object.uuid = this.uuid; - object.type = this.type; - - if ( this.name !== '' ) object.name = this.name; - if ( this.castShadow === true ) object.castShadow = true; - if ( this.receiveShadow === true ) object.receiveShadow = true; - if ( this.visible === false ) object.visible = false; - if ( this.frustumCulled === false ) object.frustumCulled = false; - if ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder; - if ( JSON.stringify( this.userData ) !== '{}' ) object.userData = this.userData; - - object.layers = this.layers.mask; - object.matrix = this.matrix.toArray(); - - if ( this.matrixAutoUpdate === false ) object.matrixAutoUpdate = false; - - // object specific properties - - if ( this.isInstancedMesh ) { - - object.type = 'InstancedMesh'; - object.count = this.count; - object.instanceMatrix = this.instanceMatrix.toJSON(); - if ( this.instanceColor !== null ) object.instanceColor = this.instanceColor.toJSON(); - - } - - // - - function serialize( library, element ) { - - if ( library[ element.uuid ] === undefined ) { - - library[ element.uuid ] = element.toJSON( meta ); - - } - - return element.uuid; - - } - - if ( this.isScene ) { - - if ( this.background ) { - - if ( this.background.isColor ) { - - object.background = this.background.toJSON(); - - } else if ( this.background.isTexture ) { - - object.background = this.background.toJSON( meta ).uuid; - - } - - } - - if ( this.environment && this.environment.isTexture ) { - - object.environment = this.environment.toJSON( meta ).uuid; - - } - - } else if ( this.isMesh || this.isLine || this.isPoints ) { - - object.geometry = serialize( meta.geometries, this.geometry ); - - const parameters = this.geometry.parameters; - - if ( parameters !== undefined && parameters.shapes !== undefined ) { - - const shapes = parameters.shapes; - - if ( Array.isArray( shapes ) ) { - - for ( let i = 0, l = shapes.length; i < l; i ++ ) { - - const shape = shapes[ i ]; - - serialize( meta.shapes, shape ); - - } - - } else { - - serialize( meta.shapes, shapes ); - - } - - } - - } - - if ( this.isSkinnedMesh ) { - - object.bindMode = this.bindMode; - object.bindMatrix = this.bindMatrix.toArray(); - - if ( this.skeleton !== undefined ) { - - serialize( meta.skeletons, this.skeleton ); - - object.skeleton = this.skeleton.uuid; - - } - - } - - if ( this.material !== undefined ) { - - if ( Array.isArray( this.material ) ) { - - const uuids = []; - - for ( let i = 0, l = this.material.length; i < l; i ++ ) { - - uuids.push( serialize( meta.materials, this.material[ i ] ) ); - - } - - object.material = uuids; - - } else { - - object.material = serialize( meta.materials, this.material ); - - } - - } - - // - - if ( this.children.length > 0 ) { - - object.children = []; - - for ( let i = 0; i < this.children.length; i ++ ) { - - object.children.push( this.children[ i ].toJSON( meta ).object ); - - } - - } - - // - - if ( this.animations.length > 0 ) { - - object.animations = []; - - for ( let i = 0; i < this.animations.length; i ++ ) { - - const animation = this.animations[ i ]; - - object.animations.push( serialize( meta.animations, animation ) ); - - } - - } - - if ( isRootObject ) { - - const geometries = extractFromCache( meta.geometries ); - const materials = extractFromCache( meta.materials ); - const textures = extractFromCache( meta.textures ); - const images = extractFromCache( meta.images ); - const shapes = extractFromCache( meta.shapes ); - const skeletons = extractFromCache( meta.skeletons ); - const animations = extractFromCache( meta.animations ); - - if ( geometries.length > 0 ) output.geometries = geometries; - if ( materials.length > 0 ) output.materials = materials; - if ( textures.length > 0 ) output.textures = textures; - if ( images.length > 0 ) output.images = images; - if ( shapes.length > 0 ) output.shapes = shapes; - if ( skeletons.length > 0 ) output.skeletons = skeletons; - if ( animations.length > 0 ) output.animations = animations; - - } - - output.object = object; - - return output; - - // extract data from the cache hash - // remove metadata on each item - // and return as array - function extractFromCache( cache ) { - - const values = []; - for ( const key in cache ) { - - const data = cache[ key ]; - delete data.metadata; - values.push( data ); - - } - - return values; - - } - - } - - clone( recursive ) { - - return new this.constructor().copy( this, recursive ); - - } - - copy( source, recursive = true ) { - - this.name = source.name; - - this.up.copy( source.up ); - - this.position.copy( source.position ); - this.rotation.order = source.rotation.order; - this.quaternion.copy( source.quaternion ); - this.scale.copy( source.scale ); - - this.matrix.copy( source.matrix ); - this.matrixWorld.copy( source.matrixWorld ); - - this.matrixAutoUpdate = source.matrixAutoUpdate; - this.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate; - - this.layers.mask = source.layers.mask; - this.visible = source.visible; - - this.castShadow = source.castShadow; - this.receiveShadow = source.receiveShadow; - - this.frustumCulled = source.frustumCulled; - this.renderOrder = source.renderOrder; - - this.userData = JSON.parse( JSON.stringify( source.userData ) ); - - if ( recursive === true ) { - - for ( let i = 0; i < source.children.length; i ++ ) { - - const child = source.children[ i ]; - this.add( child.clone() ); - - } - - } - - return this; - - } - -} - -Object3D.DefaultUp = new Vector3( 0, 1, 0 ); -Object3D.DefaultMatrixAutoUpdate = true; - -Object3D.prototype.isObject3D = true; - -const _v0$1 = /*@__PURE__*/ new Vector3(); -const _v1$3 = /*@__PURE__*/ new Vector3(); -const _v2$2 = /*@__PURE__*/ new Vector3(); -const _v3$1 = /*@__PURE__*/ new Vector3(); - -const _vab = /*@__PURE__*/ new Vector3(); -const _vac = /*@__PURE__*/ new Vector3(); -const _vbc = /*@__PURE__*/ new Vector3(); -const _vap = /*@__PURE__*/ new Vector3(); -const _vbp = /*@__PURE__*/ new Vector3(); -const _vcp = /*@__PURE__*/ new Vector3(); - -class Triangle { - - constructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) { - - this.a = a; - this.b = b; - this.c = c; - - } - - static getNormal( a, b, c, target ) { - - target.subVectors( c, b ); - _v0$1.subVectors( a, b ); - target.cross( _v0$1 ); - - const targetLengthSq = target.lengthSq(); - if ( targetLengthSq > 0 ) { - - return target.multiplyScalar( 1 / Math.sqrt( targetLengthSq ) ); - - } - - return target.set( 0, 0, 0 ); - - } - - // static/instance method to calculate barycentric coordinates - // based on: http://www.blackpawn.com/texts/pointinpoly/default.html - static getBarycoord( point, a, b, c, target ) { - - _v0$1.subVectors( c, a ); - _v1$3.subVectors( b, a ); - _v2$2.subVectors( point, a ); - - const dot00 = _v0$1.dot( _v0$1 ); - const dot01 = _v0$1.dot( _v1$3 ); - const dot02 = _v0$1.dot( _v2$2 ); - const dot11 = _v1$3.dot( _v1$3 ); - const dot12 = _v1$3.dot( _v2$2 ); - - const denom = ( dot00 * dot11 - dot01 * dot01 ); - - // collinear or singular triangle - if ( denom === 0 ) { - - // arbitrary location outside of triangle? - // not sure if this is the best idea, maybe should be returning undefined - return target.set( - 2, - 1, - 1 ); - - } - - const invDenom = 1 / denom; - const u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom; - const v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom; - - // barycentric coordinates must always sum to 1 - return target.set( 1 - u - v, v, u ); - - } - - static containsPoint( point, a, b, c ) { - - this.getBarycoord( point, a, b, c, _v3$1 ); - - return ( _v3$1.x >= 0 ) && ( _v3$1.y >= 0 ) && ( ( _v3$1.x + _v3$1.y ) <= 1 ); - - } - - static getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) { - - this.getBarycoord( point, p1, p2, p3, _v3$1 ); - - target.set( 0, 0 ); - target.addScaledVector( uv1, _v3$1.x ); - target.addScaledVector( uv2, _v3$1.y ); - target.addScaledVector( uv3, _v3$1.z ); - - return target; - - } - - static isFrontFacing( a, b, c, direction ) { - - _v0$1.subVectors( c, b ); - _v1$3.subVectors( a, b ); - - // strictly front facing - return ( _v0$1.cross( _v1$3 ).dot( direction ) < 0 ) ? true : false; - - } - - set( a, b, c ) { - - this.a.copy( a ); - this.b.copy( b ); - this.c.copy( c ); - - return this; - - } - - setFromPointsAndIndices( points, i0, i1, i2 ) { - - this.a.copy( points[ i0 ] ); - this.b.copy( points[ i1 ] ); - this.c.copy( points[ i2 ] ); - - return this; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - copy( triangle ) { - - this.a.copy( triangle.a ); - this.b.copy( triangle.b ); - this.c.copy( triangle.c ); - - return this; - - } - - getArea() { - - _v0$1.subVectors( this.c, this.b ); - _v1$3.subVectors( this.a, this.b ); - - return _v0$1.cross( _v1$3 ).length() * 0.5; - - } - - getMidpoint( target ) { - - return target.addVectors( this.a, this.b ).add( this.c ).multiplyScalar( 1 / 3 ); - - } - - getNormal( target ) { - - return Triangle.getNormal( this.a, this.b, this.c, target ); - - } - - getPlane( target ) { - - return target.setFromCoplanarPoints( this.a, this.b, this.c ); - - } - - getBarycoord( point, target ) { - - return Triangle.getBarycoord( point, this.a, this.b, this.c, target ); - - } - - getUV( point, uv1, uv2, uv3, target ) { - - return Triangle.getUV( point, this.a, this.b, this.c, uv1, uv2, uv3, target ); - - } - - containsPoint( point ) { - - return Triangle.containsPoint( point, this.a, this.b, this.c ); - - } - - isFrontFacing( direction ) { - - return Triangle.isFrontFacing( this.a, this.b, this.c, direction ); - - } - - intersectsBox( box ) { - - return box.intersectsTriangle( this ); - - } - - closestPointToPoint( p, target ) { - - const a = this.a, b = this.b, c = this.c; - let v, w; - - // algorithm thanks to Real-Time Collision Detection by Christer Ericson, - // published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc., - // under the accompanying license; see chapter 5.1.5 for detailed explanation. - // basically, we're distinguishing which of the voronoi regions of the triangle - // the point lies in with the minimum amount of redundant computation. - - _vab.subVectors( b, a ); - _vac.subVectors( c, a ); - _vap.subVectors( p, a ); - const d1 = _vab.dot( _vap ); - const d2 = _vac.dot( _vap ); - if ( d1 <= 0 && d2 <= 0 ) { - - // vertex region of A; barycentric coords (1, 0, 0) - return target.copy( a ); - - } - - _vbp.subVectors( p, b ); - const d3 = _vab.dot( _vbp ); - const d4 = _vac.dot( _vbp ); - if ( d3 >= 0 && d4 <= d3 ) { - - // vertex region of B; barycentric coords (0, 1, 0) - return target.copy( b ); - - } - - const vc = d1 * d4 - d3 * d2; - if ( vc <= 0 && d1 >= 0 && d3 <= 0 ) { - - v = d1 / ( d1 - d3 ); - // edge region of AB; barycentric coords (1-v, v, 0) - return target.copy( a ).addScaledVector( _vab, v ); - - } - - _vcp.subVectors( p, c ); - const d5 = _vab.dot( _vcp ); - const d6 = _vac.dot( _vcp ); - if ( d6 >= 0 && d5 <= d6 ) { - - // vertex region of C; barycentric coords (0, 0, 1) - return target.copy( c ); - - } - - const vb = d5 * d2 - d1 * d6; - if ( vb <= 0 && d2 >= 0 && d6 <= 0 ) { - - w = d2 / ( d2 - d6 ); - // edge region of AC; barycentric coords (1-w, 0, w) - return target.copy( a ).addScaledVector( _vac, w ); - - } - - const va = d3 * d6 - d5 * d4; - if ( va <= 0 && ( d4 - d3 ) >= 0 && ( d5 - d6 ) >= 0 ) { - - _vbc.subVectors( c, b ); - w = ( d4 - d3 ) / ( ( d4 - d3 ) + ( d5 - d6 ) ); - // edge region of BC; barycentric coords (0, 1-w, w) - return target.copy( b ).addScaledVector( _vbc, w ); // edge region of BC - - } - - // face region - const denom = 1 / ( va + vb + vc ); - // u = va * denom - v = vb * denom; - w = vc * denom; - - return target.copy( a ).addScaledVector( _vab, v ).addScaledVector( _vac, w ); - - } - - equals( triangle ) { - - return triangle.a.equals( this.a ) && triangle.b.equals( this.b ) && triangle.c.equals( this.c ); - - } - -} - -let materialId = 0; - -class Material extends EventDispatcher { - - constructor() { - - super(); - - Object.defineProperty( this, 'id', { value: materialId ++ } ); - - this.uuid = generateUUID(); - - this.name = ''; - this.type = 'Material'; - - this.fog = true; - - this.blending = NormalBlending; - this.side = FrontSide; - this.vertexColors = false; - - this.opacity = 1; - this.transparent = false; - - this.blendSrc = SrcAlphaFactor; - this.blendDst = OneMinusSrcAlphaFactor; - this.blendEquation = AddEquation; - this.blendSrcAlpha = null; - this.blendDstAlpha = null; - this.blendEquationAlpha = null; - - this.depthFunc = LessEqualDepth; - this.depthTest = true; - this.depthWrite = true; - - this.stencilWriteMask = 0xff; - this.stencilFunc = AlwaysStencilFunc; - this.stencilRef = 0; - this.stencilFuncMask = 0xff; - this.stencilFail = KeepStencilOp; - this.stencilZFail = KeepStencilOp; - this.stencilZPass = KeepStencilOp; - this.stencilWrite = false; - - this.clippingPlanes = null; - this.clipIntersection = false; - this.clipShadows = false; - - this.shadowSide = null; - - this.colorWrite = true; - - this.precision = null; // override the renderer's default precision for this material - - this.polygonOffset = false; - this.polygonOffsetFactor = 0; - this.polygonOffsetUnits = 0; - - this.dithering = false; - - this.alphaTest = 0; - this.alphaToCoverage = false; - this.premultipliedAlpha = false; - - this.visible = true; - - this.toneMapped = true; - - this.userData = {}; - - this.version = 0; - - } - - onBuild( /* shaderobject, renderer */ ) {} - - onBeforeCompile( /* shaderobject, renderer */ ) {} - - customProgramCacheKey() { - - return this.onBeforeCompile.toString(); - - } - - setValues( values ) { - - if ( values === undefined ) return; - - for ( const key in values ) { - - const newValue = values[ key ]; - - if ( newValue === undefined ) { - - console.warn( 'THREE.Material: \'' + key + '\' parameter is undefined.' ); - continue; - - } - - // for backward compatability if shading is set in the constructor - if ( key === 'shading' ) { - - console.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' ); - this.flatShading = ( newValue === FlatShading ) ? true : false; - continue; - - } - - const currentValue = this[ key ]; - - if ( currentValue === undefined ) { - - console.warn( 'THREE.' + this.type + ': \'' + key + '\' is not a property of this material.' ); - continue; - - } - - if ( currentValue && currentValue.isColor ) { - - currentValue.set( newValue ); - - } else if ( ( currentValue && currentValue.isVector3 ) && ( newValue && newValue.isVector3 ) ) { - - currentValue.copy( newValue ); - - } else { - - this[ key ] = newValue; - - } - - } - - } - - toJSON( meta ) { - - const isRoot = ( meta === undefined || typeof meta === 'string' ); - - if ( isRoot ) { - - meta = { - textures: {}, - images: {} - }; - - } - - const data = { - metadata: { - version: 4.5, - type: 'Material', - generator: 'Material.toJSON' - } - }; - - // standard Material serialization - data.uuid = this.uuid; - data.type = this.type; - - if ( this.name !== '' ) data.name = this.name; - - if ( this.color && this.color.isColor ) data.color = this.color.getHex(); - - if ( this.roughness !== undefined ) data.roughness = this.roughness; - if ( this.metalness !== undefined ) data.metalness = this.metalness; - - if ( this.sheen && this.sheen.isColor ) data.sheen = this.sheen.getHex(); - if ( this.emissive && this.emissive.isColor ) data.emissive = this.emissive.getHex(); - if ( this.emissiveIntensity && this.emissiveIntensity !== 1 ) data.emissiveIntensity = this.emissiveIntensity; - - if ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex(); - if ( this.shininess !== undefined ) data.shininess = this.shininess; - if ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat; - if ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness; - - if ( this.clearcoatMap && this.clearcoatMap.isTexture ) { - - data.clearcoatMap = this.clearcoatMap.toJSON( meta ).uuid; - - } - - if ( this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture ) { - - data.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON( meta ).uuid; - - } - - if ( this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture ) { - - data.clearcoatNormalMap = this.clearcoatNormalMap.toJSON( meta ).uuid; - data.clearcoatNormalScale = this.clearcoatNormalScale.toArray(); - - } - - if ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid; - if ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid; - if ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid; - - if ( this.lightMap && this.lightMap.isTexture ) { - - data.lightMap = this.lightMap.toJSON( meta ).uuid; - data.lightMapIntensity = this.lightMapIntensity; - - } - - if ( this.aoMap && this.aoMap.isTexture ) { - - data.aoMap = this.aoMap.toJSON( meta ).uuid; - data.aoMapIntensity = this.aoMapIntensity; - - } - - if ( this.bumpMap && this.bumpMap.isTexture ) { - - data.bumpMap = this.bumpMap.toJSON( meta ).uuid; - data.bumpScale = this.bumpScale; - - } - - if ( this.normalMap && this.normalMap.isTexture ) { - - data.normalMap = this.normalMap.toJSON( meta ).uuid; - data.normalMapType = this.normalMapType; - data.normalScale = this.normalScale.toArray(); - - } - - if ( this.displacementMap && this.displacementMap.isTexture ) { - - data.displacementMap = this.displacementMap.toJSON( meta ).uuid; - data.displacementScale = this.displacementScale; - data.displacementBias = this.displacementBias; - - } - - if ( this.roughnessMap && this.roughnessMap.isTexture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid; - if ( this.metalnessMap && this.metalnessMap.isTexture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid; - - if ( this.emissiveMap && this.emissiveMap.isTexture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid; - if ( this.specularMap && this.specularMap.isTexture ) data.specularMap = this.specularMap.toJSON( meta ).uuid; - - if ( this.envMap && this.envMap.isTexture ) { - - data.envMap = this.envMap.toJSON( meta ).uuid; - - if ( this.combine !== undefined ) data.combine = this.combine; - - } - - if ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity; - if ( this.reflectivity !== undefined ) data.reflectivity = this.reflectivity; - if ( this.refractionRatio !== undefined ) data.refractionRatio = this.refractionRatio; - - if ( this.gradientMap && this.gradientMap.isTexture ) { - - data.gradientMap = this.gradientMap.toJSON( meta ).uuid; - - } - - if ( this.transmission !== undefined ) data.transmission = this.transmission; - if ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid; - if ( this.thickness !== undefined ) data.thickness = this.thickness; - if ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid; - if ( this.attenuationDistance !== undefined ) data.attenuationDistance = this.attenuationDistance; - if ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex(); - - if ( this.size !== undefined ) data.size = this.size; - if ( this.shadowSide !== null ) data.shadowSide = this.shadowSide; - if ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation; - - if ( this.blending !== NormalBlending ) data.blending = this.blending; - if ( this.side !== FrontSide ) data.side = this.side; - if ( this.vertexColors ) data.vertexColors = true; - - if ( this.opacity < 1 ) data.opacity = this.opacity; - if ( this.transparent === true ) data.transparent = this.transparent; - - data.depthFunc = this.depthFunc; - data.depthTest = this.depthTest; - data.depthWrite = this.depthWrite; - data.colorWrite = this.colorWrite; - - data.stencilWrite = this.stencilWrite; - data.stencilWriteMask = this.stencilWriteMask; - data.stencilFunc = this.stencilFunc; - data.stencilRef = this.stencilRef; - data.stencilFuncMask = this.stencilFuncMask; - data.stencilFail = this.stencilFail; - data.stencilZFail = this.stencilZFail; - data.stencilZPass = this.stencilZPass; - - // rotation (SpriteMaterial) - if ( this.rotation && this.rotation !== 0 ) data.rotation = this.rotation; - - if ( this.polygonOffset === true ) data.polygonOffset = true; - if ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor; - if ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits; - - if ( this.linewidth && this.linewidth !== 1 ) data.linewidth = this.linewidth; - if ( this.dashSize !== undefined ) data.dashSize = this.dashSize; - if ( this.gapSize !== undefined ) data.gapSize = this.gapSize; - if ( this.scale !== undefined ) data.scale = this.scale; - - if ( this.dithering === true ) data.dithering = true; - - if ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest; - if ( this.alphaToCoverage === true ) data.alphaToCoverage = this.alphaToCoverage; - if ( this.premultipliedAlpha === true ) data.premultipliedAlpha = this.premultipliedAlpha; - - if ( this.wireframe === true ) data.wireframe = this.wireframe; - if ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth; - if ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap; - if ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin; - - if ( this.morphTargets === true ) data.morphTargets = true; - if ( this.morphNormals === true ) data.morphNormals = true; - - if ( this.flatShading === true ) data.flatShading = this.flatShading; - - if ( this.visible === false ) data.visible = false; - - if ( this.toneMapped === false ) data.toneMapped = false; - - if ( JSON.stringify( this.userData ) !== '{}' ) data.userData = this.userData; - - // TODO: Copied from Object3D.toJSON - - function extractFromCache( cache ) { - - const values = []; - - for ( const key in cache ) { - - const data = cache[ key ]; - delete data.metadata; - values.push( data ); - - } - - return values; - - } - - if ( isRoot ) { - - const textures = extractFromCache( meta.textures ); - const images = extractFromCache( meta.images ); - - if ( textures.length > 0 ) data.textures = textures; - if ( images.length > 0 ) data.images = images; - - } - - return data; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - copy( source ) { - - this.name = source.name; - - this.fog = source.fog; - - this.blending = source.blending; - this.side = source.side; - this.vertexColors = source.vertexColors; - - this.opacity = source.opacity; - this.transparent = source.transparent; - - this.blendSrc = source.blendSrc; - this.blendDst = source.blendDst; - this.blendEquation = source.blendEquation; - this.blendSrcAlpha = source.blendSrcAlpha; - this.blendDstAlpha = source.blendDstAlpha; - this.blendEquationAlpha = source.blendEquationAlpha; - - this.depthFunc = source.depthFunc; - this.depthTest = source.depthTest; - this.depthWrite = source.depthWrite; - - this.stencilWriteMask = source.stencilWriteMask; - this.stencilFunc = source.stencilFunc; - this.stencilRef = source.stencilRef; - this.stencilFuncMask = source.stencilFuncMask; - this.stencilFail = source.stencilFail; - this.stencilZFail = source.stencilZFail; - this.stencilZPass = source.stencilZPass; - this.stencilWrite = source.stencilWrite; - - const srcPlanes = source.clippingPlanes; - let dstPlanes = null; - - if ( srcPlanes !== null ) { - - const n = srcPlanes.length; - dstPlanes = new Array( n ); - - for ( let i = 0; i !== n; ++ i ) { - - dstPlanes[ i ] = srcPlanes[ i ].clone(); - - } - - } - - this.clippingPlanes = dstPlanes; - this.clipIntersection = source.clipIntersection; - this.clipShadows = source.clipShadows; - - this.shadowSide = source.shadowSide; - - this.colorWrite = source.colorWrite; - - this.precision = source.precision; - - this.polygonOffset = source.polygonOffset; - this.polygonOffsetFactor = source.polygonOffsetFactor; - this.polygonOffsetUnits = source.polygonOffsetUnits; - - this.dithering = source.dithering; - - this.alphaTest = source.alphaTest; - this.alphaToCoverage = source.alphaToCoverage; - this.premultipliedAlpha = source.premultipliedAlpha; - - this.visible = source.visible; - - this.toneMapped = source.toneMapped; - - this.userData = JSON.parse( JSON.stringify( source.userData ) ); - - return this; - - } - - dispose() { - - this.dispatchEvent( { type: 'dispose' } ); - - } - - set needsUpdate( value ) { - - if ( value === true ) this.version ++; - - } - -} - -Material.prototype.isMaterial = true; - -const _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF, - 'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2, - 'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50, - 'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B, - 'darkgoldenrod': 0xB8860B, 'darkgray': 0xA9A9A9, 'darkgreen': 0x006400, 'darkgrey': 0xA9A9A9, 'darkkhaki': 0xBDB76B, 'darkmagenta': 0x8B008B, - 'darkolivegreen': 0x556B2F, 'darkorange': 0xFF8C00, 'darkorchid': 0x9932CC, 'darkred': 0x8B0000, 'darksalmon': 0xE9967A, 'darkseagreen': 0x8FBC8F, - 'darkslateblue': 0x483D8B, 'darkslategray': 0x2F4F4F, 'darkslategrey': 0x2F4F4F, 'darkturquoise': 0x00CED1, 'darkviolet': 0x9400D3, - 'deeppink': 0xFF1493, 'deepskyblue': 0x00BFFF, 'dimgray': 0x696969, 'dimgrey': 0x696969, 'dodgerblue': 0x1E90FF, 'firebrick': 0xB22222, - 'floralwhite': 0xFFFAF0, 'forestgreen': 0x228B22, 'fuchsia': 0xFF00FF, 'gainsboro': 0xDCDCDC, 'ghostwhite': 0xF8F8FF, 'gold': 0xFFD700, - 'goldenrod': 0xDAA520, 'gray': 0x808080, 'green': 0x008000, 'greenyellow': 0xADFF2F, 'grey': 0x808080, 'honeydew': 0xF0FFF0, 'hotpink': 0xFF69B4, - 'indianred': 0xCD5C5C, 'indigo': 0x4B0082, 'ivory': 0xFFFFF0, 'khaki': 0xF0E68C, 'lavender': 0xE6E6FA, 'lavenderblush': 0xFFF0F5, 'lawngreen': 0x7CFC00, - 'lemonchiffon': 0xFFFACD, 'lightblue': 0xADD8E6, 'lightcoral': 0xF08080, 'lightcyan': 0xE0FFFF, 'lightgoldenrodyellow': 0xFAFAD2, 'lightgray': 0xD3D3D3, - 'lightgreen': 0x90EE90, 'lightgrey': 0xD3D3D3, 'lightpink': 0xFFB6C1, 'lightsalmon': 0xFFA07A, 'lightseagreen': 0x20B2AA, 'lightskyblue': 0x87CEFA, - 'lightslategray': 0x778899, 'lightslategrey': 0x778899, 'lightsteelblue': 0xB0C4DE, 'lightyellow': 0xFFFFE0, 'lime': 0x00FF00, 'limegreen': 0x32CD32, - 'linen': 0xFAF0E6, 'magenta': 0xFF00FF, 'maroon': 0x800000, 'mediumaquamarine': 0x66CDAA, 'mediumblue': 0x0000CD, 'mediumorchid': 0xBA55D3, - 'mediumpurple': 0x9370DB, 'mediumseagreen': 0x3CB371, 'mediumslateblue': 0x7B68EE, 'mediumspringgreen': 0x00FA9A, 'mediumturquoise': 0x48D1CC, - 'mediumvioletred': 0xC71585, 'midnightblue': 0x191970, 'mintcream': 0xF5FFFA, 'mistyrose': 0xFFE4E1, 'moccasin': 0xFFE4B5, 'navajowhite': 0xFFDEAD, - 'navy': 0x000080, 'oldlace': 0xFDF5E6, 'olive': 0x808000, 'olivedrab': 0x6B8E23, 'orange': 0xFFA500, 'orangered': 0xFF4500, 'orchid': 0xDA70D6, - 'palegoldenrod': 0xEEE8AA, 'palegreen': 0x98FB98, 'paleturquoise': 0xAFEEEE, 'palevioletred': 0xDB7093, 'papayawhip': 0xFFEFD5, 'peachpuff': 0xFFDAB9, - 'peru': 0xCD853F, 'pink': 0xFFC0CB, 'plum': 0xDDA0DD, 'powderblue': 0xB0E0E6, 'purple': 0x800080, 'rebeccapurple': 0x663399, 'red': 0xFF0000, 'rosybrown': 0xBC8F8F, - 'royalblue': 0x4169E1, 'saddlebrown': 0x8B4513, 'salmon': 0xFA8072, 'sandybrown': 0xF4A460, 'seagreen': 0x2E8B57, 'seashell': 0xFFF5EE, - 'sienna': 0xA0522D, 'silver': 0xC0C0C0, 'skyblue': 0x87CEEB, 'slateblue': 0x6A5ACD, 'slategray': 0x708090, 'slategrey': 0x708090, 'snow': 0xFFFAFA, - 'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0, - 'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 }; - -const _hslA = { h: 0, s: 0, l: 0 }; -const _hslB = { h: 0, s: 0, l: 0 }; - -function hue2rgb( p, q, t ) { - - if ( t < 0 ) t += 1; - if ( t > 1 ) t -= 1; - if ( t < 1 / 6 ) return p + ( q - p ) * 6 * t; - if ( t < 1 / 2 ) return q; - if ( t < 2 / 3 ) return p + ( q - p ) * 6 * ( 2 / 3 - t ); - return p; - -} - -function SRGBToLinear( c ) { - - return ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 ); - -} - -function LinearToSRGB( c ) { - - return ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055; - -} - -class Color { - - constructor( r, g, b ) { - - if ( g === undefined && b === undefined ) { - - // r is THREE.Color, hex or string - return this.set( r ); - - } - - return this.setRGB( r, g, b ); - - } - - set( value ) { - - if ( value && value.isColor ) { - - this.copy( value ); - - } else if ( typeof value === 'number' ) { - - this.setHex( value ); - - } else if ( typeof value === 'string' ) { - - this.setStyle( value ); - - } - - return this; - - } - - setScalar( scalar ) { - - this.r = scalar; - this.g = scalar; - this.b = scalar; - - return this; - - } - - setHex( hex ) { - - hex = Math.floor( hex ); - - this.r = ( hex >> 16 & 255 ) / 255; - this.g = ( hex >> 8 & 255 ) / 255; - this.b = ( hex & 255 ) / 255; - - return this; - - } - - setRGB( r, g, b ) { - - this.r = r; - this.g = g; - this.b = b; - - return this; - - } - - setHSL( h, s, l ) { - - // h,s,l ranges are in 0.0 - 1.0 - h = euclideanModulo( h, 1 ); - s = clamp( s, 0, 1 ); - l = clamp( l, 0, 1 ); - - if ( s === 0 ) { - - this.r = this.g = this.b = l; - - } else { - - const p = l <= 0.5 ? l * ( 1 + s ) : l + s - ( l * s ); - const q = ( 2 * l ) - p; - - this.r = hue2rgb( q, p, h + 1 / 3 ); - this.g = hue2rgb( q, p, h ); - this.b = hue2rgb( q, p, h - 1 / 3 ); - - } - - return this; - - } - - setStyle( style ) { - - function handleAlpha( string ) { - - if ( string === undefined ) return; - - if ( parseFloat( string ) < 1 ) { - - console.warn( 'THREE.Color: Alpha component of ' + style + ' will be ignored.' ); - - } - - } - - - let m; - - if ( m = /^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec( style ) ) { - - // rgb / hsl - - let color; - const name = m[ 1 ]; - const components = m[ 2 ]; - - switch ( name ) { - - case 'rgb': - case 'rgba': - - if ( color = /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { - - // rgb(255,0,0) rgba(255,0,0,0.5) - this.r = Math.min( 255, parseInt( color[ 1 ], 10 ) ) / 255; - this.g = Math.min( 255, parseInt( color[ 2 ], 10 ) ) / 255; - this.b = Math.min( 255, parseInt( color[ 3 ], 10 ) ) / 255; - - handleAlpha( color[ 4 ] ); - - return this; - - } - - if ( color = /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { - - // rgb(100%,0%,0%) rgba(100%,0%,0%,0.5) - this.r = Math.min( 100, parseInt( color[ 1 ], 10 ) ) / 100; - this.g = Math.min( 100, parseInt( color[ 2 ], 10 ) ) / 100; - this.b = Math.min( 100, parseInt( color[ 3 ], 10 ) ) / 100; - - handleAlpha( color[ 4 ] ); - - return this; - - } - - break; - - case 'hsl': - case 'hsla': - - if ( color = /^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) { - - // hsl(120,50%,50%) hsla(120,50%,50%,0.5) - const h = parseFloat( color[ 1 ] ) / 360; - const s = parseInt( color[ 2 ], 10 ) / 100; - const l = parseInt( color[ 3 ], 10 ) / 100; - - handleAlpha( color[ 4 ] ); - - return this.setHSL( h, s, l ); - - } - - break; - - } - - } else if ( m = /^\#([A-Fa-f\d]+)$/.exec( style ) ) { - - // hex color - - const hex = m[ 1 ]; - const size = hex.length; - - if ( size === 3 ) { - - // #ff0 - this.r = parseInt( hex.charAt( 0 ) + hex.charAt( 0 ), 16 ) / 255; - this.g = parseInt( hex.charAt( 1 ) + hex.charAt( 1 ), 16 ) / 255; - this.b = parseInt( hex.charAt( 2 ) + hex.charAt( 2 ), 16 ) / 255; - - return this; - - } else if ( size === 6 ) { - - // #ff0000 - this.r = parseInt( hex.charAt( 0 ) + hex.charAt( 1 ), 16 ) / 255; - this.g = parseInt( hex.charAt( 2 ) + hex.charAt( 3 ), 16 ) / 255; - this.b = parseInt( hex.charAt( 4 ) + hex.charAt( 5 ), 16 ) / 255; - - return this; - - } - - } - - if ( style && style.length > 0 ) { - - return this.setColorName( style ); - - } - - return this; - - } - - setColorName( style ) { - - // color keywords - const hex = _colorKeywords[ style.toLowerCase() ]; - - if ( hex !== undefined ) { - - // red - this.setHex( hex ); - - } else { - - // unknown color - console.warn( 'THREE.Color: Unknown color ' + style ); - - } - - return this; - - } - - clone() { - - return new this.constructor( this.r, this.g, this.b ); - - } - - copy( color ) { - - this.r = color.r; - this.g = color.g; - this.b = color.b; - - return this; - - } - - copyGammaToLinear( color, gammaFactor = 2.0 ) { - - this.r = Math.pow( color.r, gammaFactor ); - this.g = Math.pow( color.g, gammaFactor ); - this.b = Math.pow( color.b, gammaFactor ); - - return this; - - } - - copyLinearToGamma( color, gammaFactor = 2.0 ) { - - const safeInverse = ( gammaFactor > 0 ) ? ( 1.0 / gammaFactor ) : 1.0; - - this.r = Math.pow( color.r, safeInverse ); - this.g = Math.pow( color.g, safeInverse ); - this.b = Math.pow( color.b, safeInverse ); - - return this; - - } - - convertGammaToLinear( gammaFactor ) { - - this.copyGammaToLinear( this, gammaFactor ); - - return this; - - } - - convertLinearToGamma( gammaFactor ) { - - this.copyLinearToGamma( this, gammaFactor ); - - return this; - - } - - copySRGBToLinear( color ) { - - this.r = SRGBToLinear( color.r ); - this.g = SRGBToLinear( color.g ); - this.b = SRGBToLinear( color.b ); - - return this; - - } - - copyLinearToSRGB( color ) { - - this.r = LinearToSRGB( color.r ); - this.g = LinearToSRGB( color.g ); - this.b = LinearToSRGB( color.b ); - - return this; - - } - - convertSRGBToLinear() { - - this.copySRGBToLinear( this ); - - return this; - - } - - convertLinearToSRGB() { - - this.copyLinearToSRGB( this ); - - return this; - - } - - getHex() { - - return ( this.r * 255 ) << 16 ^ ( this.g * 255 ) << 8 ^ ( this.b * 255 ) << 0; - - } - - getHexString() { - - return ( '000000' + this.getHex().toString( 16 ) ).slice( - 6 ); - - } - - getHSL( target ) { - - // h,s,l ranges are in 0.0 - 1.0 - - const r = this.r, g = this.g, b = this.b; - - const max = Math.max( r, g, b ); - const min = Math.min( r, g, b ); - - let hue, saturation; - const lightness = ( min + max ) / 2.0; - - if ( min === max ) { - - hue = 0; - saturation = 0; - - } else { - - const delta = max - min; - - saturation = lightness <= 0.5 ? delta / ( max + min ) : delta / ( 2 - max - min ); - - switch ( max ) { - - case r: hue = ( g - b ) / delta + ( g < b ? 6 : 0 ); break; - case g: hue = ( b - r ) / delta + 2; break; - case b: hue = ( r - g ) / delta + 4; break; - - } - - hue /= 6; - - } - - target.h = hue; - target.s = saturation; - target.l = lightness; - - return target; - - } - - getStyle() { - - return 'rgb(' + ( ( this.r * 255 ) | 0 ) + ',' + ( ( this.g * 255 ) | 0 ) + ',' + ( ( this.b * 255 ) | 0 ) + ')'; - - } - - offsetHSL( h, s, l ) { - - this.getHSL( _hslA ); - - _hslA.h += h; _hslA.s += s; _hslA.l += l; - - this.setHSL( _hslA.h, _hslA.s, _hslA.l ); - - return this; - - } - - add( color ) { - - this.r += color.r; - this.g += color.g; - this.b += color.b; - - return this; - - } - - addColors( color1, color2 ) { - - this.r = color1.r + color2.r; - this.g = color1.g + color2.g; - this.b = color1.b + color2.b; - - return this; - - } - - addScalar( s ) { - - this.r += s; - this.g += s; - this.b += s; - - return this; - - } - - sub( color ) { - - this.r = Math.max( 0, this.r - color.r ); - this.g = Math.max( 0, this.g - color.g ); - this.b = Math.max( 0, this.b - color.b ); - - return this; - - } - - multiply( color ) { - - this.r *= color.r; - this.g *= color.g; - this.b *= color.b; - - return this; - - } - - multiplyScalar( s ) { - - this.r *= s; - this.g *= s; - this.b *= s; - - return this; - - } - - lerp( color, alpha ) { - - this.r += ( color.r - this.r ) * alpha; - this.g += ( color.g - this.g ) * alpha; - this.b += ( color.b - this.b ) * alpha; - - return this; - - } - - lerpColors( color1, color2, alpha ) { - - this.r = color1.r + ( color2.r - color1.r ) * alpha; - this.g = color1.g + ( color2.g - color1.g ) * alpha; - this.b = color1.b + ( color2.b - color1.b ) * alpha; - - return this; - - } - - lerpHSL( color, alpha ) { - - this.getHSL( _hslA ); - color.getHSL( _hslB ); - - const h = lerp( _hslA.h, _hslB.h, alpha ); - const s = lerp( _hslA.s, _hslB.s, alpha ); - const l = lerp( _hslA.l, _hslB.l, alpha ); - - this.setHSL( h, s, l ); - - return this; - - } - - equals( c ) { - - return ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b ); - - } - - fromArray( array, offset = 0 ) { - - this.r = array[ offset ]; - this.g = array[ offset + 1 ]; - this.b = array[ offset + 2 ]; - - return this; - - } - - toArray( array = [], offset = 0 ) { - - array[ offset ] = this.r; - array[ offset + 1 ] = this.g; - array[ offset + 2 ] = this.b; - - return array; - - } - - fromBufferAttribute( attribute, index ) { - - this.r = attribute.getX( index ); - this.g = attribute.getY( index ); - this.b = attribute.getZ( index ); - - if ( attribute.normalized === true ) { - - // assuming Uint8Array - - this.r /= 255; - this.g /= 255; - this.b /= 255; - - } - - return this; - - } - - toJSON() { - - return this.getHex(); - - } - -} - -Color.NAMES = _colorKeywords; - -Color.prototype.isColor = true; -Color.prototype.r = 1; -Color.prototype.g = 1; -Color.prototype.b = 1; - -/** - * parameters = { - * color: , - * opacity: , - * map: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * specularMap: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ), - * combine: THREE.Multiply, - * reflectivity: , - * refractionRatio: , - * - * depthTest: , - * depthWrite: , - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: - * } - */ - -class MeshBasicMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'MeshBasicMaterial'; - - this.color = new Color( 0xffffff ); // emissive - - this.map = null; - - this.lightMap = null; - this.lightMapIntensity = 1.0; - - this.aoMap = null; - this.aoMapIntensity = 1.0; - - this.specularMap = null; - - this.alphaMap = null; - - this.envMap = null; - this.combine = MultiplyOperation; - this.reflectivity = 1; - this.refractionRatio = 0.98; - - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - - this.morphTargets = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - - this.map = source.map; - - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - - this.specularMap = source.specularMap; - - this.alphaMap = source.alphaMap; - - this.envMap = source.envMap; - this.combine = source.combine; - this.reflectivity = source.reflectivity; - this.refractionRatio = source.refractionRatio; - - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - - this.morphTargets = source.morphTargets; - - return this; - - } - -} - -MeshBasicMaterial.prototype.isMeshBasicMaterial = true; - -const _vector$9 = /*@__PURE__*/ new Vector3(); -const _vector2$1 = /*@__PURE__*/ new Vector2(); - -class BufferAttribute { - - constructor( array, itemSize, normalized ) { - - if ( Array.isArray( array ) ) { - - throw new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' ); - - } - - this.name = ''; - - this.array = array; - this.itemSize = itemSize; - this.count = array !== undefined ? array.length / itemSize : 0; - this.normalized = normalized === true; - - this.usage = StaticDrawUsage; - this.updateRange = { offset: 0, count: - 1 }; - - this.version = 0; - - } - - onUploadCallback() {} - - set needsUpdate( value ) { - - if ( value === true ) this.version ++; - - } - - setUsage( value ) { - - this.usage = value; - - return this; - - } - - copy( source ) { - - this.name = source.name; - this.array = new source.array.constructor( source.array ); - this.itemSize = source.itemSize; - this.count = source.count; - this.normalized = source.normalized; - - this.usage = source.usage; - - return this; - - } - - copyAt( index1, attribute, index2 ) { - - index1 *= this.itemSize; - index2 *= attribute.itemSize; - - for ( let i = 0, l = this.itemSize; i < l; i ++ ) { - - this.array[ index1 + i ] = attribute.array[ index2 + i ]; - - } - - return this; - - } - - copyArray( array ) { - - this.array.set( array ); - - return this; - - } - - copyColorsArray( colors ) { - - const array = this.array; - let offset = 0; - - for ( let i = 0, l = colors.length; i < l; i ++ ) { - - let color = colors[ i ]; - - if ( color === undefined ) { - - console.warn( 'THREE.BufferAttribute.copyColorsArray(): color is undefined', i ); - color = new Color(); - - } - - array[ offset ++ ] = color.r; - array[ offset ++ ] = color.g; - array[ offset ++ ] = color.b; - - } - - return this; - - } - - copyVector2sArray( vectors ) { - - const array = this.array; - let offset = 0; - - for ( let i = 0, l = vectors.length; i < l; i ++ ) { - - let vector = vectors[ i ]; - - if ( vector === undefined ) { - - console.warn( 'THREE.BufferAttribute.copyVector2sArray(): vector is undefined', i ); - vector = new Vector2(); - - } - - array[ offset ++ ] = vector.x; - array[ offset ++ ] = vector.y; - - } - - return this; - - } - - copyVector3sArray( vectors ) { - - const array = this.array; - let offset = 0; - - for ( let i = 0, l = vectors.length; i < l; i ++ ) { - - let vector = vectors[ i ]; - - if ( vector === undefined ) { - - console.warn( 'THREE.BufferAttribute.copyVector3sArray(): vector is undefined', i ); - vector = new Vector3(); - - } - - array[ offset ++ ] = vector.x; - array[ offset ++ ] = vector.y; - array[ offset ++ ] = vector.z; - - } - - return this; - - } - - copyVector4sArray( vectors ) { - - const array = this.array; - let offset = 0; - - for ( let i = 0, l = vectors.length; i < l; i ++ ) { - - let vector = vectors[ i ]; - - if ( vector === undefined ) { - - console.warn( 'THREE.BufferAttribute.copyVector4sArray(): vector is undefined', i ); - vector = new Vector4(); - - } - - array[ offset ++ ] = vector.x; - array[ offset ++ ] = vector.y; - array[ offset ++ ] = vector.z; - array[ offset ++ ] = vector.w; - - } - - return this; - - } - - applyMatrix3( m ) { - - if ( this.itemSize === 2 ) { - - for ( let i = 0, l = this.count; i < l; i ++ ) { - - _vector2$1.fromBufferAttribute( this, i ); - _vector2$1.applyMatrix3( m ); - - this.setXY( i, _vector2$1.x, _vector2$1.y ); - - } - - } else if ( this.itemSize === 3 ) { - - for ( let i = 0, l = this.count; i < l; i ++ ) { - - _vector$9.fromBufferAttribute( this, i ); - _vector$9.applyMatrix3( m ); - - this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); - - } - - } - - return this; - - } - - applyMatrix4( m ) { - - for ( let i = 0, l = this.count; i < l; i ++ ) { - - _vector$9.x = this.getX( i ); - _vector$9.y = this.getY( i ); - _vector$9.z = this.getZ( i ); - - _vector$9.applyMatrix4( m ); - - this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); - - } - - return this; - - } - - applyNormalMatrix( m ) { - - for ( let i = 0, l = this.count; i < l; i ++ ) { - - _vector$9.x = this.getX( i ); - _vector$9.y = this.getY( i ); - _vector$9.z = this.getZ( i ); - - _vector$9.applyNormalMatrix( m ); - - this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); - - } - - return this; - - } - - transformDirection( m ) { - - for ( let i = 0, l = this.count; i < l; i ++ ) { - - _vector$9.x = this.getX( i ); - _vector$9.y = this.getY( i ); - _vector$9.z = this.getZ( i ); - - _vector$9.transformDirection( m ); - - this.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z ); - - } - - return this; - - } - - set( value, offset = 0 ) { - - this.array.set( value, offset ); - - return this; - - } - - getX( index ) { - - return this.array[ index * this.itemSize ]; - - } - - setX( index, x ) { - - this.array[ index * this.itemSize ] = x; - - return this; - - } - - getY( index ) { - - return this.array[ index * this.itemSize + 1 ]; - - } - - setY( index, y ) { - - this.array[ index * this.itemSize + 1 ] = y; - - return this; - - } - - getZ( index ) { - - return this.array[ index * this.itemSize + 2 ]; - - } - - setZ( index, z ) { - - this.array[ index * this.itemSize + 2 ] = z; - - return this; - - } - - getW( index ) { - - return this.array[ index * this.itemSize + 3 ]; - - } - - setW( index, w ) { - - this.array[ index * this.itemSize + 3 ] = w; - - return this; - - } - - setXY( index, x, y ) { - - index *= this.itemSize; - - this.array[ index + 0 ] = x; - this.array[ index + 1 ] = y; - - return this; - - } - - setXYZ( index, x, y, z ) { - - index *= this.itemSize; - - this.array[ index + 0 ] = x; - this.array[ index + 1 ] = y; - this.array[ index + 2 ] = z; - - return this; - - } - - setXYZW( index, x, y, z, w ) { - - index *= this.itemSize; - - this.array[ index + 0 ] = x; - this.array[ index + 1 ] = y; - this.array[ index + 2 ] = z; - this.array[ index + 3 ] = w; - - return this; - - } - - onUpload( callback ) { - - this.onUploadCallback = callback; - - return this; - - } - - clone() { - - return new this.constructor( this.array, this.itemSize ).copy( this ); - - } - - toJSON() { - - const data = { - itemSize: this.itemSize, - type: this.array.constructor.name, - array: Array.prototype.slice.call( this.array ), - normalized: this.normalized - }; - - if ( this.name !== '' ) data.name = this.name; - if ( this.usage !== StaticDrawUsage ) data.usage = this.usage; - if ( this.updateRange.offset !== 0 || this.updateRange.count !== - 1 ) data.updateRange = this.updateRange; - - return data; - - } - -} - -BufferAttribute.prototype.isBufferAttribute = true; - -// - -class Int8BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Int8Array( array ), itemSize, normalized ); - - } - -} - -class Uint8BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Uint8Array( array ), itemSize, normalized ); - - } - -} - -class Uint8ClampedBufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Uint8ClampedArray( array ), itemSize, normalized ); - - } - -} - -class Int16BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Int16Array( array ), itemSize, normalized ); - - } - -} - -class Uint16BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Uint16Array( array ), itemSize, normalized ); - - } - -} - -class Int32BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Int32Array( array ), itemSize, normalized ); - - } - -} - -class Uint32BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Uint32Array( array ), itemSize, normalized ); - - } - -} - -class Float16BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Uint16Array( array ), itemSize, normalized ); - - } - -} - -Float16BufferAttribute.prototype.isFloat16BufferAttribute = true; - -class Float32BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Float32Array( array ), itemSize, normalized ); - - } - -} - -class Float64BufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized ) { - - super( new Float64Array( array ), itemSize, normalized ); - - } - -} - -function arrayMax( array ) { - - if ( array.length === 0 ) return - Infinity; - - let max = array[ 0 ]; - - for ( let i = 1, l = array.length; i < l; ++ i ) { - - if ( array[ i ] > max ) max = array[ i ]; - - } - - return max; - -} - -const TYPED_ARRAYS = { - Int8Array: Int8Array, - Uint8Array: Uint8Array, - Uint8ClampedArray: Uint8ClampedArray, - Int16Array: Int16Array, - Uint16Array: Uint16Array, - Int32Array: Int32Array, - Uint32Array: Uint32Array, - Float32Array: Float32Array, - Float64Array: Float64Array -}; - -function getTypedArray( type, buffer ) { - - return new TYPED_ARRAYS[ type ]( buffer ); - -} - -let _id = 0; - -const _m1 = /*@__PURE__*/ new Matrix4(); -const _obj = /*@__PURE__*/ new Object3D(); -const _offset = /*@__PURE__*/ new Vector3(); -const _box$1 = /*@__PURE__*/ new Box3(); -const _boxMorphTargets = /*@__PURE__*/ new Box3(); -const _vector$8 = /*@__PURE__*/ new Vector3(); - -class BufferGeometry extends EventDispatcher { - - constructor() { - - super(); - - Object.defineProperty( this, 'id', { value: _id ++ } ); - - this.uuid = generateUUID(); - - this.name = ''; - this.type = 'BufferGeometry'; - - this.index = null; - this.attributes = {}; - - this.morphAttributes = {}; - this.morphTargetsRelative = false; - - this.groups = []; - - this.boundingBox = null; - this.boundingSphere = null; - - this.drawRange = { start: 0, count: Infinity }; - - this.userData = {}; - - } - - getIndex() { - - return this.index; - - } - - setIndex( index ) { - - if ( Array.isArray( index ) ) { - - this.index = new ( arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 ); - - } else { - - this.index = index; - - } - - return this; - - } - - getAttribute( name ) { - - return this.attributes[ name ]; - - } - - setAttribute( name, attribute ) { - - this.attributes[ name ] = attribute; - - return this; - - } - - deleteAttribute( name ) { - - delete this.attributes[ name ]; - - return this; - - } - - hasAttribute( name ) { - - return this.attributes[ name ] !== undefined; - - } - - addGroup( start, count, materialIndex = 0 ) { - - this.groups.push( { - - start: start, - count: count, - materialIndex: materialIndex - - } ); - - } - - clearGroups() { - - this.groups = []; - - } - - setDrawRange( start, count ) { - - this.drawRange.start = start; - this.drawRange.count = count; - - } - - applyMatrix4( matrix ) { - - const position = this.attributes.position; - - if ( position !== undefined ) { - - position.applyMatrix4( matrix ); - - position.needsUpdate = true; - - } - - const normal = this.attributes.normal; - - if ( normal !== undefined ) { - - const normalMatrix = new Matrix3().getNormalMatrix( matrix ); - - normal.applyNormalMatrix( normalMatrix ); - - normal.needsUpdate = true; - - } - - const tangent = this.attributes.tangent; - - if ( tangent !== undefined ) { - - tangent.transformDirection( matrix ); - - tangent.needsUpdate = true; - - } - - if ( this.boundingBox !== null ) { - - this.computeBoundingBox(); - - } - - if ( this.boundingSphere !== null ) { - - this.computeBoundingSphere(); - - } - - return this; - - } - - applyQuaternion( q ) { - - _m1.makeRotationFromQuaternion( q ); - - this.applyMatrix4( _m1 ); - - return this; - - } - - rotateX( angle ) { - - // rotate geometry around world x-axis - - _m1.makeRotationX( angle ); - - this.applyMatrix4( _m1 ); - - return this; - - } - - rotateY( angle ) { - - // rotate geometry around world y-axis - - _m1.makeRotationY( angle ); - - this.applyMatrix4( _m1 ); - - return this; - - } - - rotateZ( angle ) { - - // rotate geometry around world z-axis - - _m1.makeRotationZ( angle ); - - this.applyMatrix4( _m1 ); - - return this; - - } - - translate( x, y, z ) { - - // translate geometry - - _m1.makeTranslation( x, y, z ); - - this.applyMatrix4( _m1 ); - - return this; - - } - - scale( x, y, z ) { - - // scale geometry - - _m1.makeScale( x, y, z ); - - this.applyMatrix4( _m1 ); - - return this; - - } - - lookAt( vector ) { - - _obj.lookAt( vector ); - - _obj.updateMatrix(); - - this.applyMatrix4( _obj.matrix ); - - return this; - - } - - center() { - - this.computeBoundingBox(); - - this.boundingBox.getCenter( _offset ).negate(); - - this.translate( _offset.x, _offset.y, _offset.z ); - - return this; - - } - - setFromPoints( points ) { - - const position = []; - - for ( let i = 0, l = points.length; i < l; i ++ ) { - - const point = points[ i ]; - position.push( point.x, point.y, point.z || 0 ); - - } - - this.setAttribute( 'position', new Float32BufferAttribute( position, 3 ) ); - - return this; - - } - - computeBoundingBox() { - - if ( this.boundingBox === null ) { - - this.boundingBox = new Box3(); - - } - - const position = this.attributes.position; - const morphAttributesPosition = this.morphAttributes.position; - - if ( position && position.isGLBufferAttribute ) { - - console.error( 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".', this ); - - this.boundingBox.set( - new Vector3( - Infinity, - Infinity, - Infinity ), - new Vector3( + Infinity, + Infinity, + Infinity ) - ); - - return; - - } - - if ( position !== undefined ) { - - this.boundingBox.setFromBufferAttribute( position ); - - // process morph attributes if present - - if ( morphAttributesPosition ) { - - for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { - - const morphAttribute = morphAttributesPosition[ i ]; - _box$1.setFromBufferAttribute( morphAttribute ); - - if ( this.morphTargetsRelative ) { - - _vector$8.addVectors( this.boundingBox.min, _box$1.min ); - this.boundingBox.expandByPoint( _vector$8 ); - - _vector$8.addVectors( this.boundingBox.max, _box$1.max ); - this.boundingBox.expandByPoint( _vector$8 ); - - } else { - - this.boundingBox.expandByPoint( _box$1.min ); - this.boundingBox.expandByPoint( _box$1.max ); - - } - - } - - } - - } else { - - this.boundingBox.makeEmpty(); - - } - - if ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) { - - console.error( 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.', this ); - - } - - } - - computeBoundingSphere() { - - if ( this.boundingSphere === null ) { - - this.boundingSphere = new Sphere(); - - } - - const position = this.attributes.position; - const morphAttributesPosition = this.morphAttributes.position; - - if ( position && position.isGLBufferAttribute ) { - - console.error( 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".', this ); - - this.boundingSphere.set( new Vector3(), Infinity ); - - return; - - } - - if ( position ) { - - // first, find the center of the bounding sphere - - const center = this.boundingSphere.center; - - _box$1.setFromBufferAttribute( position ); - - // process morph attributes if present - - if ( morphAttributesPosition ) { - - for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { - - const morphAttribute = morphAttributesPosition[ i ]; - _boxMorphTargets.setFromBufferAttribute( morphAttribute ); - - if ( this.morphTargetsRelative ) { - - _vector$8.addVectors( _box$1.min, _boxMorphTargets.min ); - _box$1.expandByPoint( _vector$8 ); - - _vector$8.addVectors( _box$1.max, _boxMorphTargets.max ); - _box$1.expandByPoint( _vector$8 ); - - } else { - - _box$1.expandByPoint( _boxMorphTargets.min ); - _box$1.expandByPoint( _boxMorphTargets.max ); - - } - - } - - } - - _box$1.getCenter( center ); - - // second, try to find a boundingSphere with a radius smaller than the - // boundingSphere of the boundingBox: sqrt(3) smaller in the best case - - let maxRadiusSq = 0; - - for ( let i = 0, il = position.count; i < il; i ++ ) { - - _vector$8.fromBufferAttribute( position, i ); - - maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) ); - - } - - // process morph attributes if present - - if ( morphAttributesPosition ) { - - for ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) { - - const morphAttribute = morphAttributesPosition[ i ]; - const morphTargetsRelative = this.morphTargetsRelative; - - for ( let j = 0, jl = morphAttribute.count; j < jl; j ++ ) { - - _vector$8.fromBufferAttribute( morphAttribute, j ); - - if ( morphTargetsRelative ) { - - _offset.fromBufferAttribute( position, j ); - _vector$8.add( _offset ); - - } - - maxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) ); - - } - - } - - } - - this.boundingSphere.radius = Math.sqrt( maxRadiusSq ); - - if ( isNaN( this.boundingSphere.radius ) ) { - - console.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this ); - - } - - } - - } - - computeFaceNormals() { - - // backwards compatibility - - } - - computeTangents() { - - const index = this.index; - const attributes = this.attributes; - - // based on http://www.terathon.com/code/tangent.html - // (per vertex tangents) - - if ( index === null || - attributes.position === undefined || - attributes.normal === undefined || - attributes.uv === undefined ) { - - console.error( 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' ); - return; - - } - - const indices = index.array; - const positions = attributes.position.array; - const normals = attributes.normal.array; - const uvs = attributes.uv.array; - - const nVertices = positions.length / 3; - - if ( attributes.tangent === undefined ) { - - this.setAttribute( 'tangent', new BufferAttribute( new Float32Array( 4 * nVertices ), 4 ) ); - - } - - const tangents = attributes.tangent.array; - - const tan1 = [], tan2 = []; - - for ( let i = 0; i < nVertices; i ++ ) { - - tan1[ i ] = new Vector3(); - tan2[ i ] = new Vector3(); - - } - - const vA = new Vector3(), - vB = new Vector3(), - vC = new Vector3(), - - uvA = new Vector2(), - uvB = new Vector2(), - uvC = new Vector2(), - - sdir = new Vector3(), - tdir = new Vector3(); - - function handleTriangle( a, b, c ) { - - vA.fromArray( positions, a * 3 ); - vB.fromArray( positions, b * 3 ); - vC.fromArray( positions, c * 3 ); - - uvA.fromArray( uvs, a * 2 ); - uvB.fromArray( uvs, b * 2 ); - uvC.fromArray( uvs, c * 2 ); - - vB.sub( vA ); - vC.sub( vA ); - - uvB.sub( uvA ); - uvC.sub( uvA ); - - const r = 1.0 / ( uvB.x * uvC.y - uvC.x * uvB.y ); - - // silently ignore degenerate uv triangles having coincident or colinear vertices - - if ( ! isFinite( r ) ) return; - - sdir.copy( vB ).multiplyScalar( uvC.y ).addScaledVector( vC, - uvB.y ).multiplyScalar( r ); - tdir.copy( vC ).multiplyScalar( uvB.x ).addScaledVector( vB, - uvC.x ).multiplyScalar( r ); - - tan1[ a ].add( sdir ); - tan1[ b ].add( sdir ); - tan1[ c ].add( sdir ); - - tan2[ a ].add( tdir ); - tan2[ b ].add( tdir ); - tan2[ c ].add( tdir ); - - } - - let groups = this.groups; - - if ( groups.length === 0 ) { - - groups = [ { - start: 0, - count: indices.length - } ]; - - } - - for ( let i = 0, il = groups.length; i < il; ++ i ) { - - const group = groups[ i ]; - - const start = group.start; - const count = group.count; - - for ( let j = start, jl = start + count; j < jl; j += 3 ) { - - handleTriangle( - indices[ j + 0 ], - indices[ j + 1 ], - indices[ j + 2 ] - ); - - } - - } - - const tmp = new Vector3(), tmp2 = new Vector3(); - const n = new Vector3(), n2 = new Vector3(); - - function handleVertex( v ) { - - n.fromArray( normals, v * 3 ); - n2.copy( n ); - - const t = tan1[ v ]; - - // Gram-Schmidt orthogonalize - - tmp.copy( t ); - tmp.sub( n.multiplyScalar( n.dot( t ) ) ).normalize(); - - // Calculate handedness - - tmp2.crossVectors( n2, t ); - const test = tmp2.dot( tan2[ v ] ); - const w = ( test < 0.0 ) ? - 1.0 : 1.0; - - tangents[ v * 4 ] = tmp.x; - tangents[ v * 4 + 1 ] = tmp.y; - tangents[ v * 4 + 2 ] = tmp.z; - tangents[ v * 4 + 3 ] = w; - - } - - for ( let i = 0, il = groups.length; i < il; ++ i ) { - - const group = groups[ i ]; - - const start = group.start; - const count = group.count; - - for ( let j = start, jl = start + count; j < jl; j += 3 ) { - - handleVertex( indices[ j + 0 ] ); - handleVertex( indices[ j + 1 ] ); - handleVertex( indices[ j + 2 ] ); - - } - - } - - } - - computeVertexNormals() { - - const index = this.index; - const positionAttribute = this.getAttribute( 'position' ); - - if ( positionAttribute !== undefined ) { - - let normalAttribute = this.getAttribute( 'normal' ); - - if ( normalAttribute === undefined ) { - - normalAttribute = new BufferAttribute( new Float32Array( positionAttribute.count * 3 ), 3 ); - this.setAttribute( 'normal', normalAttribute ); - - } else { - - // reset existing normals to zero - - for ( let i = 0, il = normalAttribute.count; i < il; i ++ ) { - - normalAttribute.setXYZ( i, 0, 0, 0 ); - - } - - } - - const pA = new Vector3(), pB = new Vector3(), pC = new Vector3(); - const nA = new Vector3(), nB = new Vector3(), nC = new Vector3(); - const cb = new Vector3(), ab = new Vector3(); - - // indexed elements - - if ( index ) { - - for ( let i = 0, il = index.count; i < il; i += 3 ) { - - const vA = index.getX( i + 0 ); - const vB = index.getX( i + 1 ); - const vC = index.getX( i + 2 ); - - pA.fromBufferAttribute( positionAttribute, vA ); - pB.fromBufferAttribute( positionAttribute, vB ); - pC.fromBufferAttribute( positionAttribute, vC ); - - cb.subVectors( pC, pB ); - ab.subVectors( pA, pB ); - cb.cross( ab ); - - nA.fromBufferAttribute( normalAttribute, vA ); - nB.fromBufferAttribute( normalAttribute, vB ); - nC.fromBufferAttribute( normalAttribute, vC ); - - nA.add( cb ); - nB.add( cb ); - nC.add( cb ); - - normalAttribute.setXYZ( vA, nA.x, nA.y, nA.z ); - normalAttribute.setXYZ( vB, nB.x, nB.y, nB.z ); - normalAttribute.setXYZ( vC, nC.x, nC.y, nC.z ); - - } - - } else { - - // non-indexed elements (unconnected triangle soup) - - for ( let i = 0, il = positionAttribute.count; i < il; i += 3 ) { - - pA.fromBufferAttribute( positionAttribute, i + 0 ); - pB.fromBufferAttribute( positionAttribute, i + 1 ); - pC.fromBufferAttribute( positionAttribute, i + 2 ); - - cb.subVectors( pC, pB ); - ab.subVectors( pA, pB ); - cb.cross( ab ); - - normalAttribute.setXYZ( i + 0, cb.x, cb.y, cb.z ); - normalAttribute.setXYZ( i + 1, cb.x, cb.y, cb.z ); - normalAttribute.setXYZ( i + 2, cb.x, cb.y, cb.z ); - - } - - } - - this.normalizeNormals(); - - normalAttribute.needsUpdate = true; - - } - - } - - merge( geometry, offset ) { - - if ( ! ( geometry && geometry.isBufferGeometry ) ) { - - console.error( 'THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', geometry ); - return; - - } - - if ( offset === undefined ) { - - offset = 0; - - console.warn( - 'THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. ' - + 'Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge.' - ); - - } - - const attributes = this.attributes; - - for ( const key in attributes ) { - - if ( geometry.attributes[ key ] === undefined ) continue; - - const attribute1 = attributes[ key ]; - const attributeArray1 = attribute1.array; - - const attribute2 = geometry.attributes[ key ]; - const attributeArray2 = attribute2.array; - - const attributeOffset = attribute2.itemSize * offset; - const length = Math.min( attributeArray2.length, attributeArray1.length - attributeOffset ); - - for ( let i = 0, j = attributeOffset; i < length; i ++, j ++ ) { - - attributeArray1[ j ] = attributeArray2[ i ]; - - } - - } - - return this; - - } - - normalizeNormals() { - - const normals = this.attributes.normal; - - for ( let i = 0, il = normals.count; i < il; i ++ ) { - - _vector$8.fromBufferAttribute( normals, i ); - - _vector$8.normalize(); - - normals.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z ); - - } - - } - - toNonIndexed() { - - function convertBufferAttribute( attribute, indices ) { - - const array = attribute.array; - const itemSize = attribute.itemSize; - const normalized = attribute.normalized; - - const array2 = new array.constructor( indices.length * itemSize ); - - let index = 0, index2 = 0; - - for ( let i = 0, l = indices.length; i < l; i ++ ) { - - if ( attribute.isInterleavedBufferAttribute ) { - - index = indices[ i ] * attribute.data.stride + attribute.offset; - - } else { - - index = indices[ i ] * itemSize; - - } - - for ( let j = 0; j < itemSize; j ++ ) { - - array2[ index2 ++ ] = array[ index ++ ]; - - } - - } - - return new BufferAttribute( array2, itemSize, normalized ); - - } - - // - - if ( this.index === null ) { - - console.warn( 'THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' ); - return this; - - } - - const geometry2 = new BufferGeometry(); - - const indices = this.index.array; - const attributes = this.attributes; - - // attributes - - for ( const name in attributes ) { - - const attribute = attributes[ name ]; - - const newAttribute = convertBufferAttribute( attribute, indices ); - - geometry2.setAttribute( name, newAttribute ); - - } - - // morph attributes - - const morphAttributes = this.morphAttributes; - - for ( const name in morphAttributes ) { - - const morphArray = []; - const morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes - - for ( let i = 0, il = morphAttribute.length; i < il; i ++ ) { - - const attribute = morphAttribute[ i ]; - - const newAttribute = convertBufferAttribute( attribute, indices ); - - morphArray.push( newAttribute ); - - } - - geometry2.morphAttributes[ name ] = morphArray; - - } - - geometry2.morphTargetsRelative = this.morphTargetsRelative; - - // groups - - const groups = this.groups; - - for ( let i = 0, l = groups.length; i < l; i ++ ) { - - const group = groups[ i ]; - geometry2.addGroup( group.start, group.count, group.materialIndex ); - - } - - return geometry2; - - } - - toJSON() { - - const data = { - metadata: { - version: 4.5, - type: 'BufferGeometry', - generator: 'BufferGeometry.toJSON' - } - }; - - // standard BufferGeometry serialization - - data.uuid = this.uuid; - data.type = this.type; - if ( this.name !== '' ) data.name = this.name; - if ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData; - - if ( this.parameters !== undefined ) { - - const parameters = this.parameters; - - for ( const key in parameters ) { - - if ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ]; - - } - - return data; - - } - - // for simplicity the code assumes attributes are not shared across geometries, see #15811 - - data.data = { attributes: {} }; - - const index = this.index; - - if ( index !== null ) { - - data.data.index = { - type: index.array.constructor.name, - array: Array.prototype.slice.call( index.array ) - }; - - } - - const attributes = this.attributes; - - for ( const key in attributes ) { - - const attribute = attributes[ key ]; - - data.data.attributes[ key ] = attribute.toJSON( data.data ); - - } - - const morphAttributes = {}; - let hasMorphAttributes = false; - - for ( const key in this.morphAttributes ) { - - const attributeArray = this.morphAttributes[ key ]; - - const array = []; - - for ( let i = 0, il = attributeArray.length; i < il; i ++ ) { - - const attribute = attributeArray[ i ]; - - array.push( attribute.toJSON( data.data ) ); - - } - - if ( array.length > 0 ) { - - morphAttributes[ key ] = array; - - hasMorphAttributes = true; - - } - - } - - if ( hasMorphAttributes ) { - - data.data.morphAttributes = morphAttributes; - data.data.morphTargetsRelative = this.morphTargetsRelative; - - } - - const groups = this.groups; - - if ( groups.length > 0 ) { - - data.data.groups = JSON.parse( JSON.stringify( groups ) ); - - } - - const boundingSphere = this.boundingSphere; - - if ( boundingSphere !== null ) { - - data.data.boundingSphere = { - center: boundingSphere.center.toArray(), - radius: boundingSphere.radius - }; - - } - - return data; - - } - - clone() { - - /* - // Handle primitives - - const parameters = this.parameters; - - if ( parameters !== undefined ) { - - const values = []; - - for ( const key in parameters ) { - - values.push( parameters[ key ] ); - - } - - const geometry = Object.create( this.constructor.prototype ); - this.constructor.apply( geometry, values ); - return geometry; - - } - - return new this.constructor().copy( this ); - */ - - return new BufferGeometry().copy( this ); - - } - - copy( source ) { - - // reset - - this.index = null; - this.attributes = {}; - this.morphAttributes = {}; - this.groups = []; - this.boundingBox = null; - this.boundingSphere = null; - - // used for storing cloned, shared data - - const data = {}; - - // name - - this.name = source.name; - - // index - - const index = source.index; - - if ( index !== null ) { - - this.setIndex( index.clone( data ) ); - - } - - // attributes - - const attributes = source.attributes; - - for ( const name in attributes ) { - - const attribute = attributes[ name ]; - this.setAttribute( name, attribute.clone( data ) ); - - } - - // morph attributes - - const morphAttributes = source.morphAttributes; - - for ( const name in morphAttributes ) { - - const array = []; - const morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes - - for ( let i = 0, l = morphAttribute.length; i < l; i ++ ) { - - array.push( morphAttribute[ i ].clone( data ) ); - - } - - this.morphAttributes[ name ] = array; - - } - - this.morphTargetsRelative = source.morphTargetsRelative; - - // groups - - const groups = source.groups; - - for ( let i = 0, l = groups.length; i < l; i ++ ) { - - const group = groups[ i ]; - this.addGroup( group.start, group.count, group.materialIndex ); - - } - - // bounding box - - const boundingBox = source.boundingBox; - - if ( boundingBox !== null ) { - - this.boundingBox = boundingBox.clone(); - - } - - // bounding sphere - - const boundingSphere = source.boundingSphere; - - if ( boundingSphere !== null ) { - - this.boundingSphere = boundingSphere.clone(); - - } - - // draw range - - this.drawRange.start = source.drawRange.start; - this.drawRange.count = source.drawRange.count; - - // user data - - this.userData = source.userData; - - return this; - - } - - dispose() { - - this.dispatchEvent( { type: 'dispose' } ); - - } - -} - -BufferGeometry.prototype.isBufferGeometry = true; - -const _inverseMatrix$2 = /*@__PURE__*/ new Matrix4(); -const _ray$2 = /*@__PURE__*/ new Ray(); -const _sphere$3 = /*@__PURE__*/ new Sphere(); - -const _vA$1 = /*@__PURE__*/ new Vector3(); -const _vB$1 = /*@__PURE__*/ new Vector3(); -const _vC$1 = /*@__PURE__*/ new Vector3(); - -const _tempA = /*@__PURE__*/ new Vector3(); -const _tempB = /*@__PURE__*/ new Vector3(); -const _tempC = /*@__PURE__*/ new Vector3(); - -const _morphA = /*@__PURE__*/ new Vector3(); -const _morphB = /*@__PURE__*/ new Vector3(); -const _morphC = /*@__PURE__*/ new Vector3(); - -const _uvA$1 = /*@__PURE__*/ new Vector2(); -const _uvB$1 = /*@__PURE__*/ new Vector2(); -const _uvC$1 = /*@__PURE__*/ new Vector2(); - -const _intersectionPoint = /*@__PURE__*/ new Vector3(); -const _intersectionPointWorld = /*@__PURE__*/ new Vector3(); - -class Mesh extends Object3D { - - constructor( geometry = new BufferGeometry(), material = new MeshBasicMaterial() ) { - - super(); - - this.type = 'Mesh'; - - this.geometry = geometry; - this.material = material; - - this.updateMorphTargets(); - - } - - copy( source ) { - - super.copy( source ); - - if ( source.morphTargetInfluences !== undefined ) { - - this.morphTargetInfluences = source.morphTargetInfluences.slice(); - - } - - if ( source.morphTargetDictionary !== undefined ) { - - this.morphTargetDictionary = Object.assign( {}, source.morphTargetDictionary ); - - } - - this.material = source.material; - this.geometry = source.geometry; - - return this; - - } - - updateMorphTargets() { - - const geometry = this.geometry; - - if ( geometry.isBufferGeometry ) { - - const morphAttributes = geometry.morphAttributes; - const keys = Object.keys( morphAttributes ); - - if ( keys.length > 0 ) { - - const morphAttribute = morphAttributes[ keys[ 0 ] ]; - - if ( morphAttribute !== undefined ) { - - this.morphTargetInfluences = []; - this.morphTargetDictionary = {}; - - for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { - - const name = morphAttribute[ m ].name || String( m ); - - this.morphTargetInfluences.push( 0 ); - this.morphTargetDictionary[ name ] = m; - - } - - } - - } - - } else { - - const morphTargets = geometry.morphTargets; - - if ( morphTargets !== undefined && morphTargets.length > 0 ) { - - console.error( 'THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' ); - - } - - } - - } - - raycast( raycaster, intersects ) { - - const geometry = this.geometry; - const material = this.material; - const matrixWorld = this.matrixWorld; - - if ( material === undefined ) return; - - // Checking boundingSphere distance to ray - - if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); - - _sphere$3.copy( geometry.boundingSphere ); - _sphere$3.applyMatrix4( matrixWorld ); - - if ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return; - - // - - _inverseMatrix$2.copy( matrixWorld ).invert(); - _ray$2.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$2 ); - - // Check boundingBox before continuing - - if ( geometry.boundingBox !== null ) { - - if ( _ray$2.intersectsBox( geometry.boundingBox ) === false ) return; - - } - - let intersection; - - if ( geometry.isBufferGeometry ) { - - const index = geometry.index; - const position = geometry.attributes.position; - const morphPosition = geometry.morphAttributes.position; - const morphTargetsRelative = geometry.morphTargetsRelative; - const uv = geometry.attributes.uv; - const uv2 = geometry.attributes.uv2; - const groups = geometry.groups; - const drawRange = geometry.drawRange; - - if ( index !== null ) { - - // indexed buffer geometry - - if ( Array.isArray( material ) ) { - - for ( let i = 0, il = groups.length; i < il; i ++ ) { - - const group = groups[ i ]; - const groupMaterial = material[ group.materialIndex ]; - - const start = Math.max( group.start, drawRange.start ); - const end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ); - - for ( let j = start, jl = end; j < jl; j += 3 ) { - - const a = index.getX( j ); - const b = index.getX( j + 1 ); - const c = index.getX( j + 2 ); - - intersection = checkBufferGeometryIntersection( this, groupMaterial, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c ); - - if ( intersection ) { - - intersection.faceIndex = Math.floor( j / 3 ); // triangle number in indexed buffer semantics - intersection.face.materialIndex = group.materialIndex; - intersects.push( intersection ); - - } - - } - - } - - } else { - - const start = Math.max( 0, drawRange.start ); - const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); - - for ( let i = start, il = end; i < il; i += 3 ) { - - const a = index.getX( i ); - const b = index.getX( i + 1 ); - const c = index.getX( i + 2 ); - - intersection = checkBufferGeometryIntersection( this, material, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c ); - - if ( intersection ) { - - intersection.faceIndex = Math.floor( i / 3 ); // triangle number in indexed buffer semantics - intersects.push( intersection ); - - } - - } - - } - - } else if ( position !== undefined ) { - - // non-indexed buffer geometry - - if ( Array.isArray( material ) ) { - - for ( let i = 0, il = groups.length; i < il; i ++ ) { - - const group = groups[ i ]; - const groupMaterial = material[ group.materialIndex ]; - - const start = Math.max( group.start, drawRange.start ); - const end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) ); - - for ( let j = start, jl = end; j < jl; j += 3 ) { - - const a = j; - const b = j + 1; - const c = j + 2; - - intersection = checkBufferGeometryIntersection( this, groupMaterial, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c ); - - if ( intersection ) { - - intersection.faceIndex = Math.floor( j / 3 ); // triangle number in non-indexed buffer semantics - intersection.face.materialIndex = group.materialIndex; - intersects.push( intersection ); - - } - - } - - } - - } else { - - const start = Math.max( 0, drawRange.start ); - const end = Math.min( position.count, ( drawRange.start + drawRange.count ) ); - - for ( let i = start, il = end; i < il; i += 3 ) { - - const a = i; - const b = i + 1; - const c = i + 2; - - intersection = checkBufferGeometryIntersection( this, material, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c ); - - if ( intersection ) { - - intersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics - intersects.push( intersection ); - - } - - } - - } - - } - - } else if ( geometry.isGeometry ) { - - console.error( 'THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' ); - - } - - } - -} - -Mesh.prototype.isMesh = true; - -function checkIntersection( object, material, raycaster, ray, pA, pB, pC, point ) { - - let intersect; - - if ( material.side === BackSide ) { - - intersect = ray.intersectTriangle( pC, pB, pA, true, point ); - - } else { - - intersect = ray.intersectTriangle( pA, pB, pC, material.side !== DoubleSide, point ); - - } - - if ( intersect === null ) return null; - - _intersectionPointWorld.copy( point ); - _intersectionPointWorld.applyMatrix4( object.matrixWorld ); - - const distance = raycaster.ray.origin.distanceTo( _intersectionPointWorld ); - - if ( distance < raycaster.near || distance > raycaster.far ) return null; - - return { - distance: distance, - point: _intersectionPointWorld.clone(), - object: object - }; - -} - -function checkBufferGeometryIntersection( object, material, raycaster, ray, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c ) { - - _vA$1.fromBufferAttribute( position, a ); - _vB$1.fromBufferAttribute( position, b ); - _vC$1.fromBufferAttribute( position, c ); - - const morphInfluences = object.morphTargetInfluences; - - if ( material.morphTargets && morphPosition && morphInfluences ) { - - _morphA.set( 0, 0, 0 ); - _morphB.set( 0, 0, 0 ); - _morphC.set( 0, 0, 0 ); - - for ( let i = 0, il = morphPosition.length; i < il; i ++ ) { - - const influence = morphInfluences[ i ]; - const morphAttribute = morphPosition[ i ]; - - if ( influence === 0 ) continue; - - _tempA.fromBufferAttribute( morphAttribute, a ); - _tempB.fromBufferAttribute( morphAttribute, b ); - _tempC.fromBufferAttribute( morphAttribute, c ); - - if ( morphTargetsRelative ) { - - _morphA.addScaledVector( _tempA, influence ); - _morphB.addScaledVector( _tempB, influence ); - _morphC.addScaledVector( _tempC, influence ); - - } else { - - _morphA.addScaledVector( _tempA.sub( _vA$1 ), influence ); - _morphB.addScaledVector( _tempB.sub( _vB$1 ), influence ); - _morphC.addScaledVector( _tempC.sub( _vC$1 ), influence ); - - } - - } - - _vA$1.add( _morphA ); - _vB$1.add( _morphB ); - _vC$1.add( _morphC ); - - } - - if ( object.isSkinnedMesh ) { - - object.boneTransform( a, _vA$1 ); - object.boneTransform( b, _vB$1 ); - object.boneTransform( c, _vC$1 ); - - } - - const intersection = checkIntersection( object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint ); - - if ( intersection ) { - - if ( uv ) { - - _uvA$1.fromBufferAttribute( uv, a ); - _uvB$1.fromBufferAttribute( uv, b ); - _uvC$1.fromBufferAttribute( uv, c ); - - intersection.uv = Triangle.getUV( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() ); - - } - - if ( uv2 ) { - - _uvA$1.fromBufferAttribute( uv2, a ); - _uvB$1.fromBufferAttribute( uv2, b ); - _uvC$1.fromBufferAttribute( uv2, c ); - - intersection.uv2 = Triangle.getUV( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() ); - - } - - const face = { - a: a, - b: b, - c: c, - normal: new Vector3(), - materialIndex: 0 - }; - - Triangle.getNormal( _vA$1, _vB$1, _vC$1, face.normal ); - - intersection.face = face; - - } - - return intersection; - -} - -class BoxGeometry extends BufferGeometry { - - constructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) { - - super(); - - this.type = 'BoxGeometry'; - - this.parameters = { - width: width, - height: height, - depth: depth, - widthSegments: widthSegments, - heightSegments: heightSegments, - depthSegments: depthSegments - }; - - const scope = this; - - // segments - - widthSegments = Math.floor( widthSegments ); - heightSegments = Math.floor( heightSegments ); - depthSegments = Math.floor( depthSegments ); - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - // helper variables - - let numberOfVertices = 0; - let groupStart = 0; - - // build each side of the box geometry - - buildPlane( 'z', 'y', 'x', - 1, - 1, depth, height, width, depthSegments, heightSegments, 0 ); // px - buildPlane( 'z', 'y', 'x', 1, - 1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx - buildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py - buildPlane( 'x', 'z', 'y', 1, - 1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny - buildPlane( 'x', 'y', 'z', 1, - 1, width, height, depth, widthSegments, heightSegments, 4 ); // pz - buildPlane( 'x', 'y', 'z', - 1, - 1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - function buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) { - - const segmentWidth = width / gridX; - const segmentHeight = height / gridY; - - const widthHalf = width / 2; - const heightHalf = height / 2; - const depthHalf = depth / 2; - - const gridX1 = gridX + 1; - const gridY1 = gridY + 1; - - let vertexCounter = 0; - let groupCount = 0; - - const vector = new Vector3(); - - // generate vertices, normals and uvs - - for ( let iy = 0; iy < gridY1; iy ++ ) { - - const y = iy * segmentHeight - heightHalf; - - for ( let ix = 0; ix < gridX1; ix ++ ) { - - const x = ix * segmentWidth - widthHalf; - - // set values to correct vector component - - vector[ u ] = x * udir; - vector[ v ] = y * vdir; - vector[ w ] = depthHalf; - - // now apply vector to vertex buffer - - vertices.push( vector.x, vector.y, vector.z ); - - // set values to correct vector component - - vector[ u ] = 0; - vector[ v ] = 0; - vector[ w ] = depth > 0 ? 1 : - 1; - - // now apply vector to normal buffer - - normals.push( vector.x, vector.y, vector.z ); - - // uvs - - uvs.push( ix / gridX ); - uvs.push( 1 - ( iy / gridY ) ); - - // counters - - vertexCounter += 1; - - } - - } - - // indices - - // 1. you need three indices to draw a single face - // 2. a single segment consists of two faces - // 3. so we need to generate six (2*3) indices per segment - - for ( let iy = 0; iy < gridY; iy ++ ) { - - for ( let ix = 0; ix < gridX; ix ++ ) { - - const a = numberOfVertices + ix + gridX1 * iy; - const b = numberOfVertices + ix + gridX1 * ( iy + 1 ); - const c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 ); - const d = numberOfVertices + ( ix + 1 ) + gridX1 * iy; - - // faces - - indices.push( a, b, d ); - indices.push( b, c, d ); - - // increase counter - - groupCount += 6; - - } - - } - - // add a group to the geometry. this will ensure multi material support - - scope.addGroup( groupStart, groupCount, materialIndex ); - - // calculate new start value for groups - - groupStart += groupCount; - - // update total number of vertices - - numberOfVertices += vertexCounter; - - } - - } - - static fromJSON( data ) { - - return new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments ); - - } - -} - -/** - * Uniform Utilities - */ - -function cloneUniforms( src ) { - - const dst = {}; - - for ( const u in src ) { - - dst[ u ] = {}; - - for ( const p in src[ u ] ) { - - const property = src[ u ][ p ]; - - if ( property && ( property.isColor || - property.isMatrix3 || property.isMatrix4 || - property.isVector2 || property.isVector3 || property.isVector4 || - property.isTexture || property.isQuaternion ) ) { - - dst[ u ][ p ] = property.clone(); - - } else if ( Array.isArray( property ) ) { - - dst[ u ][ p ] = property.slice(); - - } else { - - dst[ u ][ p ] = property; - - } - - } - - } - - return dst; - -} - -function mergeUniforms( uniforms ) { - - const merged = {}; - - for ( let u = 0; u < uniforms.length; u ++ ) { - - const tmp = cloneUniforms( uniforms[ u ] ); - - for ( const p in tmp ) { - - merged[ p ] = tmp[ p ]; - - } - - } - - return merged; - -} - -// Legacy - -const UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms }; - -var default_vertex = "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"; - -var default_fragment = "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}"; - -/** - * parameters = { - * defines: { "label" : "value" }, - * uniforms: { "parameter1": { value: 1.0 }, "parameter2": { value2: 2 } }, - * - * fragmentShader: , - * vertexShader: , - * - * wireframe: , - * wireframeLinewidth: , - * - * lights: , - * - * morphTargets: , - * morphNormals: - * } - */ - -class ShaderMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'ShaderMaterial'; - - this.defines = {}; - this.uniforms = {}; - - this.vertexShader = default_vertex; - this.fragmentShader = default_fragment; - - this.linewidth = 1; - - this.wireframe = false; - this.wireframeLinewidth = 1; - - this.fog = false; // set to use scene fog - this.lights = false; // set to use scene lights - this.clipping = false; // set to use user-defined clipping planes - - this.morphTargets = false; // set to use morph targets - this.morphNormals = false; // set to use morph normals - - this.extensions = { - derivatives: false, // set to use derivatives - fragDepth: false, // set to use fragment depth values - drawBuffers: false, // set to use draw buffers - shaderTextureLOD: false // set to use shader texture LOD - }; - - // When rendered geometry doesn't include these attributes but the material does, - // use these default values in WebGL. This avoids errors when buffer data is missing. - this.defaultAttributeValues = { - 'color': [ 1, 1, 1 ], - 'uv': [ 0, 0 ], - 'uv2': [ 0, 0 ] - }; - - this.index0AttributeName = undefined; - this.uniformsNeedUpdate = false; - - this.glslVersion = null; - - if ( parameters !== undefined ) { - - if ( parameters.attributes !== undefined ) { - - console.error( 'THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.' ); - - } - - this.setValues( parameters ); - - } - - } - - copy( source ) { - - super.copy( source ); - - this.fragmentShader = source.fragmentShader; - this.vertexShader = source.vertexShader; - - this.uniforms = cloneUniforms( source.uniforms ); - - this.defines = Object.assign( {}, source.defines ); - - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - - this.lights = source.lights; - this.clipping = source.clipping; - - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - - this.extensions = Object.assign( {}, source.extensions ); - - this.glslVersion = source.glslVersion; - - return this; - - } - - toJSON( meta ) { - - const data = super.toJSON( meta ); - - data.glslVersion = this.glslVersion; - data.uniforms = {}; - - for ( const name in this.uniforms ) { - - const uniform = this.uniforms[ name ]; - const value = uniform.value; - - if ( value && value.isTexture ) { - - data.uniforms[ name ] = { - type: 't', - value: value.toJSON( meta ).uuid - }; - - } else if ( value && value.isColor ) { - - data.uniforms[ name ] = { - type: 'c', - value: value.getHex() - }; - - } else if ( value && value.isVector2 ) { - - data.uniforms[ name ] = { - type: 'v2', - value: value.toArray() - }; - - } else if ( value && value.isVector3 ) { - - data.uniforms[ name ] = { - type: 'v3', - value: value.toArray() - }; - - } else if ( value && value.isVector4 ) { - - data.uniforms[ name ] = { - type: 'v4', - value: value.toArray() - }; - - } else if ( value && value.isMatrix3 ) { - - data.uniforms[ name ] = { - type: 'm3', - value: value.toArray() - }; - - } else if ( value && value.isMatrix4 ) { - - data.uniforms[ name ] = { - type: 'm4', - value: value.toArray() - }; - - } else { - - data.uniforms[ name ] = { - value: value - }; - - // note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far - - } - - } - - if ( Object.keys( this.defines ).length > 0 ) data.defines = this.defines; - - data.vertexShader = this.vertexShader; - data.fragmentShader = this.fragmentShader; - - const extensions = {}; - - for ( const key in this.extensions ) { - - if ( this.extensions[ key ] === true ) extensions[ key ] = true; - - } - - if ( Object.keys( extensions ).length > 0 ) data.extensions = extensions; - - return data; - - } - -} - -ShaderMaterial.prototype.isShaderMaterial = true; - -class Camera extends Object3D { - - constructor() { - - super(); - - this.type = 'Camera'; - - this.matrixWorldInverse = new Matrix4(); - - this.projectionMatrix = new Matrix4(); - this.projectionMatrixInverse = new Matrix4(); - - } - - copy( source, recursive ) { - - super.copy( source, recursive ); - - this.matrixWorldInverse.copy( source.matrixWorldInverse ); - - this.projectionMatrix.copy( source.projectionMatrix ); - this.projectionMatrixInverse.copy( source.projectionMatrixInverse ); - - return this; - - } - - getWorldDirection( target ) { - - this.updateWorldMatrix( true, false ); - - const e = this.matrixWorld.elements; - - return target.set( - e[ 8 ], - e[ 9 ], - e[ 10 ] ).normalize(); - - } - - updateMatrixWorld( force ) { - - super.updateMatrixWorld( force ); - - this.matrixWorldInverse.copy( this.matrixWorld ).invert(); - - } - - updateWorldMatrix( updateParents, updateChildren ) { - - super.updateWorldMatrix( updateParents, updateChildren ); - - this.matrixWorldInverse.copy( this.matrixWorld ).invert(); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - -} - -Camera.prototype.isCamera = true; - -class PerspectiveCamera extends Camera { - - constructor( fov = 50, aspect = 1, near = 0.1, far = 2000 ) { - - super(); - - this.type = 'PerspectiveCamera'; - - this.fov = fov; - this.zoom = 1; - - this.near = near; - this.far = far; - this.focus = 10; - - this.aspect = aspect; - this.view = null; - - this.filmGauge = 35; // width of the film (default in millimeters) - this.filmOffset = 0; // horizontal film offset (same unit as gauge) - - this.updateProjectionMatrix(); - - } - - copy( source, recursive ) { - - super.copy( source, recursive ); - - this.fov = source.fov; - this.zoom = source.zoom; - - this.near = source.near; - this.far = source.far; - this.focus = source.focus; - - this.aspect = source.aspect; - this.view = source.view === null ? null : Object.assign( {}, source.view ); - - this.filmGauge = source.filmGauge; - this.filmOffset = source.filmOffset; - - return this; - - } - - /** - * Sets the FOV by focal length in respect to the current .filmGauge. - * - * The default film gauge is 35, so that the focal length can be specified for - * a 35mm (full frame) camera. - * - * Values for focal length and film gauge must have the same unit. - */ - setFocalLength( focalLength ) { - - /** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */ - const vExtentSlope = 0.5 * this.getFilmHeight() / focalLength; - - this.fov = RAD2DEG * 2 * Math.atan( vExtentSlope ); - this.updateProjectionMatrix(); - - } - - /** - * Calculates the focal length from the current .fov and .filmGauge. - */ - getFocalLength() { - - const vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov ); - - return 0.5 * this.getFilmHeight() / vExtentSlope; - - } - - getEffectiveFOV() { - - return RAD2DEG * 2 * Math.atan( - Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom ); - - } - - getFilmWidth() { - - // film not completely covered in portrait format (aspect < 1) - return this.filmGauge * Math.min( this.aspect, 1 ); - - } - - getFilmHeight() { - - // film not completely covered in landscape format (aspect > 1) - return this.filmGauge / Math.max( this.aspect, 1 ); - - } - - /** - * Sets an offset in a larger frustum. This is useful for multi-window or - * multi-monitor/multi-machine setups. - * - * For example, if you have 3x2 monitors and each monitor is 1920x1080 and - * the monitors are in grid like this - * - * +---+---+---+ - * | A | B | C | - * +---+---+---+ - * | D | E | F | - * +---+---+---+ - * - * then for each monitor you would call it like this - * - * const w = 1920; - * const h = 1080; - * const fullWidth = w * 3; - * const fullHeight = h * 2; - * - * --A-- - * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h ); - * --B-- - * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h ); - * --C-- - * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h ); - * --D-- - * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h ); - * --E-- - * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h ); - * --F-- - * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h ); - * - * Note there is no reason monitors have to be the same size or in a grid. - */ - setViewOffset( fullWidth, fullHeight, x, y, width, height ) { - - this.aspect = fullWidth / fullHeight; - - if ( this.view === null ) { - - this.view = { - enabled: true, - fullWidth: 1, - fullHeight: 1, - offsetX: 0, - offsetY: 0, - width: 1, - height: 1 - }; - - } - - this.view.enabled = true; - this.view.fullWidth = fullWidth; - this.view.fullHeight = fullHeight; - this.view.offsetX = x; - this.view.offsetY = y; - this.view.width = width; - this.view.height = height; - - this.updateProjectionMatrix(); - - } - - clearViewOffset() { - - if ( this.view !== null ) { - - this.view.enabled = false; - - } - - this.updateProjectionMatrix(); - - } - - updateProjectionMatrix() { - - const near = this.near; - let top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom; - let height = 2 * top; - let width = this.aspect * height; - let left = - 0.5 * width; - const view = this.view; - - if ( this.view !== null && this.view.enabled ) { - - const fullWidth = view.fullWidth, - fullHeight = view.fullHeight; - - left += view.offsetX * width / fullWidth; - top -= view.offsetY * height / fullHeight; - width *= view.width / fullWidth; - height *= view.height / fullHeight; - - } - - const skew = this.filmOffset; - if ( skew !== 0 ) left += near * skew / this.getFilmWidth(); - - this.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far ); - - this.projectionMatrixInverse.copy( this.projectionMatrix ).invert(); - - } - - toJSON( meta ) { - - const data = super.toJSON( meta ); - - data.object.fov = this.fov; - data.object.zoom = this.zoom; - - data.object.near = this.near; - data.object.far = this.far; - data.object.focus = this.focus; - - data.object.aspect = this.aspect; - - if ( this.view !== null ) data.object.view = Object.assign( {}, this.view ); - - data.object.filmGauge = this.filmGauge; - data.object.filmOffset = this.filmOffset; - - return data; - - } - -} - -PerspectiveCamera.prototype.isPerspectiveCamera = true; - -const fov = 90, aspect = 1; - -class CubeCamera extends Object3D { - - constructor( near, far, renderTarget ) { - - super(); - - this.type = 'CubeCamera'; - - if ( renderTarget.isWebGLCubeRenderTarget !== true ) { - - console.error( 'THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.' ); - return; - - } - - this.renderTarget = renderTarget; - - const cameraPX = new PerspectiveCamera( fov, aspect, near, far ); - cameraPX.layers = this.layers; - cameraPX.up.set( 0, - 1, 0 ); - cameraPX.lookAt( new Vector3( 1, 0, 0 ) ); - this.add( cameraPX ); - - const cameraNX = new PerspectiveCamera( fov, aspect, near, far ); - cameraNX.layers = this.layers; - cameraNX.up.set( 0, - 1, 0 ); - cameraNX.lookAt( new Vector3( - 1, 0, 0 ) ); - this.add( cameraNX ); - - const cameraPY = new PerspectiveCamera( fov, aspect, near, far ); - cameraPY.layers = this.layers; - cameraPY.up.set( 0, 0, 1 ); - cameraPY.lookAt( new Vector3( 0, 1, 0 ) ); - this.add( cameraPY ); - - const cameraNY = new PerspectiveCamera( fov, aspect, near, far ); - cameraNY.layers = this.layers; - cameraNY.up.set( 0, 0, - 1 ); - cameraNY.lookAt( new Vector3( 0, - 1, 0 ) ); - this.add( cameraNY ); - - const cameraPZ = new PerspectiveCamera( fov, aspect, near, far ); - cameraPZ.layers = this.layers; - cameraPZ.up.set( 0, - 1, 0 ); - cameraPZ.lookAt( new Vector3( 0, 0, 1 ) ); - this.add( cameraPZ ); - - const cameraNZ = new PerspectiveCamera( fov, aspect, near, far ); - cameraNZ.layers = this.layers; - cameraNZ.up.set( 0, - 1, 0 ); - cameraNZ.lookAt( new Vector3( 0, 0, - 1 ) ); - this.add( cameraNZ ); - - } - - update( renderer, scene ) { - - if ( this.parent === null ) this.updateMatrixWorld(); - - const renderTarget = this.renderTarget; - - const [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = this.children; - - const currentXrEnabled = renderer.xr.enabled; - const currentRenderTarget = renderer.getRenderTarget(); - - renderer.xr.enabled = false; - - const generateMipmaps = renderTarget.texture.generateMipmaps; - - renderTarget.texture.generateMipmaps = false; - - renderer.setRenderTarget( renderTarget, 0 ); - renderer.render( scene, cameraPX ); - - renderer.setRenderTarget( renderTarget, 1 ); - renderer.render( scene, cameraNX ); - - renderer.setRenderTarget( renderTarget, 2 ); - renderer.render( scene, cameraPY ); - - renderer.setRenderTarget( renderTarget, 3 ); - renderer.render( scene, cameraNY ); - - renderer.setRenderTarget( renderTarget, 4 ); - renderer.render( scene, cameraPZ ); - - renderTarget.texture.generateMipmaps = generateMipmaps; - - renderer.setRenderTarget( renderTarget, 5 ); - renderer.render( scene, cameraNZ ); - - renderer.setRenderTarget( currentRenderTarget ); - - renderer.xr.enabled = currentXrEnabled; - - } - -} - -class CubeTexture extends Texture { - - constructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) { - - images = images !== undefined ? images : []; - mapping = mapping !== undefined ? mapping : CubeReflectionMapping; - format = format !== undefined ? format : RGBFormat; - - super( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ); - - // Why CubeTexture._needsFlipEnvMap is necessary: - // - // By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js) - // in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words, - // in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly. - - // three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped - // and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false) - // when using WebGLCubeRenderTarget.texture as a cube texture. - - this._needsFlipEnvMap = true; - - this.flipY = false; - - } - - get images() { - - return this.image; - - } - - set images( value ) { - - this.image = value; - - } - -} - -CubeTexture.prototype.isCubeTexture = true; - -class WebGLCubeRenderTarget extends WebGLRenderTarget { - - constructor( size, options, dummy ) { - - if ( Number.isInteger( options ) ) { - - console.warn( 'THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )' ); - - options = dummy; - - } - - super( size, size, options ); - - options = options || {}; - - this.texture = new CubeTexture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding ); - - this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false; - this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter; - - this.texture._needsFlipEnvMap = false; - - } - - fromEquirectangularTexture( renderer, texture ) { - - this.texture.type = texture.type; - this.texture.format = RGBAFormat; // see #18859 - this.texture.encoding = texture.encoding; - - this.texture.generateMipmaps = texture.generateMipmaps; - this.texture.minFilter = texture.minFilter; - this.texture.magFilter = texture.magFilter; - - const shader = { - - uniforms: { - tEquirect: { value: null }, - }, - - vertexShader: /* glsl */` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `, - - fragmentShader: /* glsl */` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - ` - }; - - const geometry = new BoxGeometry( 5, 5, 5 ); - - const material = new ShaderMaterial( { - - name: 'CubemapFromEquirect', - - uniforms: cloneUniforms( shader.uniforms ), - vertexShader: shader.vertexShader, - fragmentShader: shader.fragmentShader, - side: BackSide, - blending: NoBlending - - } ); - - material.uniforms.tEquirect.value = texture; - - const mesh = new Mesh( geometry, material ); - - const currentMinFilter = texture.minFilter; - - // Avoid blurred poles - if ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter; - - const camera = new CubeCamera( 1, 10, this ); - camera.update( renderer, mesh ); - - texture.minFilter = currentMinFilter; - - mesh.geometry.dispose(); - mesh.material.dispose(); - - return this; - - } - - clear( renderer, color, depth, stencil ) { - - const currentRenderTarget = renderer.getRenderTarget(); - - for ( let i = 0; i < 6; i ++ ) { - - renderer.setRenderTarget( this, i ); - - renderer.clear( color, depth, stencil ); - - } - - renderer.setRenderTarget( currentRenderTarget ); - - } - -} - -WebGLCubeRenderTarget.prototype.isWebGLCubeRenderTarget = true; - -const _vector1 = /*@__PURE__*/ new Vector3(); -const _vector2 = /*@__PURE__*/ new Vector3(); -const _normalMatrix = /*@__PURE__*/ new Matrix3(); - -class Plane { - - constructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) { - - // normal is assumed to be normalized - - this.normal = normal; - this.constant = constant; - - } - - set( normal, constant ) { - - this.normal.copy( normal ); - this.constant = constant; - - return this; - - } - - setComponents( x, y, z, w ) { - - this.normal.set( x, y, z ); - this.constant = w; - - return this; - - } - - setFromNormalAndCoplanarPoint( normal, point ) { - - this.normal.copy( normal ); - this.constant = - point.dot( this.normal ); - - return this; - - } - - setFromCoplanarPoints( a, b, c ) { - - const normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize(); - - // Q: should an error be thrown if normal is zero (e.g. degenerate plane)? - - this.setFromNormalAndCoplanarPoint( normal, a ); - - return this; - - } - - copy( plane ) { - - this.normal.copy( plane.normal ); - this.constant = plane.constant; - - return this; - - } - - normalize() { - - // Note: will lead to a divide by zero if the plane is invalid. - - const inverseNormalLength = 1.0 / this.normal.length(); - this.normal.multiplyScalar( inverseNormalLength ); - this.constant *= inverseNormalLength; - - return this; - - } - - negate() { - - this.constant *= - 1; - this.normal.negate(); - - return this; - - } - - distanceToPoint( point ) { - - return this.normal.dot( point ) + this.constant; - - } - - distanceToSphere( sphere ) { - - return this.distanceToPoint( sphere.center ) - sphere.radius; - - } - - projectPoint( point, target ) { - - return target.copy( this.normal ).multiplyScalar( - this.distanceToPoint( point ) ).add( point ); - - } - - intersectLine( line, target ) { - - const direction = line.delta( _vector1 ); - - const denominator = this.normal.dot( direction ); - - if ( denominator === 0 ) { - - // line is coplanar, return origin - if ( this.distanceToPoint( line.start ) === 0 ) { - - return target.copy( line.start ); - - } - - // Unsure if this is the correct method to handle this case. - return null; - - } - - const t = - ( line.start.dot( this.normal ) + this.constant ) / denominator; - - if ( t < 0 || t > 1 ) { - - return null; - - } - - return target.copy( direction ).multiplyScalar( t ).add( line.start ); - - } - - intersectsLine( line ) { - - // Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it. - - const startSign = this.distanceToPoint( line.start ); - const endSign = this.distanceToPoint( line.end ); - - return ( startSign < 0 && endSign > 0 ) || ( endSign < 0 && startSign > 0 ); - - } - - intersectsBox( box ) { - - return box.intersectsPlane( this ); - - } - - intersectsSphere( sphere ) { - - return sphere.intersectsPlane( this ); - - } - - coplanarPoint( target ) { - - return target.copy( this.normal ).multiplyScalar( - this.constant ); - - } - - applyMatrix4( matrix, optionalNormalMatrix ) { - - const normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix ); - - const referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix ); - - const normal = this.normal.applyMatrix3( normalMatrix ).normalize(); - - this.constant = - referencePoint.dot( normal ); - - return this; - - } - - translate( offset ) { - - this.constant -= offset.dot( this.normal ); - - return this; - - } - - equals( plane ) { - - return plane.normal.equals( this.normal ) && ( plane.constant === this.constant ); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - -} - -Plane.prototype.isPlane = true; - -const _sphere$2 = /*@__PURE__*/ new Sphere(); -const _vector$7 = /*@__PURE__*/ new Vector3(); - -class Frustum { - - constructor( p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane() ) { - - this.planes = [ p0, p1, p2, p3, p4, p5 ]; - - } - - set( p0, p1, p2, p3, p4, p5 ) { - - const planes = this.planes; - - planes[ 0 ].copy( p0 ); - planes[ 1 ].copy( p1 ); - planes[ 2 ].copy( p2 ); - planes[ 3 ].copy( p3 ); - planes[ 4 ].copy( p4 ); - planes[ 5 ].copy( p5 ); - - return this; - - } - - copy( frustum ) { - - const planes = this.planes; - - for ( let i = 0; i < 6; i ++ ) { - - planes[ i ].copy( frustum.planes[ i ] ); - - } - - return this; - - } - - setFromProjectionMatrix( m ) { - - const planes = this.planes; - const me = m.elements; - const me0 = me[ 0 ], me1 = me[ 1 ], me2 = me[ 2 ], me3 = me[ 3 ]; - const me4 = me[ 4 ], me5 = me[ 5 ], me6 = me[ 6 ], me7 = me[ 7 ]; - const me8 = me[ 8 ], me9 = me[ 9 ], me10 = me[ 10 ], me11 = me[ 11 ]; - const me12 = me[ 12 ], me13 = me[ 13 ], me14 = me[ 14 ], me15 = me[ 15 ]; - - planes[ 0 ].setComponents( me3 - me0, me7 - me4, me11 - me8, me15 - me12 ).normalize(); - planes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize(); - planes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize(); - planes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize(); - planes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize(); - planes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize(); - - return this; - - } - - intersectsObject( object ) { - - const geometry = object.geometry; - - if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); - - _sphere$2.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld ); - - return this.intersectsSphere( _sphere$2 ); - - } - - intersectsSprite( sprite ) { - - _sphere$2.center.set( 0, 0, 0 ); - _sphere$2.radius = 0.7071067811865476; - _sphere$2.applyMatrix4( sprite.matrixWorld ); - - return this.intersectsSphere( _sphere$2 ); - - } - - intersectsSphere( sphere ) { - - const planes = this.planes; - const center = sphere.center; - const negRadius = - sphere.radius; - - for ( let i = 0; i < 6; i ++ ) { - - const distance = planes[ i ].distanceToPoint( center ); - - if ( distance < negRadius ) { - - return false; - - } - - } - - return true; - - } - - intersectsBox( box ) { - - const planes = this.planes; - - for ( let i = 0; i < 6; i ++ ) { - - const plane = planes[ i ]; - - // corner at max distance - - _vector$7.x = plane.normal.x > 0 ? box.max.x : box.min.x; - _vector$7.y = plane.normal.y > 0 ? box.max.y : box.min.y; - _vector$7.z = plane.normal.z > 0 ? box.max.z : box.min.z; - - if ( plane.distanceToPoint( _vector$7 ) < 0 ) { - - return false; - - } - - } - - return true; - - } - - containsPoint( point ) { - - const planes = this.planes; - - for ( let i = 0; i < 6; i ++ ) { - - if ( planes[ i ].distanceToPoint( point ) < 0 ) { - - return false; - - } - - } - - return true; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - -} - -function WebGLAnimation() { - - let context = null; - let isAnimating = false; - let animationLoop = null; - let requestId = null; - - function onAnimationFrame( time, frame ) { - - animationLoop( time, frame ); - - requestId = context.requestAnimationFrame( onAnimationFrame ); - - } - - return { - - start: function () { - - if ( isAnimating === true ) return; - if ( animationLoop === null ) return; - - requestId = context.requestAnimationFrame( onAnimationFrame ); - - isAnimating = true; - - }, - - stop: function () { - - context.cancelAnimationFrame( requestId ); - - isAnimating = false; - - }, - - setAnimationLoop: function ( callback ) { - - animationLoop = callback; - - }, - - setContext: function ( value ) { - - context = value; - - } - - }; - -} - -function WebGLAttributes( gl, capabilities ) { - - const isWebGL2 = capabilities.isWebGL2; - - const buffers = new WeakMap(); - - function createBuffer( attribute, bufferType ) { - - const array = attribute.array; - const usage = attribute.usage; - - const buffer = gl.createBuffer(); - - gl.bindBuffer( bufferType, buffer ); - gl.bufferData( bufferType, array, usage ); - - attribute.onUploadCallback(); - - let type = 5126; - - if ( array instanceof Float32Array ) { - - type = 5126; - - } else if ( array instanceof Float64Array ) { - - console.warn( 'THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.' ); - - } else if ( array instanceof Uint16Array ) { - - if ( attribute.isFloat16BufferAttribute ) { - - if ( isWebGL2 ) { - - type = 5131; - - } else { - - console.warn( 'THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.' ); - - } - - } else { - - type = 5123; - - } - - } else if ( array instanceof Int16Array ) { - - type = 5122; - - } else if ( array instanceof Uint32Array ) { - - type = 5125; - - } else if ( array instanceof Int32Array ) { - - type = 5124; - - } else if ( array instanceof Int8Array ) { - - type = 5120; - - } else if ( array instanceof Uint8Array ) { - - type = 5121; - - } else if ( array instanceof Uint8ClampedArray ) { - - type = 5121; - - } - - return { - buffer: buffer, - type: type, - bytesPerElement: array.BYTES_PER_ELEMENT, - version: attribute.version - }; - - } - - function updateBuffer( buffer, attribute, bufferType ) { - - const array = attribute.array; - const updateRange = attribute.updateRange; - - gl.bindBuffer( bufferType, buffer ); - - if ( updateRange.count === - 1 ) { - - // Not using update ranges - - gl.bufferSubData( bufferType, 0, array ); - - } else { - - if ( isWebGL2 ) { - - gl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, - array, updateRange.offset, updateRange.count ); - - } else { - - gl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, - array.subarray( updateRange.offset, updateRange.offset + updateRange.count ) ); - - } - - updateRange.count = - 1; // reset range - - } - - } - - // - - function get( attribute ) { - - if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; - - return buffers.get( attribute ); - - } - - function remove( attribute ) { - - if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; - - const data = buffers.get( attribute ); - - if ( data ) { - - gl.deleteBuffer( data.buffer ); - - buffers.delete( attribute ); - - } - - } - - function update( attribute, bufferType ) { - - if ( attribute.isGLBufferAttribute ) { - - const cached = buffers.get( attribute ); - - if ( ! cached || cached.version < attribute.version ) { - - buffers.set( attribute, { - buffer: attribute.buffer, - type: attribute.type, - bytesPerElement: attribute.elementSize, - version: attribute.version - } ); - - } - - return; - - } - - if ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data; - - const data = buffers.get( attribute ); - - if ( data === undefined ) { - - buffers.set( attribute, createBuffer( attribute, bufferType ) ); - - } else if ( data.version < attribute.version ) { - - updateBuffer( data.buffer, attribute, bufferType ); - - data.version = attribute.version; - - } - - } - - return { - - get: get, - remove: remove, - update: update - - }; - -} - -class PlaneGeometry extends BufferGeometry { - - constructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) { - - super(); - this.type = 'PlaneGeometry'; - - this.parameters = { - width: width, - height: height, - widthSegments: widthSegments, - heightSegments: heightSegments - }; - - const width_half = width / 2; - const height_half = height / 2; - - const gridX = Math.floor( widthSegments ); - const gridY = Math.floor( heightSegments ); - - const gridX1 = gridX + 1; - const gridY1 = gridY + 1; - - const segment_width = width / gridX; - const segment_height = height / gridY; - - // - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - for ( let iy = 0; iy < gridY1; iy ++ ) { - - const y = iy * segment_height - height_half; - - for ( let ix = 0; ix < gridX1; ix ++ ) { - - const x = ix * segment_width - width_half; - - vertices.push( x, - y, 0 ); - - normals.push( 0, 0, 1 ); - - uvs.push( ix / gridX ); - uvs.push( 1 - ( iy / gridY ) ); - - } - - } - - for ( let iy = 0; iy < gridY; iy ++ ) { - - for ( let ix = 0; ix < gridX; ix ++ ) { - - const a = ix + gridX1 * iy; - const b = ix + gridX1 * ( iy + 1 ); - const c = ( ix + 1 ) + gridX1 * ( iy + 1 ); - const d = ( ix + 1 ) + gridX1 * iy; - - indices.push( a, b, d ); - indices.push( b, c, d ); - - } - - } - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - } - - static fromJSON( data ) { - - return new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments ); - - } - -} - -var alphamap_fragment = "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif"; - -var alphamap_pars_fragment = "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif"; - -var alphatest_fragment = "#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif"; - -var aomap_fragment = "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif"; - -var aomap_pars_fragment = "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif"; - -var begin_vertex = "vec3 transformed = vec3( position );"; - -var beginnormal_vertex = "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif"; - -var bsdfs = "vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif"; - -var bumpmap_pars_fragment = "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif"; - -var clipping_planes_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif"; - -var clipping_planes_pars_fragment = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif"; - -var clipping_planes_pars_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif"; - -var clipping_planes_vertex = "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif"; - -var color_fragment = "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif"; - -var color_pars_fragment = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif"; - -var color_pars_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif"; - -var color_vertex = "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif"; - -var common = "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}"; - -var cube_uv_reflection_fragment = "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif"; - -var defaultnormal_vertex = "vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif"; - -var displacementmap_pars_vertex = "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif"; - -var displacementmap_vertex = "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif"; - -var emissivemap_fragment = "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif"; - -var emissivemap_pars_fragment = "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif"; - -var encodings_fragment = "gl_FragColor = linearToOutputTexel( gl_FragColor );"; - -var encodings_pars_fragment = "\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}"; - -var envmap_fragment = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif"; - -var envmap_common_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif"; - -var envmap_pars_fragment = "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif"; - -var envmap_pars_vertex = "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif"; - -var envmap_vertex = "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif"; - -var fog_vertex = "#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif"; - -var fog_pars_vertex = "#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif"; - -var fog_fragment = "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif"; - -var fog_pars_fragment = "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif"; - -var gradientmap_pars_fragment = "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}"; - -var lightmap_fragment = "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif"; - -var lightmap_pars_fragment = "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif"; - -var lights_lambert_vertex = "vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif"; - -var lights_pars_begin = "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif"; - -var envmap_physical_pars_fragment = "#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif"; - -var lights_toon_fragment = "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;"; - -var lights_toon_pars_fragment = "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)"; - -var lights_phong_fragment = "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;"; - -var lights_phong_pars_fragment = "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)"; - -var lights_physical_fragment = "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif"; - -var lights_physical_pars_fragment = "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}"; - -var lights_fragment_begin = "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif"; - -var lights_fragment_maps = "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif"; - -var lights_fragment_end = "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif"; - -var logdepthbuf_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif"; - -var logdepthbuf_pars_fragment = "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif"; - -var logdepthbuf_pars_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif"; - -var logdepthbuf_vertex = "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif"; - -var map_fragment = "#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif"; - -var map_pars_fragment = "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif"; - -var map_particle_fragment = "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif"; - -var map_particle_pars_fragment = "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif"; - -var metalnessmap_fragment = "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif"; - -var metalnessmap_pars_fragment = "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif"; - -var morphnormal_vertex = "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif"; - -var morphtarget_pars_vertex = "#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif"; - -var morphtarget_vertex = "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif"; - -var normal_fragment_begin = "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;"; - -var normal_fragment_maps = "#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif"; - -var normalmap_pars_fragment = "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif"; - -var clearcoat_normal_fragment_begin = "#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif"; - -var clearcoat_normal_fragment_maps = "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif"; - -var clearcoat_pars_fragment = "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif"; - -var packing = "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}"; - -var premultiplied_alpha_fragment = "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif"; - -var project_vertex = "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;"; - -var dithering_fragment = "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif"; - -var dithering_pars_fragment = "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif"; - -var roughnessmap_fragment = "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif"; - -var roughnessmap_pars_fragment = "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif"; - -var shadowmap_pars_fragment = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif"; - -var shadowmap_pars_vertex = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif"; - -var shadowmap_vertex = "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif"; - -var shadowmask_pars_fragment = "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}"; - -var skinbase_vertex = "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif"; - -var skinning_pars_vertex = "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif"; - -var skinning_vertex = "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif"; - -var skinnormal_vertex = "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif"; - -var specularmap_fragment = "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif"; - -var specularmap_pars_fragment = "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif"; - -var tonemapping_fragment = "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif"; - -var tonemapping_pars_fragment = "#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }"; - -var transmission_fragment = "#ifdef USE_TRANSMISSION\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSNMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n\tvec3 v = normalize( cameraPosition - pos );\n\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n\tvec3 transmission = transmissionFactor * getIBLVolumeRefraction(\n\t\tnormal, v, roughnessFactor, material.diffuseColor, totalSpecular,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\n#endif"; - -var transmission_pars_fragment = "#ifdef USE_TRANSMISSION\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec4 vWorldPosition;\n\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n\t\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\n\t\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\n\t\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\n\t\treturn normalize(refractionVector) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness(float roughness, float ior) {\n\t\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n\t}\n\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n\t\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n\t\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n\t}\n\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n\t\tif (attenuationDistance == 0.0) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n\t\t\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, float attenuationDistance) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n\t\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n\t\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\n\t}\n#endif"; - -var uv_pars_fragment = "#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif"; - -var uv_pars_vertex = "#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif"; - -var uv_vertex = "#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif"; - -var uv2_pars_fragment = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif"; - -var uv2_pars_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif"; - -var uv2_vertex = "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif"; - -var worldpos_vertex = "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif"; - -var background_frag = "uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}"; - -var background_vert = "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}"; - -var cube_frag = "#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}"; - -var cube_vert = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; - -var depth_frag = "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}"; - -var depth_vert = "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}"; - -var distanceRGBA_frag = "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}"; - -var distanceRGBA_vert = "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}"; - -var equirect_frag = "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include \n\t#include \n}"; - -var equirect_vert = "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}"; - -var linedashed_frag = "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var linedashed_vert = "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshbasic_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshbasic_vert = "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_ENVMAP\n\t#include \n\t#include \n\t#include \n\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshlambert_frag = "uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshlambert_vert = "#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshmatcap_frag = "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshmatcap_vert = "#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}"; - -var meshtoon_frag = "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshtoon_vert = "#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}"; - -var meshphong_frag = "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshphong_vert = "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshphysical_frag = "#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform vec3 attenuationColor;\n\tuniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var meshphysical_vert = "#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#ifdef USE_TRANSMISSION\n\tvarying vec4 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition;\n#endif\n}"; - -var normal_frag = "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}"; - -var normal_vert = "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}"; - -var points_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var points_vert = "uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var shadow_frag = "uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}"; - -var shadow_vert = "#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; - -var sprite_frag = "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include \n\t#include \n\t#include \n}"; - -var sprite_vert = "uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"; - -const ShaderChunk = { - alphamap_fragment: alphamap_fragment, - alphamap_pars_fragment: alphamap_pars_fragment, - alphatest_fragment: alphatest_fragment, - aomap_fragment: aomap_fragment, - aomap_pars_fragment: aomap_pars_fragment, - begin_vertex: begin_vertex, - beginnormal_vertex: beginnormal_vertex, - bsdfs: bsdfs, - bumpmap_pars_fragment: bumpmap_pars_fragment, - clipping_planes_fragment: clipping_planes_fragment, - clipping_planes_pars_fragment: clipping_planes_pars_fragment, - clipping_planes_pars_vertex: clipping_planes_pars_vertex, - clipping_planes_vertex: clipping_planes_vertex, - color_fragment: color_fragment, - color_pars_fragment: color_pars_fragment, - color_pars_vertex: color_pars_vertex, - color_vertex: color_vertex, - common: common, - cube_uv_reflection_fragment: cube_uv_reflection_fragment, - defaultnormal_vertex: defaultnormal_vertex, - displacementmap_pars_vertex: displacementmap_pars_vertex, - displacementmap_vertex: displacementmap_vertex, - emissivemap_fragment: emissivemap_fragment, - emissivemap_pars_fragment: emissivemap_pars_fragment, - encodings_fragment: encodings_fragment, - encodings_pars_fragment: encodings_pars_fragment, - envmap_fragment: envmap_fragment, - envmap_common_pars_fragment: envmap_common_pars_fragment, - envmap_pars_fragment: envmap_pars_fragment, - envmap_pars_vertex: envmap_pars_vertex, - envmap_physical_pars_fragment: envmap_physical_pars_fragment, - envmap_vertex: envmap_vertex, - fog_vertex: fog_vertex, - fog_pars_vertex: fog_pars_vertex, - fog_fragment: fog_fragment, - fog_pars_fragment: fog_pars_fragment, - gradientmap_pars_fragment: gradientmap_pars_fragment, - lightmap_fragment: lightmap_fragment, - lightmap_pars_fragment: lightmap_pars_fragment, - lights_lambert_vertex: lights_lambert_vertex, - lights_pars_begin: lights_pars_begin, - lights_toon_fragment: lights_toon_fragment, - lights_toon_pars_fragment: lights_toon_pars_fragment, - lights_phong_fragment: lights_phong_fragment, - lights_phong_pars_fragment: lights_phong_pars_fragment, - lights_physical_fragment: lights_physical_fragment, - lights_physical_pars_fragment: lights_physical_pars_fragment, - lights_fragment_begin: lights_fragment_begin, - lights_fragment_maps: lights_fragment_maps, - lights_fragment_end: lights_fragment_end, - logdepthbuf_fragment: logdepthbuf_fragment, - logdepthbuf_pars_fragment: logdepthbuf_pars_fragment, - logdepthbuf_pars_vertex: logdepthbuf_pars_vertex, - logdepthbuf_vertex: logdepthbuf_vertex, - map_fragment: map_fragment, - map_pars_fragment: map_pars_fragment, - map_particle_fragment: map_particle_fragment, - map_particle_pars_fragment: map_particle_pars_fragment, - metalnessmap_fragment: metalnessmap_fragment, - metalnessmap_pars_fragment: metalnessmap_pars_fragment, - morphnormal_vertex: morphnormal_vertex, - morphtarget_pars_vertex: morphtarget_pars_vertex, - morphtarget_vertex: morphtarget_vertex, - normal_fragment_begin: normal_fragment_begin, - normal_fragment_maps: normal_fragment_maps, - normalmap_pars_fragment: normalmap_pars_fragment, - clearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin, - clearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps, - clearcoat_pars_fragment: clearcoat_pars_fragment, - packing: packing, - premultiplied_alpha_fragment: premultiplied_alpha_fragment, - project_vertex: project_vertex, - dithering_fragment: dithering_fragment, - dithering_pars_fragment: dithering_pars_fragment, - roughnessmap_fragment: roughnessmap_fragment, - roughnessmap_pars_fragment: roughnessmap_pars_fragment, - shadowmap_pars_fragment: shadowmap_pars_fragment, - shadowmap_pars_vertex: shadowmap_pars_vertex, - shadowmap_vertex: shadowmap_vertex, - shadowmask_pars_fragment: shadowmask_pars_fragment, - skinbase_vertex: skinbase_vertex, - skinning_pars_vertex: skinning_pars_vertex, - skinning_vertex: skinning_vertex, - skinnormal_vertex: skinnormal_vertex, - specularmap_fragment: specularmap_fragment, - specularmap_pars_fragment: specularmap_pars_fragment, - tonemapping_fragment: tonemapping_fragment, - tonemapping_pars_fragment: tonemapping_pars_fragment, - transmission_fragment: transmission_fragment, - transmission_pars_fragment: transmission_pars_fragment, - uv_pars_fragment: uv_pars_fragment, - uv_pars_vertex: uv_pars_vertex, - uv_vertex: uv_vertex, - uv2_pars_fragment: uv2_pars_fragment, - uv2_pars_vertex: uv2_pars_vertex, - uv2_vertex: uv2_vertex, - worldpos_vertex: worldpos_vertex, - - background_frag: background_frag, - background_vert: background_vert, - cube_frag: cube_frag, - cube_vert: cube_vert, - depth_frag: depth_frag, - depth_vert: depth_vert, - distanceRGBA_frag: distanceRGBA_frag, - distanceRGBA_vert: distanceRGBA_vert, - equirect_frag: equirect_frag, - equirect_vert: equirect_vert, - linedashed_frag: linedashed_frag, - linedashed_vert: linedashed_vert, - meshbasic_frag: meshbasic_frag, - meshbasic_vert: meshbasic_vert, - meshlambert_frag: meshlambert_frag, - meshlambert_vert: meshlambert_vert, - meshmatcap_frag: meshmatcap_frag, - meshmatcap_vert: meshmatcap_vert, - meshtoon_frag: meshtoon_frag, - meshtoon_vert: meshtoon_vert, - meshphong_frag: meshphong_frag, - meshphong_vert: meshphong_vert, - meshphysical_frag: meshphysical_frag, - meshphysical_vert: meshphysical_vert, - normal_frag: normal_frag, - normal_vert: normal_vert, - points_frag: points_frag, - points_vert: points_vert, - shadow_frag: shadow_frag, - shadow_vert: shadow_vert, - sprite_frag: sprite_frag, - sprite_vert: sprite_vert -}; - -/** - * Uniforms library for shared webgl shaders - */ - -const UniformsLib = { - - common: { - - diffuse: { value: new Color( 0xffffff ) }, - opacity: { value: 1.0 }, - - map: { value: null }, - uvTransform: { value: new Matrix3() }, - uv2Transform: { value: new Matrix3() }, - - alphaMap: { value: null }, - - }, - - specularmap: { - - specularMap: { value: null }, - - }, - - envmap: { - - envMap: { value: null }, - flipEnvMap: { value: - 1 }, - reflectivity: { value: 1.0 }, - refractionRatio: { value: 0.98 }, - maxMipLevel: { value: 0 } - - }, - - aomap: { - - aoMap: { value: null }, - aoMapIntensity: { value: 1 } - - }, - - lightmap: { - - lightMap: { value: null }, - lightMapIntensity: { value: 1 } - - }, - - emissivemap: { - - emissiveMap: { value: null } - - }, - - bumpmap: { - - bumpMap: { value: null }, - bumpScale: { value: 1 } - - }, - - normalmap: { - - normalMap: { value: null }, - normalScale: { value: new Vector2( 1, 1 ) } - - }, - - displacementmap: { - - displacementMap: { value: null }, - displacementScale: { value: 1 }, - displacementBias: { value: 0 } - - }, - - roughnessmap: { - - roughnessMap: { value: null } - - }, - - metalnessmap: { - - metalnessMap: { value: null } - - }, - - gradientmap: { - - gradientMap: { value: null } - - }, - - fog: { - - fogDensity: { value: 0.00025 }, - fogNear: { value: 1 }, - fogFar: { value: 2000 }, - fogColor: { value: new Color( 0xffffff ) } - - }, - - lights: { - - ambientLightColor: { value: [] }, - - lightProbe: { value: [] }, - - directionalLights: { value: [], properties: { - direction: {}, - color: {} - } }, - - directionalLightShadows: { value: [], properties: { - shadowBias: {}, - shadowNormalBias: {}, - shadowRadius: {}, - shadowMapSize: {} - } }, - - directionalShadowMap: { value: [] }, - directionalShadowMatrix: { value: [] }, - - spotLights: { value: [], properties: { - color: {}, - position: {}, - direction: {}, - distance: {}, - coneCos: {}, - penumbraCos: {}, - decay: {} - } }, - - spotLightShadows: { value: [], properties: { - shadowBias: {}, - shadowNormalBias: {}, - shadowRadius: {}, - shadowMapSize: {} - } }, - - spotShadowMap: { value: [] }, - spotShadowMatrix: { value: [] }, - - pointLights: { value: [], properties: { - color: {}, - position: {}, - decay: {}, - distance: {} - } }, - - pointLightShadows: { value: [], properties: { - shadowBias: {}, - shadowNormalBias: {}, - shadowRadius: {}, - shadowMapSize: {}, - shadowCameraNear: {}, - shadowCameraFar: {} - } }, - - pointShadowMap: { value: [] }, - pointShadowMatrix: { value: [] }, - - hemisphereLights: { value: [], properties: { - direction: {}, - skyColor: {}, - groundColor: {} - } }, - - // TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src - rectAreaLights: { value: [], properties: { - color: {}, - position: {}, - width: {}, - height: {} - } }, - - ltc_1: { value: null }, - ltc_2: { value: null } - - }, - - points: { - - diffuse: { value: new Color( 0xffffff ) }, - opacity: { value: 1.0 }, - size: { value: 1.0 }, - scale: { value: 1.0 }, - map: { value: null }, - alphaMap: { value: null }, - uvTransform: { value: new Matrix3() } - - }, - - sprite: { - - diffuse: { value: new Color( 0xffffff ) }, - opacity: { value: 1.0 }, - center: { value: new Vector2( 0.5, 0.5 ) }, - rotation: { value: 0.0 }, - map: { value: null }, - alphaMap: { value: null }, - uvTransform: { value: new Matrix3() } - - } - -}; - -const ShaderLib = { - - basic: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.specularmap, - UniformsLib.envmap, - UniformsLib.aomap, - UniformsLib.lightmap, - UniformsLib.fog - ] ), - - vertexShader: ShaderChunk.meshbasic_vert, - fragmentShader: ShaderChunk.meshbasic_frag - - }, - - lambert: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.specularmap, - UniformsLib.envmap, - UniformsLib.aomap, - UniformsLib.lightmap, - UniformsLib.emissivemap, - UniformsLib.fog, - UniformsLib.lights, - { - emissive: { value: new Color( 0x000000 ) } - } - ] ), - - vertexShader: ShaderChunk.meshlambert_vert, - fragmentShader: ShaderChunk.meshlambert_frag - - }, - - phong: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.specularmap, - UniformsLib.envmap, - UniformsLib.aomap, - UniformsLib.lightmap, - UniformsLib.emissivemap, - UniformsLib.bumpmap, - UniformsLib.normalmap, - UniformsLib.displacementmap, - UniformsLib.fog, - UniformsLib.lights, - { - emissive: { value: new Color( 0x000000 ) }, - specular: { value: new Color( 0x111111 ) }, - shininess: { value: 30 } - } - ] ), - - vertexShader: ShaderChunk.meshphong_vert, - fragmentShader: ShaderChunk.meshphong_frag - - }, - - standard: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.envmap, - UniformsLib.aomap, - UniformsLib.lightmap, - UniformsLib.emissivemap, - UniformsLib.bumpmap, - UniformsLib.normalmap, - UniformsLib.displacementmap, - UniformsLib.roughnessmap, - UniformsLib.metalnessmap, - UniformsLib.fog, - UniformsLib.lights, - { - emissive: { value: new Color( 0x000000 ) }, - roughness: { value: 1.0 }, - metalness: { value: 0.0 }, - envMapIntensity: { value: 1 } // temporary - } - ] ), - - vertexShader: ShaderChunk.meshphysical_vert, - fragmentShader: ShaderChunk.meshphysical_frag - - }, - - toon: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.aomap, - UniformsLib.lightmap, - UniformsLib.emissivemap, - UniformsLib.bumpmap, - UniformsLib.normalmap, - UniformsLib.displacementmap, - UniformsLib.gradientmap, - UniformsLib.fog, - UniformsLib.lights, - { - emissive: { value: new Color( 0x000000 ) } - } - ] ), - - vertexShader: ShaderChunk.meshtoon_vert, - fragmentShader: ShaderChunk.meshtoon_frag - - }, - - matcap: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.bumpmap, - UniformsLib.normalmap, - UniformsLib.displacementmap, - UniformsLib.fog, - { - matcap: { value: null } - } - ] ), - - vertexShader: ShaderChunk.meshmatcap_vert, - fragmentShader: ShaderChunk.meshmatcap_frag - - }, - - points: { - - uniforms: mergeUniforms( [ - UniformsLib.points, - UniformsLib.fog - ] ), - - vertexShader: ShaderChunk.points_vert, - fragmentShader: ShaderChunk.points_frag - - }, - - dashed: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.fog, - { - scale: { value: 1 }, - dashSize: { value: 1 }, - totalSize: { value: 2 } - } - ] ), - - vertexShader: ShaderChunk.linedashed_vert, - fragmentShader: ShaderChunk.linedashed_frag - - }, - - depth: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.displacementmap - ] ), - - vertexShader: ShaderChunk.depth_vert, - fragmentShader: ShaderChunk.depth_frag - - }, - - normal: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.bumpmap, - UniformsLib.normalmap, - UniformsLib.displacementmap, - { - opacity: { value: 1.0 } - } - ] ), - - vertexShader: ShaderChunk.normal_vert, - fragmentShader: ShaderChunk.normal_frag - - }, - - sprite: { - - uniforms: mergeUniforms( [ - UniformsLib.sprite, - UniformsLib.fog - ] ), - - vertexShader: ShaderChunk.sprite_vert, - fragmentShader: ShaderChunk.sprite_frag - - }, - - background: { - - uniforms: { - uvTransform: { value: new Matrix3() }, - t2D: { value: null }, - }, - - vertexShader: ShaderChunk.background_vert, - fragmentShader: ShaderChunk.background_frag - - }, - /* ------------------------------------------------------------------------- - // Cube map shader - ------------------------------------------------------------------------- */ - - cube: { - - uniforms: mergeUniforms( [ - UniformsLib.envmap, - { - opacity: { value: 1.0 } - } - ] ), - - vertexShader: ShaderChunk.cube_vert, - fragmentShader: ShaderChunk.cube_frag - - }, - - equirect: { - - uniforms: { - tEquirect: { value: null }, - }, - - vertexShader: ShaderChunk.equirect_vert, - fragmentShader: ShaderChunk.equirect_frag - - }, - - distanceRGBA: { - - uniforms: mergeUniforms( [ - UniformsLib.common, - UniformsLib.displacementmap, - { - referencePosition: { value: new Vector3() }, - nearDistance: { value: 1 }, - farDistance: { value: 1000 } - } - ] ), - - vertexShader: ShaderChunk.distanceRGBA_vert, - fragmentShader: ShaderChunk.distanceRGBA_frag - - }, - - shadow: { - - uniforms: mergeUniforms( [ - UniformsLib.lights, - UniformsLib.fog, - { - color: { value: new Color( 0x00000 ) }, - opacity: { value: 1.0 } - }, - ] ), - - vertexShader: ShaderChunk.shadow_vert, - fragmentShader: ShaderChunk.shadow_frag - - } - -}; - -ShaderLib.physical = { - - uniforms: mergeUniforms( [ - ShaderLib.standard.uniforms, - { - clearcoat: { value: 0 }, - clearcoatMap: { value: null }, - clearcoatRoughness: { value: 0 }, - clearcoatRoughnessMap: { value: null }, - clearcoatNormalScale: { value: new Vector2( 1, 1 ) }, - clearcoatNormalMap: { value: null }, - sheen: { value: new Color( 0x000000 ) }, - transmission: { value: 0 }, - transmissionMap: { value: null }, - transmissionSamplerSize: { value: new Vector2() }, - transmissionSamplerMap: { value: null }, - thickness: { value: 0 }, - thicknessMap: { value: null }, - attenuationDistance: { value: 0 }, - attenuationColor: { value: new Color( 0x000000 ) } - } - ] ), - - vertexShader: ShaderChunk.meshphysical_vert, - fragmentShader: ShaderChunk.meshphysical_frag - -}; - -function WebGLBackground( renderer, cubemaps, state, objects, premultipliedAlpha ) { - - const clearColor = new Color( 0x000000 ); - let clearAlpha = 0; - - let planeMesh; - let boxMesh; - - let currentBackground = null; - let currentBackgroundVersion = 0; - let currentTonemapping = null; - - function render( renderList, scene ) { - - let forceClear = false; - let background = scene.isScene === true ? scene.background : null; - - if ( background && background.isTexture ) { - - background = cubemaps.get( background ); - - } - - // Ignore background in AR - // TODO: Reconsider this. - - const xr = renderer.xr; - const session = xr.getSession && xr.getSession(); - - if ( session && session.environmentBlendMode === 'additive' ) { - - background = null; - - } - - if ( background === null ) { - - setClear( clearColor, clearAlpha ); - - } else if ( background && background.isColor ) { - - setClear( background, 1 ); - forceClear = true; - - } - - if ( renderer.autoClear || forceClear ) { - - renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil ); - - } - - if ( background && ( background.isCubeTexture || background.mapping === CubeUVReflectionMapping ) ) { - - if ( boxMesh === undefined ) { - - boxMesh = new Mesh( - new BoxGeometry( 1, 1, 1 ), - new ShaderMaterial( { - name: 'BackgroundCubeMaterial', - uniforms: cloneUniforms( ShaderLib.cube.uniforms ), - vertexShader: ShaderLib.cube.vertexShader, - fragmentShader: ShaderLib.cube.fragmentShader, - side: BackSide, - depthTest: false, - depthWrite: false, - fog: false - } ) - ); - - boxMesh.geometry.deleteAttribute( 'normal' ); - boxMesh.geometry.deleteAttribute( 'uv' ); - - boxMesh.onBeforeRender = function ( renderer, scene, camera ) { - - this.matrixWorld.copyPosition( camera.matrixWorld ); - - }; - - // enable code injection for non-built-in material - Object.defineProperty( boxMesh.material, 'envMap', { - - get: function () { - - return this.uniforms.envMap.value; - - } - - } ); - - objects.update( boxMesh ); - - } - - boxMesh.material.uniforms.envMap.value = background; - boxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background._needsFlipEnvMap ) ? - 1 : 1; - - if ( currentBackground !== background || - currentBackgroundVersion !== background.version || - currentTonemapping !== renderer.toneMapping ) { - - boxMesh.material.needsUpdate = true; - - currentBackground = background; - currentBackgroundVersion = background.version; - currentTonemapping = renderer.toneMapping; - - } - - // push to the pre-sorted opaque render list - renderList.unshift( boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null ); - - } else if ( background && background.isTexture ) { - - if ( planeMesh === undefined ) { - - planeMesh = new Mesh( - new PlaneGeometry( 2, 2 ), - new ShaderMaterial( { - name: 'BackgroundMaterial', - uniforms: cloneUniforms( ShaderLib.background.uniforms ), - vertexShader: ShaderLib.background.vertexShader, - fragmentShader: ShaderLib.background.fragmentShader, - side: FrontSide, - depthTest: false, - depthWrite: false, - fog: false - } ) - ); - - planeMesh.geometry.deleteAttribute( 'normal' ); - - // enable code injection for non-built-in material - Object.defineProperty( planeMesh.material, 'map', { - - get: function () { - - return this.uniforms.t2D.value; - - } - - } ); - - objects.update( planeMesh ); - - } - - planeMesh.material.uniforms.t2D.value = background; - - if ( background.matrixAutoUpdate === true ) { - - background.updateMatrix(); - - } - - planeMesh.material.uniforms.uvTransform.value.copy( background.matrix ); - - if ( currentBackground !== background || - currentBackgroundVersion !== background.version || - currentTonemapping !== renderer.toneMapping ) { - - planeMesh.material.needsUpdate = true; - - currentBackground = background; - currentBackgroundVersion = background.version; - currentTonemapping = renderer.toneMapping; - - } - - - // push to the pre-sorted opaque render list - renderList.unshift( planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null ); - - } - - } - - function setClear( color, alpha ) { - - state.buffers.color.setClear( color.r, color.g, color.b, alpha, premultipliedAlpha ); - - } - - return { - - getClearColor: function () { - - return clearColor; - - }, - setClearColor: function ( color, alpha = 1 ) { - - clearColor.set( color ); - clearAlpha = alpha; - setClear( clearColor, clearAlpha ); - - }, - getClearAlpha: function () { - - return clearAlpha; - - }, - setClearAlpha: function ( alpha ) { - - clearAlpha = alpha; - setClear( clearColor, clearAlpha ); - - }, - render: render - - }; - -} - -function WebGLBindingStates( gl, extensions, attributes, capabilities ) { - - const maxVertexAttributes = gl.getParameter( 34921 ); - - const extension = capabilities.isWebGL2 ? null : extensions.get( 'OES_vertex_array_object' ); - const vaoAvailable = capabilities.isWebGL2 || extension !== null; - - const bindingStates = {}; - - const defaultState = createBindingState( null ); - let currentState = defaultState; - - function setup( object, material, program, geometry, index ) { - - let updateBuffers = false; - - if ( vaoAvailable ) { - - const state = getBindingState( geometry, program, material ); - - if ( currentState !== state ) { - - currentState = state; - bindVertexArrayObject( currentState.object ); - - } - - updateBuffers = needsUpdate( geometry, index ); - - if ( updateBuffers ) saveCache( geometry, index ); - - } else { - - const wireframe = ( material.wireframe === true ); - - if ( currentState.geometry !== geometry.id || - currentState.program !== program.id || - currentState.wireframe !== wireframe ) { - - currentState.geometry = geometry.id; - currentState.program = program.id; - currentState.wireframe = wireframe; - - updateBuffers = true; - - } - - } - - if ( object.isInstancedMesh === true ) { - - updateBuffers = true; - - } - - if ( index !== null ) { - - attributes.update( index, 34963 ); - - } - - if ( updateBuffers ) { - - setupVertexAttributes( object, material, program, geometry ); - - if ( index !== null ) { - - gl.bindBuffer( 34963, attributes.get( index ).buffer ); - - } - - } - - } - - function createVertexArrayObject() { - - if ( capabilities.isWebGL2 ) return gl.createVertexArray(); - - return extension.createVertexArrayOES(); - - } - - function bindVertexArrayObject( vao ) { - - if ( capabilities.isWebGL2 ) return gl.bindVertexArray( vao ); - - return extension.bindVertexArrayOES( vao ); - - } - - function deleteVertexArrayObject( vao ) { - - if ( capabilities.isWebGL2 ) return gl.deleteVertexArray( vao ); - - return extension.deleteVertexArrayOES( vao ); - - } - - function getBindingState( geometry, program, material ) { - - const wireframe = ( material.wireframe === true ); - - let programMap = bindingStates[ geometry.id ]; - - if ( programMap === undefined ) { - - programMap = {}; - bindingStates[ geometry.id ] = programMap; - - } - - let stateMap = programMap[ program.id ]; - - if ( stateMap === undefined ) { - - stateMap = {}; - programMap[ program.id ] = stateMap; - - } - - let state = stateMap[ wireframe ]; - - if ( state === undefined ) { - - state = createBindingState( createVertexArrayObject() ); - stateMap[ wireframe ] = state; - - } - - return state; - - } - - function createBindingState( vao ) { - - const newAttributes = []; - const enabledAttributes = []; - const attributeDivisors = []; - - for ( let i = 0; i < maxVertexAttributes; i ++ ) { - - newAttributes[ i ] = 0; - enabledAttributes[ i ] = 0; - attributeDivisors[ i ] = 0; - - } - - return { - - // for backward compatibility on non-VAO support browser - geometry: null, - program: null, - wireframe: false, - - newAttributes: newAttributes, - enabledAttributes: enabledAttributes, - attributeDivisors: attributeDivisors, - object: vao, - attributes: {}, - index: null - - }; - - } - - function needsUpdate( geometry, index ) { - - const cachedAttributes = currentState.attributes; - const geometryAttributes = geometry.attributes; - - let attributesNum = 0; - - for ( const key in geometryAttributes ) { - - const cachedAttribute = cachedAttributes[ key ]; - const geometryAttribute = geometryAttributes[ key ]; - - if ( cachedAttribute === undefined ) return true; - - if ( cachedAttribute.attribute !== geometryAttribute ) return true; - - if ( cachedAttribute.data !== geometryAttribute.data ) return true; - - attributesNum ++; - - } - - if ( currentState.attributesNum !== attributesNum ) return true; - - if ( currentState.index !== index ) return true; - - return false; - - } - - function saveCache( geometry, index ) { - - const cache = {}; - const attributes = geometry.attributes; - let attributesNum = 0; - - for ( const key in attributes ) { - - const attribute = attributes[ key ]; - - const data = {}; - data.attribute = attribute; - - if ( attribute.data ) { - - data.data = attribute.data; - - } - - cache[ key ] = data; - - attributesNum ++; - - } - - currentState.attributes = cache; - currentState.attributesNum = attributesNum; - - currentState.index = index; - - } - - function initAttributes() { - - const newAttributes = currentState.newAttributes; - - for ( let i = 0, il = newAttributes.length; i < il; i ++ ) { - - newAttributes[ i ] = 0; - - } - - } - - function enableAttribute( attribute ) { - - enableAttributeAndDivisor( attribute, 0 ); - - } - - function enableAttributeAndDivisor( attribute, meshPerAttribute ) { - - const newAttributes = currentState.newAttributes; - const enabledAttributes = currentState.enabledAttributes; - const attributeDivisors = currentState.attributeDivisors; - - newAttributes[ attribute ] = 1; - - if ( enabledAttributes[ attribute ] === 0 ) { - - gl.enableVertexAttribArray( attribute ); - enabledAttributes[ attribute ] = 1; - - } - - if ( attributeDivisors[ attribute ] !== meshPerAttribute ) { - - const extension = capabilities.isWebGL2 ? gl : extensions.get( 'ANGLE_instanced_arrays' ); - - extension[ capabilities.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE' ]( attribute, meshPerAttribute ); - attributeDivisors[ attribute ] = meshPerAttribute; - - } - - } - - function disableUnusedAttributes() { - - const newAttributes = currentState.newAttributes; - const enabledAttributes = currentState.enabledAttributes; - - for ( let i = 0, il = enabledAttributes.length; i < il; i ++ ) { - - if ( enabledAttributes[ i ] !== newAttributes[ i ] ) { - - gl.disableVertexAttribArray( i ); - enabledAttributes[ i ] = 0; - - } - - } - - } - - function vertexAttribPointer( index, size, type, normalized, stride, offset ) { - - if ( capabilities.isWebGL2 === true && ( type === 5124 || type === 5125 ) ) { - - gl.vertexAttribIPointer( index, size, type, stride, offset ); - - } else { - - gl.vertexAttribPointer( index, size, type, normalized, stride, offset ); - - } - - } - - function setupVertexAttributes( object, material, program, geometry ) { - - if ( capabilities.isWebGL2 === false && ( object.isInstancedMesh || geometry.isInstancedBufferGeometry ) ) { - - if ( extensions.get( 'ANGLE_instanced_arrays' ) === null ) return; - - } - - initAttributes(); - - const geometryAttributes = geometry.attributes; - - const programAttributes = program.getAttributes(); - - const materialDefaultAttributeValues = material.defaultAttributeValues; - - for ( const name in programAttributes ) { - - const programAttribute = programAttributes[ name ]; - - if ( programAttribute >= 0 ) { - - const geometryAttribute = geometryAttributes[ name ]; - - if ( geometryAttribute !== undefined ) { - - const normalized = geometryAttribute.normalized; - const size = geometryAttribute.itemSize; - - const attribute = attributes.get( geometryAttribute ); - - // TODO Attribute may not be available on context restore - - if ( attribute === undefined ) continue; - - const buffer = attribute.buffer; - const type = attribute.type; - const bytesPerElement = attribute.bytesPerElement; - - if ( geometryAttribute.isInterleavedBufferAttribute ) { - - const data = geometryAttribute.data; - const stride = data.stride; - const offset = geometryAttribute.offset; - - if ( data && data.isInstancedInterleavedBuffer ) { - - enableAttributeAndDivisor( programAttribute, data.meshPerAttribute ); - - if ( geometry._maxInstanceCount === undefined ) { - - geometry._maxInstanceCount = data.meshPerAttribute * data.count; - - } - - } else { - - enableAttribute( programAttribute ); - - } - - gl.bindBuffer( 34962, buffer ); - vertexAttribPointer( programAttribute, size, type, normalized, stride * bytesPerElement, offset * bytesPerElement ); - - } else { - - if ( geometryAttribute.isInstancedBufferAttribute ) { - - enableAttributeAndDivisor( programAttribute, geometryAttribute.meshPerAttribute ); - - if ( geometry._maxInstanceCount === undefined ) { - - geometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count; - - } - - } else { - - enableAttribute( programAttribute ); - - } - - gl.bindBuffer( 34962, buffer ); - vertexAttribPointer( programAttribute, size, type, normalized, 0, 0 ); - - } - - } else if ( name === 'instanceMatrix' ) { - - const attribute = attributes.get( object.instanceMatrix ); - - // TODO Attribute may not be available on context restore - - if ( attribute === undefined ) continue; - - const buffer = attribute.buffer; - const type = attribute.type; - - enableAttributeAndDivisor( programAttribute + 0, 1 ); - enableAttributeAndDivisor( programAttribute + 1, 1 ); - enableAttributeAndDivisor( programAttribute + 2, 1 ); - enableAttributeAndDivisor( programAttribute + 3, 1 ); - - gl.bindBuffer( 34962, buffer ); - - gl.vertexAttribPointer( programAttribute + 0, 4, type, false, 64, 0 ); - gl.vertexAttribPointer( programAttribute + 1, 4, type, false, 64, 16 ); - gl.vertexAttribPointer( programAttribute + 2, 4, type, false, 64, 32 ); - gl.vertexAttribPointer( programAttribute + 3, 4, type, false, 64, 48 ); - - } else if ( name === 'instanceColor' ) { - - const attribute = attributes.get( object.instanceColor ); - - // TODO Attribute may not be available on context restore - - if ( attribute === undefined ) continue; - - const buffer = attribute.buffer; - const type = attribute.type; - - enableAttributeAndDivisor( programAttribute, 1 ); - - gl.bindBuffer( 34962, buffer ); - - gl.vertexAttribPointer( programAttribute, 3, type, false, 12, 0 ); - - } else if ( materialDefaultAttributeValues !== undefined ) { - - const value = materialDefaultAttributeValues[ name ]; - - if ( value !== undefined ) { - - switch ( value.length ) { - - case 2: - gl.vertexAttrib2fv( programAttribute, value ); - break; - - case 3: - gl.vertexAttrib3fv( programAttribute, value ); - break; - - case 4: - gl.vertexAttrib4fv( programAttribute, value ); - break; - - default: - gl.vertexAttrib1fv( programAttribute, value ); - - } - - } - - } - - } - - } - - disableUnusedAttributes(); - - } - - function dispose() { - - reset(); - - for ( const geometryId in bindingStates ) { - - const programMap = bindingStates[ geometryId ]; - - for ( const programId in programMap ) { - - const stateMap = programMap[ programId ]; - - for ( const wireframe in stateMap ) { - - deleteVertexArrayObject( stateMap[ wireframe ].object ); - - delete stateMap[ wireframe ]; - - } - - delete programMap[ programId ]; - - } - - delete bindingStates[ geometryId ]; - - } - - } - - function releaseStatesOfGeometry( geometry ) { - - if ( bindingStates[ geometry.id ] === undefined ) return; - - const programMap = bindingStates[ geometry.id ]; - - for ( const programId in programMap ) { - - const stateMap = programMap[ programId ]; - - for ( const wireframe in stateMap ) { - - deleteVertexArrayObject( stateMap[ wireframe ].object ); - - delete stateMap[ wireframe ]; - - } - - delete programMap[ programId ]; - - } - - delete bindingStates[ geometry.id ]; - - } - - function releaseStatesOfProgram( program ) { - - for ( const geometryId in bindingStates ) { - - const programMap = bindingStates[ geometryId ]; - - if ( programMap[ program.id ] === undefined ) continue; - - const stateMap = programMap[ program.id ]; - - for ( const wireframe in stateMap ) { - - deleteVertexArrayObject( stateMap[ wireframe ].object ); - - delete stateMap[ wireframe ]; - - } - - delete programMap[ program.id ]; - - } - - } - - function reset() { - - resetDefaultState(); - - if ( currentState === defaultState ) return; - - currentState = defaultState; - bindVertexArrayObject( currentState.object ); - - } - - // for backward-compatilibity - - function resetDefaultState() { - - defaultState.geometry = null; - defaultState.program = null; - defaultState.wireframe = false; - - } - - return { - - setup: setup, - reset: reset, - resetDefaultState: resetDefaultState, - dispose: dispose, - releaseStatesOfGeometry: releaseStatesOfGeometry, - releaseStatesOfProgram: releaseStatesOfProgram, - - initAttributes: initAttributes, - enableAttribute: enableAttribute, - disableUnusedAttributes: disableUnusedAttributes - - }; - -} - -function WebGLBufferRenderer( gl, extensions, info, capabilities ) { - - const isWebGL2 = capabilities.isWebGL2; - - let mode; - - function setMode( value ) { - - mode = value; - - } - - function render( start, count ) { - - gl.drawArrays( mode, start, count ); - - info.update( count, mode, 1 ); - - } - - function renderInstances( start, count, primcount ) { - - if ( primcount === 0 ) return; - - let extension, methodName; - - if ( isWebGL2 ) { - - extension = gl; - methodName = 'drawArraysInstanced'; - - } else { - - extension = extensions.get( 'ANGLE_instanced_arrays' ); - methodName = 'drawArraysInstancedANGLE'; - - if ( extension === null ) { - - console.error( 'THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' ); - return; - - } - - } - - extension[ methodName ]( mode, start, count, primcount ); - - info.update( count, mode, primcount ); - - } - - // - - this.setMode = setMode; - this.render = render; - this.renderInstances = renderInstances; - -} - -function WebGLCapabilities( gl, extensions, parameters ) { - - let maxAnisotropy; - - function getMaxAnisotropy() { - - if ( maxAnisotropy !== undefined ) return maxAnisotropy; - - if ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) { - - const extension = extensions.get( 'EXT_texture_filter_anisotropic' ); - - maxAnisotropy = gl.getParameter( extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT ); - - } else { - - maxAnisotropy = 0; - - } - - return maxAnisotropy; - - } - - function getMaxPrecision( precision ) { - - if ( precision === 'highp' ) { - - if ( gl.getShaderPrecisionFormat( 35633, 36338 ).precision > 0 && - gl.getShaderPrecisionFormat( 35632, 36338 ).precision > 0 ) { - - return 'highp'; - - } - - precision = 'mediump'; - - } - - if ( precision === 'mediump' ) { - - if ( gl.getShaderPrecisionFormat( 35633, 36337 ).precision > 0 && - gl.getShaderPrecisionFormat( 35632, 36337 ).precision > 0 ) { - - return 'mediump'; - - } - - } - - return 'lowp'; - - } - - /* eslint-disable no-undef */ - const isWebGL2 = ( typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext ) || - ( typeof WebGL2ComputeRenderingContext !== 'undefined' && gl instanceof WebGL2ComputeRenderingContext ); - /* eslint-enable no-undef */ - - let precision = parameters.precision !== undefined ? parameters.precision : 'highp'; - const maxPrecision = getMaxPrecision( precision ); - - if ( maxPrecision !== precision ) { - - console.warn( 'THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.' ); - precision = maxPrecision; - - } - - const drawBuffers = isWebGL2 || extensions.has( 'WEBGL_draw_buffers' ); - - const logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true; - - const maxTextures = gl.getParameter( 34930 ); - const maxVertexTextures = gl.getParameter( 35660 ); - const maxTextureSize = gl.getParameter( 3379 ); - const maxCubemapSize = gl.getParameter( 34076 ); - - const maxAttributes = gl.getParameter( 34921 ); - const maxVertexUniforms = gl.getParameter( 36347 ); - const maxVaryings = gl.getParameter( 36348 ); - const maxFragmentUniforms = gl.getParameter( 36349 ); - - const vertexTextures = maxVertexTextures > 0; - const floatFragmentTextures = isWebGL2 || extensions.has( 'OES_texture_float' ); - const floatVertexTextures = vertexTextures && floatFragmentTextures; - - const maxSamples = isWebGL2 ? gl.getParameter( 36183 ) : 0; - - return { - - isWebGL2: isWebGL2, - - drawBuffers: drawBuffers, - - getMaxAnisotropy: getMaxAnisotropy, - getMaxPrecision: getMaxPrecision, - - precision: precision, - logarithmicDepthBuffer: logarithmicDepthBuffer, - - maxTextures: maxTextures, - maxVertexTextures: maxVertexTextures, - maxTextureSize: maxTextureSize, - maxCubemapSize: maxCubemapSize, - - maxAttributes: maxAttributes, - maxVertexUniforms: maxVertexUniforms, - maxVaryings: maxVaryings, - maxFragmentUniforms: maxFragmentUniforms, - - vertexTextures: vertexTextures, - floatFragmentTextures: floatFragmentTextures, - floatVertexTextures: floatVertexTextures, - - maxSamples: maxSamples - - }; - -} - -function WebGLClipping( properties ) { - - const scope = this; - - let globalState = null, - numGlobalPlanes = 0, - localClippingEnabled = false, - renderingShadows = false; - - const plane = new Plane(), - viewNormalMatrix = new Matrix3(), - - uniform = { value: null, needsUpdate: false }; - - this.uniform = uniform; - this.numPlanes = 0; - this.numIntersection = 0; - - this.init = function ( planes, enableLocalClipping, camera ) { - - const enabled = - planes.length !== 0 || - enableLocalClipping || - // enable state of previous frame - the clipping code has to - // run another frame in order to reset the state: - numGlobalPlanes !== 0 || - localClippingEnabled; - - localClippingEnabled = enableLocalClipping; - - globalState = projectPlanes( planes, camera, 0 ); - numGlobalPlanes = planes.length; - - return enabled; - - }; - - this.beginShadows = function () { - - renderingShadows = true; - projectPlanes( null ); - - }; - - this.endShadows = function () { - - renderingShadows = false; - resetGlobalState(); - - }; - - this.setState = function ( material, camera, useCache ) { - - const planes = material.clippingPlanes, - clipIntersection = material.clipIntersection, - clipShadows = material.clipShadows; - - const materialProperties = properties.get( material ); - - if ( ! localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && ! clipShadows ) { - - // there's no local clipping - - if ( renderingShadows ) { - - // there's no global clipping - - projectPlanes( null ); - - } else { - - resetGlobalState(); - - } - - } else { - - const nGlobal = renderingShadows ? 0 : numGlobalPlanes, - lGlobal = nGlobal * 4; - - let dstArray = materialProperties.clippingState || null; - - uniform.value = dstArray; // ensure unique state - - dstArray = projectPlanes( planes, camera, lGlobal, useCache ); - - for ( let i = 0; i !== lGlobal; ++ i ) { - - dstArray[ i ] = globalState[ i ]; - - } - - materialProperties.clippingState = dstArray; - this.numIntersection = clipIntersection ? this.numPlanes : 0; - this.numPlanes += nGlobal; - - } - - - }; - - function resetGlobalState() { - - if ( uniform.value !== globalState ) { - - uniform.value = globalState; - uniform.needsUpdate = numGlobalPlanes > 0; - - } - - scope.numPlanes = numGlobalPlanes; - scope.numIntersection = 0; - - } - - function projectPlanes( planes, camera, dstOffset, skipTransform ) { - - const nPlanes = planes !== null ? planes.length : 0; - let dstArray = null; - - if ( nPlanes !== 0 ) { - - dstArray = uniform.value; - - if ( skipTransform !== true || dstArray === null ) { - - const flatSize = dstOffset + nPlanes * 4, - viewMatrix = camera.matrixWorldInverse; - - viewNormalMatrix.getNormalMatrix( viewMatrix ); - - if ( dstArray === null || dstArray.length < flatSize ) { - - dstArray = new Float32Array( flatSize ); - - } - - for ( let i = 0, i4 = dstOffset; i !== nPlanes; ++ i, i4 += 4 ) { - - plane.copy( planes[ i ] ).applyMatrix4( viewMatrix, viewNormalMatrix ); - - plane.normal.toArray( dstArray, i4 ); - dstArray[ i4 + 3 ] = plane.constant; - - } - - } - - uniform.value = dstArray; - uniform.needsUpdate = true; - - } - - scope.numPlanes = nPlanes; - scope.numIntersection = 0; - - return dstArray; - - } - -} - -function WebGLCubeMaps( renderer ) { - - let cubemaps = new WeakMap(); - - function mapTextureMapping( texture, mapping ) { - - if ( mapping === EquirectangularReflectionMapping ) { - - texture.mapping = CubeReflectionMapping; - - } else if ( mapping === EquirectangularRefractionMapping ) { - - texture.mapping = CubeRefractionMapping; - - } - - return texture; - - } - - function get( texture ) { - - if ( texture && texture.isTexture ) { - - const mapping = texture.mapping; - - if ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ) { - - if ( cubemaps.has( texture ) ) { - - const cubemap = cubemaps.get( texture ).texture; - return mapTextureMapping( cubemap, texture.mapping ); - - } else { - - const image = texture.image; - - if ( image && image.height > 0 ) { - - const currentRenderTarget = renderer.getRenderTarget(); - - const renderTarget = new WebGLCubeRenderTarget( image.height / 2 ); - renderTarget.fromEquirectangularTexture( renderer, texture ); - cubemaps.set( texture, renderTarget ); - - renderer.setRenderTarget( currentRenderTarget ); - - texture.addEventListener( 'dispose', onTextureDispose ); - - return mapTextureMapping( renderTarget.texture, texture.mapping ); - - } else { - - // image not yet ready. try the conversion next frame - - return null; - - } - - } - - } - - } - - return texture; - - } - - function onTextureDispose( event ) { - - const texture = event.target; - - texture.removeEventListener( 'dispose', onTextureDispose ); - - const cubemap = cubemaps.get( texture ); - - if ( cubemap !== undefined ) { - - cubemaps.delete( texture ); - cubemap.dispose(); - - } - - } - - function dispose() { - - cubemaps = new WeakMap(); - - } - - return { - get: get, - dispose: dispose - }; - -} - -function WebGLExtensions( gl ) { - - const extensions = {}; - - function getExtension( name ) { - - if ( extensions[ name ] !== undefined ) { - - return extensions[ name ]; - - } - - let extension; - - switch ( name ) { - - case 'WEBGL_depth_texture': - extension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' ); - break; - - case 'EXT_texture_filter_anisotropic': - extension = gl.getExtension( 'EXT_texture_filter_anisotropic' ) || gl.getExtension( 'MOZ_EXT_texture_filter_anisotropic' ) || gl.getExtension( 'WEBKIT_EXT_texture_filter_anisotropic' ); - break; - - case 'WEBGL_compressed_texture_s3tc': - extension = gl.getExtension( 'WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'MOZ_WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_s3tc' ); - break; - - case 'WEBGL_compressed_texture_pvrtc': - extension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' ); - break; - - default: - extension = gl.getExtension( name ); - - } - - extensions[ name ] = extension; - - return extension; - - } - - return { - - has: function ( name ) { - - return getExtension( name ) !== null; - - }, - - init: function ( capabilities ) { - - if ( capabilities.isWebGL2 ) { - - getExtension( 'EXT_color_buffer_float' ); - - } else { - - getExtension( 'WEBGL_depth_texture' ); - getExtension( 'OES_texture_float' ); - getExtension( 'OES_texture_half_float' ); - getExtension( 'OES_texture_half_float_linear' ); - getExtension( 'OES_standard_derivatives' ); - getExtension( 'OES_element_index_uint' ); - getExtension( 'OES_vertex_array_object' ); - getExtension( 'ANGLE_instanced_arrays' ); - - } - - getExtension( 'OES_texture_float_linear' ); - getExtension( 'EXT_color_buffer_half_float' ); - - }, - - get: function ( name ) { - - const extension = getExtension( name ); - - if ( extension === null ) { - - console.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' ); - - } - - return extension; - - } - - }; - -} - -function WebGLGeometries( gl, attributes, info, bindingStates ) { - - const geometries = {}; - const wireframeAttributes = new WeakMap(); - - function onGeometryDispose( event ) { - - const geometry = event.target; - - if ( geometry.index !== null ) { - - attributes.remove( geometry.index ); - - } - - for ( const name in geometry.attributes ) { - - attributes.remove( geometry.attributes[ name ] ); - - } - - geometry.removeEventListener( 'dispose', onGeometryDispose ); - - delete geometries[ geometry.id ]; - - const attribute = wireframeAttributes.get( geometry ); - - if ( attribute ) { - - attributes.remove( attribute ); - wireframeAttributes.delete( geometry ); - - } - - bindingStates.releaseStatesOfGeometry( geometry ); - - if ( geometry.isInstancedBufferGeometry === true ) { - - delete geometry._maxInstanceCount; - - } - - // - - info.memory.geometries --; - - } - - function get( object, geometry ) { - - if ( geometries[ geometry.id ] === true ) return geometry; - - geometry.addEventListener( 'dispose', onGeometryDispose ); - - geometries[ geometry.id ] = true; - - info.memory.geometries ++; - - return geometry; - - } - - function update( geometry ) { - - const geometryAttributes = geometry.attributes; - - // Updating index buffer in VAO now. See WebGLBindingStates. - - for ( const name in geometryAttributes ) { - - attributes.update( geometryAttributes[ name ], 34962 ); - - } - - // morph targets - - const morphAttributes = geometry.morphAttributes; - - for ( const name in morphAttributes ) { - - const array = morphAttributes[ name ]; - - for ( let i = 0, l = array.length; i < l; i ++ ) { - - attributes.update( array[ i ], 34962 ); - - } - - } - - } - - function updateWireframeAttribute( geometry ) { - - const indices = []; - - const geometryIndex = geometry.index; - const geometryPosition = geometry.attributes.position; - let version = 0; - - if ( geometryIndex !== null ) { - - const array = geometryIndex.array; - version = geometryIndex.version; - - for ( let i = 0, l = array.length; i < l; i += 3 ) { - - const a = array[ i + 0 ]; - const b = array[ i + 1 ]; - const c = array[ i + 2 ]; - - indices.push( a, b, b, c, c, a ); - - } - - } else { - - const array = geometryPosition.array; - version = geometryPosition.version; - - for ( let i = 0, l = ( array.length / 3 ) - 1; i < l; i += 3 ) { - - const a = i + 0; - const b = i + 1; - const c = i + 2; - - indices.push( a, b, b, c, c, a ); - - } - - } - - const attribute = new ( arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ); - attribute.version = version; - - // Updating index buffer in VAO now. See WebGLBindingStates - - // - - const previousAttribute = wireframeAttributes.get( geometry ); - - if ( previousAttribute ) attributes.remove( previousAttribute ); - - // - - wireframeAttributes.set( geometry, attribute ); - - } - - function getWireframeAttribute( geometry ) { - - const currentAttribute = wireframeAttributes.get( geometry ); - - if ( currentAttribute ) { - - const geometryIndex = geometry.index; - - if ( geometryIndex !== null ) { - - // if the attribute is obsolete, create a new one - - if ( currentAttribute.version < geometryIndex.version ) { - - updateWireframeAttribute( geometry ); - - } - - } - - } else { - - updateWireframeAttribute( geometry ); - - } - - return wireframeAttributes.get( geometry ); - - } - - return { - - get: get, - update: update, - - getWireframeAttribute: getWireframeAttribute - - }; - -} - -function WebGLIndexedBufferRenderer( gl, extensions, info, capabilities ) { - - const isWebGL2 = capabilities.isWebGL2; - - let mode; - - function setMode( value ) { - - mode = value; - - } - - let type, bytesPerElement; - - function setIndex( value ) { - - type = value.type; - bytesPerElement = value.bytesPerElement; - - } - - function render( start, count ) { - - gl.drawElements( mode, count, type, start * bytesPerElement ); - - info.update( count, mode, 1 ); - - } - - function renderInstances( start, count, primcount ) { - - if ( primcount === 0 ) return; - - let extension, methodName; - - if ( isWebGL2 ) { - - extension = gl; - methodName = 'drawElementsInstanced'; - - } else { - - extension = extensions.get( 'ANGLE_instanced_arrays' ); - methodName = 'drawElementsInstancedANGLE'; - - if ( extension === null ) { - - console.error( 'THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' ); - return; - - } - - } - - extension[ methodName ]( mode, count, type, start * bytesPerElement, primcount ); - - info.update( count, mode, primcount ); - - } - - // - - this.setMode = setMode; - this.setIndex = setIndex; - this.render = render; - this.renderInstances = renderInstances; - -} - -function WebGLInfo( gl ) { - - const memory = { - geometries: 0, - textures: 0 - }; - - const render = { - frame: 0, - calls: 0, - triangles: 0, - points: 0, - lines: 0 - }; - - function update( count, mode, instanceCount ) { - - render.calls ++; - - switch ( mode ) { - - case 4: - render.triangles += instanceCount * ( count / 3 ); - break; - - case 1: - render.lines += instanceCount * ( count / 2 ); - break; - - case 3: - render.lines += instanceCount * ( count - 1 ); - break; - - case 2: - render.lines += instanceCount * count; - break; - - case 0: - render.points += instanceCount * count; - break; - - default: - console.error( 'THREE.WebGLInfo: Unknown draw mode:', mode ); - break; - - } - - } - - function reset() { - - render.frame ++; - render.calls = 0; - render.triangles = 0; - render.points = 0; - render.lines = 0; - - } - - return { - memory: memory, - render: render, - programs: null, - autoReset: true, - reset: reset, - update: update - }; - -} - -function numericalSort( a, b ) { - - return a[ 0 ] - b[ 0 ]; - -} - -function absNumericalSort( a, b ) { - - return Math.abs( b[ 1 ] ) - Math.abs( a[ 1 ] ); - -} - -function WebGLMorphtargets( gl ) { - - const influencesList = {}; - const morphInfluences = new Float32Array( 8 ); - - const workInfluences = []; - - for ( let i = 0; i < 8; i ++ ) { - - workInfluences[ i ] = [ i, 0 ]; - - } - - function update( object, geometry, material, program ) { - - const objectInfluences = object.morphTargetInfluences; - - // When object doesn't have morph target influences defined, we treat it as a 0-length array - // This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences - - const length = objectInfluences === undefined ? 0 : objectInfluences.length; - - let influences = influencesList[ geometry.id ]; - - if ( influences === undefined || influences.length !== length ) { - - // initialise list - - influences = []; - - for ( let i = 0; i < length; i ++ ) { - - influences[ i ] = [ i, 0 ]; - - } - - influencesList[ geometry.id ] = influences; - - } - - // Collect influences - - for ( let i = 0; i < length; i ++ ) { - - const influence = influences[ i ]; - - influence[ 0 ] = i; - influence[ 1 ] = objectInfluences[ i ]; - - } - - influences.sort( absNumericalSort ); - - for ( let i = 0; i < 8; i ++ ) { - - if ( i < length && influences[ i ][ 1 ] ) { - - workInfluences[ i ][ 0 ] = influences[ i ][ 0 ]; - workInfluences[ i ][ 1 ] = influences[ i ][ 1 ]; - - } else { - - workInfluences[ i ][ 0 ] = Number.MAX_SAFE_INTEGER; - workInfluences[ i ][ 1 ] = 0; - - } - - } - - workInfluences.sort( numericalSort ); - - const morphTargets = material.morphTargets && geometry.morphAttributes.position; - const morphNormals = material.morphNormals && geometry.morphAttributes.normal; - - let morphInfluencesSum = 0; - - for ( let i = 0; i < 8; i ++ ) { - - const influence = workInfluences[ i ]; - const index = influence[ 0 ]; - const value = influence[ 1 ]; - - if ( index !== Number.MAX_SAFE_INTEGER && value ) { - - if ( morphTargets && geometry.getAttribute( 'morphTarget' + i ) !== morphTargets[ index ] ) { - - geometry.setAttribute( 'morphTarget' + i, morphTargets[ index ] ); - - } - - if ( morphNormals && geometry.getAttribute( 'morphNormal' + i ) !== morphNormals[ index ] ) { - - geometry.setAttribute( 'morphNormal' + i, morphNormals[ index ] ); - - } - - morphInfluences[ i ] = value; - morphInfluencesSum += value; - - } else { - - if ( morphTargets && geometry.hasAttribute( 'morphTarget' + i ) === true ) { - - geometry.deleteAttribute( 'morphTarget' + i ); - - } - - if ( morphNormals && geometry.hasAttribute( 'morphNormal' + i ) === true ) { - - geometry.deleteAttribute( 'morphNormal' + i ); - - } - - morphInfluences[ i ] = 0; - - } - - } - - // GLSL shader uses formula baseinfluence * base + sum(target * influence) - // This allows us to switch between absolute morphs and relative morphs without changing shader code - // When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence) - const morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum; - - program.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence ); - program.getUniforms().setValue( gl, 'morphTargetInfluences', morphInfluences ); - - } - - return { - - update: update - - }; - -} - -function WebGLObjects( gl, geometries, attributes, info ) { - - let updateMap = new WeakMap(); - - function update( object ) { - - const frame = info.render.frame; - - const geometry = object.geometry; - const buffergeometry = geometries.get( object, geometry ); - - // Update once per frame - - if ( updateMap.get( buffergeometry ) !== frame ) { - - geometries.update( buffergeometry ); - - updateMap.set( buffergeometry, frame ); - - } - - if ( object.isInstancedMesh ) { - - if ( object.hasEventListener( 'dispose', onInstancedMeshDispose ) === false ) { - - object.addEventListener( 'dispose', onInstancedMeshDispose ); - - } - - attributes.update( object.instanceMatrix, 34962 ); - - if ( object.instanceColor !== null ) { - - attributes.update( object.instanceColor, 34962 ); - - } - - } - - return buffergeometry; - - } - - function dispose() { - - updateMap = new WeakMap(); - - } - - function onInstancedMeshDispose( event ) { - - const instancedMesh = event.target; - - instancedMesh.removeEventListener( 'dispose', onInstancedMeshDispose ); - - attributes.remove( instancedMesh.instanceMatrix ); - - if ( instancedMesh.instanceColor !== null ) attributes.remove( instancedMesh.instanceColor ); - - } - - return { - - update: update, - dispose: dispose - - }; - -} - -class DataTexture2DArray extends Texture { - - constructor( data = null, width = 1, height = 1, depth = 1 ) { - - super( null ); - - this.image = { data, width, height, depth }; - - this.magFilter = NearestFilter; - this.minFilter = NearestFilter; - - this.wrapR = ClampToEdgeWrapping; - - this.generateMipmaps = false; - this.flipY = false; - this.unpackAlignment = 1; - - this.needsUpdate = true; - - } - -} - -DataTexture2DArray.prototype.isDataTexture2DArray = true; - -class DataTexture3D extends Texture { - - constructor( data = null, width = 1, height = 1, depth = 1 ) { - - // We're going to add .setXXX() methods for setting properties later. - // Users can still set in DataTexture3D directly. - // - // const texture = new THREE.DataTexture3D( data, width, height, depth ); - // texture.anisotropy = 16; - // - // See #14839 - - super( null ); - - this.image = { data, width, height, depth }; - - this.magFilter = NearestFilter; - this.minFilter = NearestFilter; - - this.wrapR = ClampToEdgeWrapping; - - this.generateMipmaps = false; - this.flipY = false; - this.unpackAlignment = 1; - - this.needsUpdate = true; - - } - -} - -DataTexture3D.prototype.isDataTexture3D = true; - -/** - * Uniforms of a program. - * Those form a tree structure with a special top-level container for the root, - * which you get by calling 'new WebGLUniforms( gl, program )'. - * - * - * Properties of inner nodes including the top-level container: - * - * .seq - array of nested uniforms - * .map - nested uniforms by name - * - * - * Methods of all nodes except the top-level container: - * - * .setValue( gl, value, [textures] ) - * - * uploads a uniform value(s) - * the 'textures' parameter is needed for sampler uniforms - * - * - * Static methods of the top-level container (textures factorizations): - * - * .upload( gl, seq, values, textures ) - * - * sets uniforms in 'seq' to 'values[id].value' - * - * .seqWithValue( seq, values ) : filteredSeq - * - * filters 'seq' entries with corresponding entry in values - * - * - * Methods of the top-level container (textures factorizations): - * - * .setValue( gl, name, value, textures ) - * - * sets uniform with name 'name' to 'value' - * - * .setOptional( gl, obj, prop ) - * - * like .set for an optional property of the object - * - */ - -const emptyTexture = new Texture(); -const emptyTexture2dArray = new DataTexture2DArray(); -const emptyTexture3d = new DataTexture3D(); -const emptyCubeTexture = new CubeTexture(); - -// --- Utilities --- - -// Array Caches (provide typed arrays for temporary by size) - -const arrayCacheF32 = []; -const arrayCacheI32 = []; - -// Float32Array caches used for uploading Matrix uniforms - -const mat4array = new Float32Array( 16 ); -const mat3array = new Float32Array( 9 ); -const mat2array = new Float32Array( 4 ); - -// Flattening for arrays of vectors and matrices - -function flatten( array, nBlocks, blockSize ) { - - const firstElem = array[ 0 ]; - - if ( firstElem <= 0 || firstElem > 0 ) return array; - // unoptimized: ! isNaN( firstElem ) - // see http://jacksondunstan.com/articles/983 - - const n = nBlocks * blockSize; - let r = arrayCacheF32[ n ]; - - if ( r === undefined ) { - - r = new Float32Array( n ); - arrayCacheF32[ n ] = r; - - } - - if ( nBlocks !== 0 ) { - - firstElem.toArray( r, 0 ); - - for ( let i = 1, offset = 0; i !== nBlocks; ++ i ) { - - offset += blockSize; - array[ i ].toArray( r, offset ); - - } - - } - - return r; - -} - -function arraysEqual( a, b ) { - - if ( a.length !== b.length ) return false; - - for ( let i = 0, l = a.length; i < l; i ++ ) { - - if ( a[ i ] !== b[ i ] ) return false; - - } - - return true; - -} - -function copyArray( a, b ) { - - for ( let i = 0, l = b.length; i < l; i ++ ) { - - a[ i ] = b[ i ]; - - } - -} - -// Texture unit allocation - -function allocTexUnits( textures, n ) { - - let r = arrayCacheI32[ n ]; - - if ( r === undefined ) { - - r = new Int32Array( n ); - arrayCacheI32[ n ] = r; - - } - - for ( let i = 0; i !== n; ++ i ) { - - r[ i ] = textures.allocateTextureUnit(); - - } - - return r; - -} - -// --- Setters --- - -// Note: Defining these methods externally, because they come in a bunch -// and this way their names minify. - -// Single scalar - -function setValueV1f( gl, v ) { - - const cache = this.cache; - - if ( cache[ 0 ] === v ) return; - - gl.uniform1f( this.addr, v ); - - cache[ 0 ] = v; - -} - -// Single float vector (from flat array or THREE.VectorN) - -function setValueV2f( gl, v ) { - - const cache = this.cache; - - if ( v.x !== undefined ) { - - if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) { - - gl.uniform2f( this.addr, v.x, v.y ); - - cache[ 0 ] = v.x; - cache[ 1 ] = v.y; - - } - - } else { - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform2fv( this.addr, v ); - - copyArray( cache, v ); - - } - -} - -function setValueV3f( gl, v ) { - - const cache = this.cache; - - if ( v.x !== undefined ) { - - if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) { - - gl.uniform3f( this.addr, v.x, v.y, v.z ); - - cache[ 0 ] = v.x; - cache[ 1 ] = v.y; - cache[ 2 ] = v.z; - - } - - } else if ( v.r !== undefined ) { - - if ( cache[ 0 ] !== v.r || cache[ 1 ] !== v.g || cache[ 2 ] !== v.b ) { - - gl.uniform3f( this.addr, v.r, v.g, v.b ); - - cache[ 0 ] = v.r; - cache[ 1 ] = v.g; - cache[ 2 ] = v.b; - - } - - } else { - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform3fv( this.addr, v ); - - copyArray( cache, v ); - - } - -} - -function setValueV4f( gl, v ) { - - const cache = this.cache; - - if ( v.x !== undefined ) { - - if ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) { - - gl.uniform4f( this.addr, v.x, v.y, v.z, v.w ); - - cache[ 0 ] = v.x; - cache[ 1 ] = v.y; - cache[ 2 ] = v.z; - cache[ 3 ] = v.w; - - } - - } else { - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform4fv( this.addr, v ); - - copyArray( cache, v ); - - } - -} - -// Single matrix (from flat array or THREE.MatrixN) - -function setValueM2( gl, v ) { - - const cache = this.cache; - const elements = v.elements; - - if ( elements === undefined ) { - - if ( arraysEqual( cache, v ) ) return; - - gl.uniformMatrix2fv( this.addr, false, v ); - - copyArray( cache, v ); - - } else { - - if ( arraysEqual( cache, elements ) ) return; - - mat2array.set( elements ); - - gl.uniformMatrix2fv( this.addr, false, mat2array ); - - copyArray( cache, elements ); - - } - -} - -function setValueM3( gl, v ) { - - const cache = this.cache; - const elements = v.elements; - - if ( elements === undefined ) { - - if ( arraysEqual( cache, v ) ) return; - - gl.uniformMatrix3fv( this.addr, false, v ); - - copyArray( cache, v ); - - } else { - - if ( arraysEqual( cache, elements ) ) return; - - mat3array.set( elements ); - - gl.uniformMatrix3fv( this.addr, false, mat3array ); - - copyArray( cache, elements ); - - } - -} - -function setValueM4( gl, v ) { - - const cache = this.cache; - const elements = v.elements; - - if ( elements === undefined ) { - - if ( arraysEqual( cache, v ) ) return; - - gl.uniformMatrix4fv( this.addr, false, v ); - - copyArray( cache, v ); - - } else { - - if ( arraysEqual( cache, elements ) ) return; - - mat4array.set( elements ); - - gl.uniformMatrix4fv( this.addr, false, mat4array ); - - copyArray( cache, elements ); - - } - -} - -// Single integer / boolean - -function setValueV1i( gl, v ) { - - const cache = this.cache; - - if ( cache[ 0 ] === v ) return; - - gl.uniform1i( this.addr, v ); - - cache[ 0 ] = v; - -} - -// Single integer / boolean vector (from flat array) - -function setValueV2i( gl, v ) { - - const cache = this.cache; - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform2iv( this.addr, v ); - - copyArray( cache, v ); - -} - -function setValueV3i( gl, v ) { - - const cache = this.cache; - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform3iv( this.addr, v ); - - copyArray( cache, v ); - -} - -function setValueV4i( gl, v ) { - - const cache = this.cache; - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform4iv( this.addr, v ); - - copyArray( cache, v ); - -} - -// Single unsigned integer - -function setValueV1ui( gl, v ) { - - const cache = this.cache; - - if ( cache[ 0 ] === v ) return; - - gl.uniform1ui( this.addr, v ); - - cache[ 0 ] = v; - -} - -// Single unsigned integer vector (from flat array) - -function setValueV2ui( gl, v ) { - - const cache = this.cache; - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform2uiv( this.addr, v ); - - copyArray( cache, v ); - -} - -function setValueV3ui( gl, v ) { - - const cache = this.cache; - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform3uiv( this.addr, v ); - - copyArray( cache, v ); - -} - -function setValueV4ui( gl, v ) { - - const cache = this.cache; - - if ( arraysEqual( cache, v ) ) return; - - gl.uniform4uiv( this.addr, v ); - - copyArray( cache, v ); - -} - - -// Single texture (2D / Cube) - -function setValueT1( gl, v, textures ) { - - const cache = this.cache; - const unit = textures.allocateTextureUnit(); - - if ( cache[ 0 ] !== unit ) { - - gl.uniform1i( this.addr, unit ); - cache[ 0 ] = unit; - - } - - textures.safeSetTexture2D( v || emptyTexture, unit ); - -} - -function setValueT3D1( gl, v, textures ) { - - const cache = this.cache; - const unit = textures.allocateTextureUnit(); - - if ( cache[ 0 ] !== unit ) { - - gl.uniform1i( this.addr, unit ); - cache[ 0 ] = unit; - - } - - textures.setTexture3D( v || emptyTexture3d, unit ); - -} - -function setValueT6( gl, v, textures ) { - - const cache = this.cache; - const unit = textures.allocateTextureUnit(); - - if ( cache[ 0 ] !== unit ) { - - gl.uniform1i( this.addr, unit ); - cache[ 0 ] = unit; - - } - - textures.safeSetTextureCube( v || emptyCubeTexture, unit ); - -} - -function setValueT2DArray1( gl, v, textures ) { - - const cache = this.cache; - const unit = textures.allocateTextureUnit(); - - if ( cache[ 0 ] !== unit ) { - - gl.uniform1i( this.addr, unit ); - cache[ 0 ] = unit; - - } - - textures.setTexture2DArray( v || emptyTexture2dArray, unit ); - -} - -// Helper to pick the right setter for the singular case - -function getSingularSetter( type ) { - - switch ( type ) { - - case 0x1406: return setValueV1f; // FLOAT - case 0x8b50: return setValueV2f; // _VEC2 - case 0x8b51: return setValueV3f; // _VEC3 - case 0x8b52: return setValueV4f; // _VEC4 - - case 0x8b5a: return setValueM2; // _MAT2 - case 0x8b5b: return setValueM3; // _MAT3 - case 0x8b5c: return setValueM4; // _MAT4 - - case 0x1404: case 0x8b56: return setValueV1i; // INT, BOOL - case 0x8b53: case 0x8b57: return setValueV2i; // _VEC2 - case 0x8b54: case 0x8b58: return setValueV3i; // _VEC3 - case 0x8b55: case 0x8b59: return setValueV4i; // _VEC4 - - case 0x1405: return setValueV1ui; // UINT - case 0x8dc6: return setValueV2ui; // _VEC2 - case 0x8dc7: return setValueV3ui; // _VEC3 - case 0x8dc8: return setValueV4ui; // _VEC4 - - case 0x8b5e: // SAMPLER_2D - case 0x8d66: // SAMPLER_EXTERNAL_OES - case 0x8dca: // INT_SAMPLER_2D - case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D - case 0x8b62: // SAMPLER_2D_SHADOW - return setValueT1; - - case 0x8b5f: // SAMPLER_3D - case 0x8dcb: // INT_SAMPLER_3D - case 0x8dd3: // UNSIGNED_INT_SAMPLER_3D - return setValueT3D1; - - case 0x8b60: // SAMPLER_CUBE - case 0x8dcc: // INT_SAMPLER_CUBE - case 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE - case 0x8dc5: // SAMPLER_CUBE_SHADOW - return setValueT6; - - case 0x8dc1: // SAMPLER_2D_ARRAY - case 0x8dcf: // INT_SAMPLER_2D_ARRAY - case 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY - case 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW - return setValueT2DArray1; - - } - -} - - -// Array of scalars - -function setValueV1fArray( gl, v ) { - - gl.uniform1fv( this.addr, v ); - -} - -// Array of vectors (from flat array or array of THREE.VectorN) - -function setValueV2fArray( gl, v ) { - - const data = flatten( v, this.size, 2 ); - - gl.uniform2fv( this.addr, data ); - -} - -function setValueV3fArray( gl, v ) { - - const data = flatten( v, this.size, 3 ); - - gl.uniform3fv( this.addr, data ); - -} - -function setValueV4fArray( gl, v ) { - - const data = flatten( v, this.size, 4 ); - - gl.uniform4fv( this.addr, data ); - -} - -// Array of matrices (from flat array or array of THREE.MatrixN) - -function setValueM2Array( gl, v ) { - - const data = flatten( v, this.size, 4 ); - - gl.uniformMatrix2fv( this.addr, false, data ); - -} - -function setValueM3Array( gl, v ) { - - const data = flatten( v, this.size, 9 ); - - gl.uniformMatrix3fv( this.addr, false, data ); - -} - -function setValueM4Array( gl, v ) { - - const data = flatten( v, this.size, 16 ); - - gl.uniformMatrix4fv( this.addr, false, data ); - -} - -// Array of integer / boolean - -function setValueV1iArray( gl, v ) { - - gl.uniform1iv( this.addr, v ); - -} - -// Array of integer / boolean vectors (from flat array) - -function setValueV2iArray( gl, v ) { - - gl.uniform2iv( this.addr, v ); - -} - -function setValueV3iArray( gl, v ) { - - gl.uniform3iv( this.addr, v ); - -} - -function setValueV4iArray( gl, v ) { - - gl.uniform4iv( this.addr, v ); - -} - -// Array of unsigned integer - -function setValueV1uiArray( gl, v ) { - - gl.uniform1uiv( this.addr, v ); - -} - -// Array of unsigned integer vectors (from flat array) - -function setValueV2uiArray( gl, v ) { - - gl.uniform2uiv( this.addr, v ); - -} - -function setValueV3uiArray( gl, v ) { - - gl.uniform3uiv( this.addr, v ); - -} - -function setValueV4uiArray( gl, v ) { - - gl.uniform4uiv( this.addr, v ); - -} - - -// Array of textures (2D / Cube) - -function setValueT1Array( gl, v, textures ) { - - const n = v.length; - - const units = allocTexUnits( textures, n ); - - gl.uniform1iv( this.addr, units ); - - for ( let i = 0; i !== n; ++ i ) { - - textures.safeSetTexture2D( v[ i ] || emptyTexture, units[ i ] ); - - } - -} - -function setValueT6Array( gl, v, textures ) { - - const n = v.length; - - const units = allocTexUnits( textures, n ); - - gl.uniform1iv( this.addr, units ); - - for ( let i = 0; i !== n; ++ i ) { - - textures.safeSetTextureCube( v[ i ] || emptyCubeTexture, units[ i ] ); - - } - -} - -// Helper to pick the right setter for a pure (bottom-level) array - -function getPureArraySetter( type ) { - - switch ( type ) { - - case 0x1406: return setValueV1fArray; // FLOAT - case 0x8b50: return setValueV2fArray; // _VEC2 - case 0x8b51: return setValueV3fArray; // _VEC3 - case 0x8b52: return setValueV4fArray; // _VEC4 - - case 0x8b5a: return setValueM2Array; // _MAT2 - case 0x8b5b: return setValueM3Array; // _MAT3 - case 0x8b5c: return setValueM4Array; // _MAT4 - - case 0x1404: case 0x8b56: return setValueV1iArray; // INT, BOOL - case 0x8b53: case 0x8b57: return setValueV2iArray; // _VEC2 - case 0x8b54: case 0x8b58: return setValueV3iArray; // _VEC3 - case 0x8b55: case 0x8b59: return setValueV4iArray; // _VEC4 - - case 0x1405: return setValueV1uiArray; // UINT - case 0x8dc6: return setValueV2uiArray; // _VEC2 - case 0x8dc7: return setValueV3uiArray; // _VEC3 - case 0x8dc8: return setValueV4uiArray; // _VEC4 - - case 0x8b5e: // SAMPLER_2D - case 0x8d66: // SAMPLER_EXTERNAL_OES - case 0x8dca: // INT_SAMPLER_2D - case 0x8dd2: // UNSIGNED_INT_SAMPLER_2D - case 0x8b62: // SAMPLER_2D_SHADOW - return setValueT1Array; - - case 0x8b60: // SAMPLER_CUBE - case 0x8dcc: // INT_SAMPLER_CUBE - case 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE - case 0x8dc5: // SAMPLER_CUBE_SHADOW - return setValueT6Array; - - } - -} - -// --- Uniform Classes --- - -function SingleUniform( id, activeInfo, addr ) { - - this.id = id; - this.addr = addr; - this.cache = []; - this.setValue = getSingularSetter( activeInfo.type ); - - // this.path = activeInfo.name; // DEBUG - -} - -function PureArrayUniform( id, activeInfo, addr ) { - - this.id = id; - this.addr = addr; - this.cache = []; - this.size = activeInfo.size; - this.setValue = getPureArraySetter( activeInfo.type ); - - // this.path = activeInfo.name; // DEBUG - -} - -PureArrayUniform.prototype.updateCache = function ( data ) { - - const cache = this.cache; - - if ( data instanceof Float32Array && cache.length !== data.length ) { - - this.cache = new Float32Array( data.length ); - - } - - copyArray( cache, data ); - -}; - -function StructuredUniform( id ) { - - this.id = id; - - this.seq = []; - this.map = {}; - -} - -StructuredUniform.prototype.setValue = function ( gl, value, textures ) { - - const seq = this.seq; - - for ( let i = 0, n = seq.length; i !== n; ++ i ) { - - const u = seq[ i ]; - u.setValue( gl, value[ u.id ], textures ); - - } - -}; - -// --- Top-level --- - -// Parser - builds up the property tree from the path strings - -const RePathPart = /(\w+)(\])?(\[|\.)?/g; - -// extracts -// - the identifier (member name or array index) -// - followed by an optional right bracket (found when array index) -// - followed by an optional left bracket or dot (type of subscript) -// -// Note: These portions can be read in a non-overlapping fashion and -// allow straightforward parsing of the hierarchy that WebGL encodes -// in the uniform names. - -function addUniform( container, uniformObject ) { - - container.seq.push( uniformObject ); - container.map[ uniformObject.id ] = uniformObject; - -} - -function parseUniform( activeInfo, addr, container ) { - - const path = activeInfo.name, - pathLength = path.length; - - // reset RegExp object, because of the early exit of a previous run - RePathPart.lastIndex = 0; - - while ( true ) { - - const match = RePathPart.exec( path ), - matchEnd = RePathPart.lastIndex; - - let id = match[ 1 ]; - const idIsIndex = match[ 2 ] === ']', - subscript = match[ 3 ]; - - if ( idIsIndex ) id = id | 0; // convert to integer - - if ( subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength ) { - - // bare name or "pure" bottom-level array "[0]" suffix - - addUniform( container, subscript === undefined ? - new SingleUniform( id, activeInfo, addr ) : - new PureArrayUniform( id, activeInfo, addr ) ); - - break; - - } else { - - // step into inner node / create it in case it doesn't exist - - const map = container.map; - let next = map[ id ]; - - if ( next === undefined ) { - - next = new StructuredUniform( id ); - addUniform( container, next ); - - } - - container = next; - - } - - } - -} - -// Root Container - -function WebGLUniforms( gl, program ) { - - this.seq = []; - this.map = {}; - - const n = gl.getProgramParameter( program, 35718 ); - - for ( let i = 0; i < n; ++ i ) { - - const info = gl.getActiveUniform( program, i ), - addr = gl.getUniformLocation( program, info.name ); - - parseUniform( info, addr, this ); - - } - -} - -WebGLUniforms.prototype.setValue = function ( gl, name, value, textures ) { - - const u = this.map[ name ]; - - if ( u !== undefined ) u.setValue( gl, value, textures ); - -}; - -WebGLUniforms.prototype.setOptional = function ( gl, object, name ) { - - const v = object[ name ]; - - if ( v !== undefined ) this.setValue( gl, name, v ); - -}; - - -// Static interface - -WebGLUniforms.upload = function ( gl, seq, values, textures ) { - - for ( let i = 0, n = seq.length; i !== n; ++ i ) { - - const u = seq[ i ], - v = values[ u.id ]; - - if ( v.needsUpdate !== false ) { - - // note: always updating when .needsUpdate is undefined - u.setValue( gl, v.value, textures ); - - } - - } - -}; - -WebGLUniforms.seqWithValue = function ( seq, values ) { - - const r = []; - - for ( let i = 0, n = seq.length; i !== n; ++ i ) { - - const u = seq[ i ]; - if ( u.id in values ) r.push( u ); - - } - - return r; - -}; - -function WebGLShader( gl, type, string ) { - - const shader = gl.createShader( type ); - - gl.shaderSource( shader, string ); - gl.compileShader( shader ); - - return shader; - -} - -let programIdCount = 0; - -function addLineNumbers( string ) { - - const lines = string.split( '\n' ); - - for ( let i = 0; i < lines.length; i ++ ) { - - lines[ i ] = ( i + 1 ) + ': ' + lines[ i ]; - - } - - return lines.join( '\n' ); - -} - -function getEncodingComponents( encoding ) { - - switch ( encoding ) { - - case LinearEncoding: - return [ 'Linear', '( value )' ]; - case sRGBEncoding: - return [ 'sRGB', '( value )' ]; - case RGBEEncoding: - return [ 'RGBE', '( value )' ]; - case RGBM7Encoding: - return [ 'RGBM', '( value, 7.0 )' ]; - case RGBM16Encoding: - return [ 'RGBM', '( value, 16.0 )' ]; - case RGBDEncoding: - return [ 'RGBD', '( value, 256.0 )' ]; - case GammaEncoding: - return [ 'Gamma', '( value, float( GAMMA_FACTOR ) )' ]; - case LogLuvEncoding: - return [ 'LogLuv', '( value )' ]; - default: - console.warn( 'THREE.WebGLProgram: Unsupported encoding:', encoding ); - return [ 'Linear', '( value )' ]; - - } - -} - -function getShaderErrors( gl, shader, type ) { - - const status = gl.getShaderParameter( shader, 35713 ); - const log = gl.getShaderInfoLog( shader ).trim(); - - if ( status && log === '' ) return ''; - - // --enable-privileged-webgl-extension - // console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) ); - - const source = gl.getShaderSource( shader ); - - return 'THREE.WebGLShader: gl.getShaderInfoLog() ' + type + '\n' + log + addLineNumbers( source ); - -} - -function getTexelDecodingFunction( functionName, encoding ) { - - const components = getEncodingComponents( encoding ); - return 'vec4 ' + functionName + '( vec4 value ) { return ' + components[ 0 ] + 'ToLinear' + components[ 1 ] + '; }'; - -} - -function getTexelEncodingFunction( functionName, encoding ) { - - const components = getEncodingComponents( encoding ); - return 'vec4 ' + functionName + '( vec4 value ) { return LinearTo' + components[ 0 ] + components[ 1 ] + '; }'; - -} - -function getToneMappingFunction( functionName, toneMapping ) { - - let toneMappingName; - - switch ( toneMapping ) { - - case LinearToneMapping: - toneMappingName = 'Linear'; - break; - - case ReinhardToneMapping: - toneMappingName = 'Reinhard'; - break; - - case CineonToneMapping: - toneMappingName = 'OptimizedCineon'; - break; - - case ACESFilmicToneMapping: - toneMappingName = 'ACESFilmic'; - break; - - case CustomToneMapping: - toneMappingName = 'Custom'; - break; - - default: - console.warn( 'THREE.WebGLProgram: Unsupported toneMapping:', toneMapping ); - toneMappingName = 'Linear'; - - } - - return 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }'; - -} - -function generateExtensions( parameters ) { - - const chunks = [ - ( parameters.extensionDerivatives || parameters.envMapCubeUV || parameters.bumpMap || parameters.tangentSpaceNormalMap || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ) ? '#extension GL_OES_standard_derivatives : enable' : '', - ( parameters.extensionFragDepth || parameters.logarithmicDepthBuffer ) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '', - ( parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ) ? '#extension GL_EXT_draw_buffers : require' : '', - ( parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission > 0.0 ) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : '' - ]; - - return chunks.filter( filterEmptyLine ).join( '\n' ); - -} - -function generateDefines( defines ) { - - const chunks = []; - - for ( const name in defines ) { - - const value = defines[ name ]; - - if ( value === false ) continue; - - chunks.push( '#define ' + name + ' ' + value ); - - } - - return chunks.join( '\n' ); - -} - -function fetchAttributeLocations( gl, program ) { - - const attributes = {}; - - const n = gl.getProgramParameter( program, 35721 ); - - for ( let i = 0; i < n; i ++ ) { - - const info = gl.getActiveAttrib( program, i ); - const name = info.name; - - // console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i ); - - attributes[ name ] = gl.getAttribLocation( program, name ); - - } - - return attributes; - -} - -function filterEmptyLine( string ) { - - return string !== ''; - -} - -function replaceLightNums( string, parameters ) { - - return string - .replace( /NUM_DIR_LIGHTS/g, parameters.numDirLights ) - .replace( /NUM_SPOT_LIGHTS/g, parameters.numSpotLights ) - .replace( /NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights ) - .replace( /NUM_POINT_LIGHTS/g, parameters.numPointLights ) - .replace( /NUM_HEMI_LIGHTS/g, parameters.numHemiLights ) - .replace( /NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows ) - .replace( /NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows ) - .replace( /NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows ); - -} - -function replaceClippingPlaneNums( string, parameters ) { - - return string - .replace( /NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes ) - .replace( /UNION_CLIPPING_PLANES/g, ( parameters.numClippingPlanes - parameters.numClipIntersection ) ); - -} - -// Resolve Includes - -const includePattern = /^[ \t]*#include +<([\w\d./]+)>/gm; - -function resolveIncludes( string ) { - - return string.replace( includePattern, includeReplacer ); - -} - -function includeReplacer( match, include ) { - - const string = ShaderChunk[ include ]; - - if ( string === undefined ) { - - throw new Error( 'Can not resolve #include <' + include + '>' ); - - } - - return resolveIncludes( string ); - -} - -// Unroll Loops - -const deprecatedUnrollLoopPattern = /#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g; -const unrollLoopPattern = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g; - -function unrollLoops( string ) { - - return string - .replace( unrollLoopPattern, loopReplacer ) - .replace( deprecatedUnrollLoopPattern, deprecatedLoopReplacer ); - -} - -function deprecatedLoopReplacer( match, start, end, snippet ) { - - console.warn( 'WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.' ); - return loopReplacer( match, start, end, snippet ); - -} - -function loopReplacer( match, start, end, snippet ) { - - let string = ''; - - for ( let i = parseInt( start ); i < parseInt( end ); i ++ ) { - - string += snippet - .replace( /\[\s*i\s*\]/g, '[ ' + i + ' ]' ) - .replace( /UNROLLED_LOOP_INDEX/g, i ); - - } - - return string; - -} - -// - -function generatePrecision( parameters ) { - - let precisionstring = 'precision ' + parameters.precision + ' float;\nprecision ' + parameters.precision + ' int;'; - - if ( parameters.precision === 'highp' ) { - - precisionstring += '\n#define HIGH_PRECISION'; - - } else if ( parameters.precision === 'mediump' ) { - - precisionstring += '\n#define MEDIUM_PRECISION'; - - } else if ( parameters.precision === 'lowp' ) { - - precisionstring += '\n#define LOW_PRECISION'; - - } - - return precisionstring; - -} - -function generateShadowMapTypeDefine( parameters ) { - - let shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC'; - - if ( parameters.shadowMapType === PCFShadowMap ) { - - shadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF'; - - } else if ( parameters.shadowMapType === PCFSoftShadowMap ) { - - shadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT'; - - } else if ( parameters.shadowMapType === VSMShadowMap ) { - - shadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM'; - - } - - return shadowMapTypeDefine; - -} - -function generateEnvMapTypeDefine( parameters ) { - - let envMapTypeDefine = 'ENVMAP_TYPE_CUBE'; - - if ( parameters.envMap ) { - - switch ( parameters.envMapMode ) { - - case CubeReflectionMapping: - case CubeRefractionMapping: - envMapTypeDefine = 'ENVMAP_TYPE_CUBE'; - break; - - case CubeUVReflectionMapping: - case CubeUVRefractionMapping: - envMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV'; - break; - - } - - } - - return envMapTypeDefine; - -} - -function generateEnvMapModeDefine( parameters ) { - - let envMapModeDefine = 'ENVMAP_MODE_REFLECTION'; - - if ( parameters.envMap ) { - - switch ( parameters.envMapMode ) { - - case CubeRefractionMapping: - case CubeUVRefractionMapping: - - envMapModeDefine = 'ENVMAP_MODE_REFRACTION'; - break; - - } - - } - - return envMapModeDefine; - -} - -function generateEnvMapBlendingDefine( parameters ) { - - let envMapBlendingDefine = 'ENVMAP_BLENDING_NONE'; - - if ( parameters.envMap ) { - - switch ( parameters.combine ) { - - case MultiplyOperation: - envMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY'; - break; - - case MixOperation: - envMapBlendingDefine = 'ENVMAP_BLENDING_MIX'; - break; - - case AddOperation: - envMapBlendingDefine = 'ENVMAP_BLENDING_ADD'; - break; - - } - - } - - return envMapBlendingDefine; - -} - -function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) { - - const gl = renderer.getContext(); - - const defines = parameters.defines; - - let vertexShader = parameters.vertexShader; - let fragmentShader = parameters.fragmentShader; - - const shadowMapTypeDefine = generateShadowMapTypeDefine( parameters ); - const envMapTypeDefine = generateEnvMapTypeDefine( parameters ); - const envMapModeDefine = generateEnvMapModeDefine( parameters ); - const envMapBlendingDefine = generateEnvMapBlendingDefine( parameters ); - - - const gammaFactorDefine = ( renderer.gammaFactor > 0 ) ? renderer.gammaFactor : 1.0; - - const customExtensions = parameters.isWebGL2 ? '' : generateExtensions( parameters ); - - const customDefines = generateDefines( defines ); - - const program = gl.createProgram(); - - let prefixVertex, prefixFragment; - let versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\n' : ''; - - if ( parameters.isRawShaderMaterial ) { - - prefixVertex = [ - - customDefines - - ].filter( filterEmptyLine ).join( '\n' ); - - if ( prefixVertex.length > 0 ) { - - prefixVertex += '\n'; - - } - - prefixFragment = [ - - customExtensions, - customDefines - - ].filter( filterEmptyLine ).join( '\n' ); - - if ( prefixFragment.length > 0 ) { - - prefixFragment += '\n'; - - } - - } else { - - prefixVertex = [ - - generatePrecision( parameters ), - - '#define SHADER_NAME ' + parameters.shaderName, - - customDefines, - - parameters.instancing ? '#define USE_INSTANCING' : '', - parameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '', - - parameters.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '', - - '#define GAMMA_FACTOR ' + gammaFactorDefine, - - '#define MAX_BONES ' + parameters.maxBones, - ( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '', - ( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '', - - parameters.map ? '#define USE_MAP' : '', - parameters.envMap ? '#define USE_ENVMAP' : '', - parameters.envMap ? '#define ' + envMapModeDefine : '', - parameters.lightMap ? '#define USE_LIGHTMAP' : '', - parameters.aoMap ? '#define USE_AOMAP' : '', - parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', - parameters.bumpMap ? '#define USE_BUMPMAP' : '', - parameters.normalMap ? '#define USE_NORMALMAP' : '', - ( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '', - ( parameters.normalMap && parameters.tangentSpaceNormalMap ) ? '#define TANGENTSPACE_NORMALMAP' : '', - - parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', - parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', - parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', - parameters.displacementMap && parameters.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '', - parameters.specularMap ? '#define USE_SPECULARMAP' : '', - parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', - parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', - parameters.alphaMap ? '#define USE_ALPHAMAP' : '', - parameters.transmission ? '#define USE_TRANSMISSION' : '', - parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', - parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '', - - parameters.vertexTangents ? '#define USE_TANGENT' : '', - parameters.vertexColors ? '#define USE_COLOR' : '', - parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', - parameters.vertexUvs ? '#define USE_UV' : '', - parameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', - - parameters.flatShading ? '#define FLAT_SHADED' : '', - - parameters.skinning ? '#define USE_SKINNING' : '', - parameters.useVertexTexture ? '#define BONE_TEXTURE' : '', - - parameters.morphTargets ? '#define USE_MORPHTARGETS' : '', - parameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '', - parameters.doubleSided ? '#define DOUBLE_SIDED' : '', - parameters.flipSided ? '#define FLIP_SIDED' : '', - - parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', - parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', - - parameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '', - - parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', - ( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '', - - 'uniform mat4 modelMatrix;', - 'uniform mat4 modelViewMatrix;', - 'uniform mat4 projectionMatrix;', - 'uniform mat4 viewMatrix;', - 'uniform mat3 normalMatrix;', - 'uniform vec3 cameraPosition;', - 'uniform bool isOrthographic;', - - '#ifdef USE_INSTANCING', - - ' attribute mat4 instanceMatrix;', - - '#endif', - - '#ifdef USE_INSTANCING_COLOR', - - ' attribute vec3 instanceColor;', - - '#endif', - - 'attribute vec3 position;', - 'attribute vec3 normal;', - 'attribute vec2 uv;', - - '#ifdef USE_TANGENT', - - ' attribute vec4 tangent;', - - '#endif', - - '#if defined( USE_COLOR_ALPHA )', - - ' attribute vec4 color;', - - '#elif defined( USE_COLOR )', - - ' attribute vec3 color;', - - '#endif', - - '#ifdef USE_MORPHTARGETS', - - ' attribute vec3 morphTarget0;', - ' attribute vec3 morphTarget1;', - ' attribute vec3 morphTarget2;', - ' attribute vec3 morphTarget3;', - - ' #ifdef USE_MORPHNORMALS', - - ' attribute vec3 morphNormal0;', - ' attribute vec3 morphNormal1;', - ' attribute vec3 morphNormal2;', - ' attribute vec3 morphNormal3;', - - ' #else', - - ' attribute vec3 morphTarget4;', - ' attribute vec3 morphTarget5;', - ' attribute vec3 morphTarget6;', - ' attribute vec3 morphTarget7;', - - ' #endif', - - '#endif', - - '#ifdef USE_SKINNING', - - ' attribute vec4 skinIndex;', - ' attribute vec4 skinWeight;', - - '#endif', - - '\n' - - ].filter( filterEmptyLine ).join( '\n' ); - - prefixFragment = [ - - customExtensions, - - generatePrecision( parameters ), - - '#define SHADER_NAME ' + parameters.shaderName, - - customDefines, - - parameters.alphaTest ? '#define ALPHATEST ' + parameters.alphaTest + ( parameters.alphaTest % 1 ? '' : '.0' ) : '', // add '.0' if integer - - '#define GAMMA_FACTOR ' + gammaFactorDefine, - - ( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '', - ( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '', - - parameters.map ? '#define USE_MAP' : '', - parameters.matcap ? '#define USE_MATCAP' : '', - parameters.envMap ? '#define USE_ENVMAP' : '', - parameters.envMap ? '#define ' + envMapTypeDefine : '', - parameters.envMap ? '#define ' + envMapModeDefine : '', - parameters.envMap ? '#define ' + envMapBlendingDefine : '', - parameters.lightMap ? '#define USE_LIGHTMAP' : '', - parameters.aoMap ? '#define USE_AOMAP' : '', - parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', - parameters.bumpMap ? '#define USE_BUMPMAP' : '', - parameters.normalMap ? '#define USE_NORMALMAP' : '', - ( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '', - ( parameters.normalMap && parameters.tangentSpaceNormalMap ) ? '#define TANGENTSPACE_NORMALMAP' : '', - parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', - parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', - parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', - parameters.specularMap ? '#define USE_SPECULARMAP' : '', - parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', - parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', - parameters.alphaMap ? '#define USE_ALPHAMAP' : '', - - parameters.sheen ? '#define USE_SHEEN' : '', - parameters.transmission ? '#define USE_TRANSMISSION' : '', - parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', - parameters.thicknessMap ? '#define USE_THICKNESSMAP' : '', - - parameters.vertexTangents ? '#define USE_TANGENT' : '', - parameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '', - parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '', - parameters.vertexUvs ? '#define USE_UV' : '', - parameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', - - parameters.gradientMap ? '#define USE_GRADIENTMAP' : '', - - parameters.flatShading ? '#define FLAT_SHADED' : '', - - parameters.doubleSided ? '#define DOUBLE_SIDED' : '', - parameters.flipSided ? '#define FLIP_SIDED' : '', - - parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', - parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', - - parameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '', - - parameters.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '', - - parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', - ( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '', - - ( ( parameters.extensionShaderTextureLOD || parameters.envMap ) && parameters.rendererExtensionShaderTextureLod ) ? '#define TEXTURE_LOD_EXT' : '', - - 'uniform mat4 viewMatrix;', - 'uniform vec3 cameraPosition;', - 'uniform bool isOrthographic;', - - ( parameters.toneMapping !== NoToneMapping ) ? '#define TONE_MAPPING' : '', - ( parameters.toneMapping !== NoToneMapping ) ? ShaderChunk[ 'tonemapping_pars_fragment' ] : '', // this code is required here because it is used by the toneMapping() function defined below - ( parameters.toneMapping !== NoToneMapping ) ? getToneMappingFunction( 'toneMapping', parameters.toneMapping ) : '', - - parameters.dithering ? '#define DITHERING' : '', - - ShaderChunk[ 'encodings_pars_fragment' ], // this code is required here because it is used by the various encoding/decoding function defined below - parameters.map ? getTexelDecodingFunction( 'mapTexelToLinear', parameters.mapEncoding ) : '', - parameters.matcap ? getTexelDecodingFunction( 'matcapTexelToLinear', parameters.matcapEncoding ) : '', - parameters.envMap ? getTexelDecodingFunction( 'envMapTexelToLinear', parameters.envMapEncoding ) : '', - parameters.emissiveMap ? getTexelDecodingFunction( 'emissiveMapTexelToLinear', parameters.emissiveMapEncoding ) : '', - parameters.lightMap ? getTexelDecodingFunction( 'lightMapTexelToLinear', parameters.lightMapEncoding ) : '', - getTexelEncodingFunction( 'linearToOutputTexel', parameters.outputEncoding ), - - parameters.depthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '', - - '\n' - - ].filter( filterEmptyLine ).join( '\n' ); - - } - - vertexShader = resolveIncludes( vertexShader ); - vertexShader = replaceLightNums( vertexShader, parameters ); - vertexShader = replaceClippingPlaneNums( vertexShader, parameters ); - - fragmentShader = resolveIncludes( fragmentShader ); - fragmentShader = replaceLightNums( fragmentShader, parameters ); - fragmentShader = replaceClippingPlaneNums( fragmentShader, parameters ); - - vertexShader = unrollLoops( vertexShader ); - fragmentShader = unrollLoops( fragmentShader ); - - if ( parameters.isWebGL2 && parameters.isRawShaderMaterial !== true ) { - - // GLSL 3.0 conversion for built-in materials and ShaderMaterial - - versionString = '#version 300 es\n'; - - prefixVertex = [ - '#define attribute in', - '#define varying out', - '#define texture2D texture' - ].join( '\n' ) + '\n' + prefixVertex; - - prefixFragment = [ - '#define varying in', - ( parameters.glslVersion === GLSL3 ) ? '' : 'out highp vec4 pc_fragColor;', - ( parameters.glslVersion === GLSL3 ) ? '' : '#define gl_FragColor pc_fragColor', - '#define gl_FragDepthEXT gl_FragDepth', - '#define texture2D texture', - '#define textureCube texture', - '#define texture2DProj textureProj', - '#define texture2DLodEXT textureLod', - '#define texture2DProjLodEXT textureProjLod', - '#define textureCubeLodEXT textureLod', - '#define texture2DGradEXT textureGrad', - '#define texture2DProjGradEXT textureProjGrad', - '#define textureCubeGradEXT textureGrad' - ].join( '\n' ) + '\n' + prefixFragment; - - } - - const vertexGlsl = versionString + prefixVertex + vertexShader; - const fragmentGlsl = versionString + prefixFragment + fragmentShader; - - // console.log( '*VERTEX*', vertexGlsl ); - // console.log( '*FRAGMENT*', fragmentGlsl ); - - const glVertexShader = WebGLShader( gl, 35633, vertexGlsl ); - const glFragmentShader = WebGLShader( gl, 35632, fragmentGlsl ); - - gl.attachShader( program, glVertexShader ); - gl.attachShader( program, glFragmentShader ); - - // Force a particular attribute to index 0. - - if ( parameters.index0AttributeName !== undefined ) { - - gl.bindAttribLocation( program, 0, parameters.index0AttributeName ); - - } else if ( parameters.morphTargets === true ) { - - // programs with morphTargets displace position out of attribute 0 - gl.bindAttribLocation( program, 0, 'position' ); - - } - - gl.linkProgram( program ); - - // check for link errors - if ( renderer.debug.checkShaderErrors ) { - - const programLog = gl.getProgramInfoLog( program ).trim(); - const vertexLog = gl.getShaderInfoLog( glVertexShader ).trim(); - const fragmentLog = gl.getShaderInfoLog( glFragmentShader ).trim(); - - let runnable = true; - let haveDiagnostics = true; - - if ( gl.getProgramParameter( program, 35714 ) === false ) { - - runnable = false; - - const vertexErrors = getShaderErrors( gl, glVertexShader, 'vertex' ); - const fragmentErrors = getShaderErrors( gl, glFragmentShader, 'fragment' ); - - console.error( 'THREE.WebGLProgram: shader error: ', gl.getError(), '35715', gl.getProgramParameter( program, 35715 ), 'gl.getProgramInfoLog', programLog, vertexErrors, fragmentErrors ); - - } else if ( programLog !== '' ) { - - console.warn( 'THREE.WebGLProgram: gl.getProgramInfoLog()', programLog ); - - } else if ( vertexLog === '' || fragmentLog === '' ) { - - haveDiagnostics = false; - - } - - if ( haveDiagnostics ) { - - this.diagnostics = { - - runnable: runnable, - - programLog: programLog, - - vertexShader: { - - log: vertexLog, - prefix: prefixVertex - - }, - - fragmentShader: { - - log: fragmentLog, - prefix: prefixFragment - - } - - }; - - } - - } - - // Clean up - - // Crashes in iOS9 and iOS10. #18402 - // gl.detachShader( program, glVertexShader ); - // gl.detachShader( program, glFragmentShader ); - - gl.deleteShader( glVertexShader ); - gl.deleteShader( glFragmentShader ); - - // set up caching for uniform locations - - let cachedUniforms; - - this.getUniforms = function () { - - if ( cachedUniforms === undefined ) { - - cachedUniforms = new WebGLUniforms( gl, program ); - - } - - return cachedUniforms; - - }; - - // set up caching for attribute locations - - let cachedAttributes; - - this.getAttributes = function () { - - if ( cachedAttributes === undefined ) { - - cachedAttributes = fetchAttributeLocations( gl, program ); - - } - - return cachedAttributes; - - }; - - // free resource - - this.destroy = function () { - - bindingStates.releaseStatesOfProgram( this ); - - gl.deleteProgram( program ); - this.program = undefined; - - }; - - // - - this.name = parameters.shaderName; - this.id = programIdCount ++; - this.cacheKey = cacheKey; - this.usedTimes = 1; - this.program = program; - this.vertexShader = glVertexShader; - this.fragmentShader = glFragmentShader; - - return this; - -} - -function WebGLPrograms( renderer, cubemaps, extensions, capabilities, bindingStates, clipping ) { - - const programs = []; - - const isWebGL2 = capabilities.isWebGL2; - const logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer; - const floatVertexTextures = capabilities.floatVertexTextures; - const maxVertexUniforms = capabilities.maxVertexUniforms; - const vertexTextures = capabilities.vertexTextures; - - let precision = capabilities.precision; - - const shaderIDs = { - MeshDepthMaterial: 'depth', - MeshDistanceMaterial: 'distanceRGBA', - MeshNormalMaterial: 'normal', - MeshBasicMaterial: 'basic', - MeshLambertMaterial: 'lambert', - MeshPhongMaterial: 'phong', - MeshToonMaterial: 'toon', - MeshStandardMaterial: 'physical', - MeshPhysicalMaterial: 'physical', - MeshMatcapMaterial: 'matcap', - LineBasicMaterial: 'basic', - LineDashedMaterial: 'dashed', - PointsMaterial: 'points', - ShadowMaterial: 'shadow', - SpriteMaterial: 'sprite' - }; - - const parameterNames = [ - 'precision', 'isWebGL2', 'supportsVertexTextures', 'outputEncoding', 'instancing', 'instancingColor', - 'map', 'mapEncoding', 'matcap', 'matcapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'envMapCubeUV', - 'lightMap', 'lightMapEncoding', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap', 'objectSpaceNormalMap', 'tangentSpaceNormalMap', 'clearcoatMap', 'clearcoatRoughnessMap', 'clearcoatNormalMap', 'displacementMap', 'specularMap', - 'roughnessMap', 'metalnessMap', 'gradientMap', - 'alphaMap', 'combine', 'vertexColors', 'vertexAlphas', 'vertexTangents', 'vertexUvs', 'uvsVertexOnly', 'fog', 'useFog', 'fogExp2', - 'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning', - 'maxBones', 'useVertexTexture', 'morphTargets', 'morphNormals', 'premultipliedAlpha', - 'numDirLights', 'numPointLights', 'numSpotLights', 'numHemiLights', 'numRectAreaLights', - 'numDirLightShadows', 'numPointLightShadows', 'numSpotLightShadows', - 'shadowMapEnabled', 'shadowMapType', 'toneMapping', 'physicallyCorrectLights', - 'alphaTest', 'doubleSided', 'flipSided', 'numClippingPlanes', 'numClipIntersection', 'depthPacking', 'dithering', - 'sheen', 'transmission', 'transmissionMap', 'thicknessMap' - ]; - - function getMaxBones( object ) { - - const skeleton = object.skeleton; - const bones = skeleton.bones; - - if ( floatVertexTextures ) { - - return 1024; - - } else { - - // default for when object is not specified - // ( for example when prebuilding shader to be used with multiple objects ) - // - // - leave some extra space for other uniforms - // - limit here is ANGLE's 254 max uniform vectors - // (up to 54 should be safe) - - const nVertexUniforms = maxVertexUniforms; - const nVertexMatrices = Math.floor( ( nVertexUniforms - 20 ) / 4 ); - - const maxBones = Math.min( nVertexMatrices, bones.length ); - - if ( maxBones < bones.length ) { - - console.warn( 'THREE.WebGLRenderer: Skeleton has ' + bones.length + ' bones. This GPU supports ' + maxBones + '.' ); - return 0; - - } - - return maxBones; - - } - - } - - function getTextureEncodingFromMap( map ) { - - let encoding; - - if ( map && map.isTexture ) { - - encoding = map.encoding; - - } else if ( map && map.isWebGLRenderTarget ) { - - console.warn( 'THREE.WebGLPrograms.getTextureEncodingFromMap: don\'t use render targets as textures. Use their .texture property instead.' ); - encoding = map.texture.encoding; - - } else { - - encoding = LinearEncoding; - - } - - return encoding; - - } - - function getParameters( material, lights, shadows, scene, object ) { - - const fog = scene.fog; - const environment = material.isMeshStandardMaterial ? scene.environment : null; - - const envMap = cubemaps.get( material.envMap || environment ); - - const shaderID = shaderIDs[ material.type ]; - - // heuristics to create shader parameters according to lights in the scene - // (not to blow over maxLights budget) - - const maxBones = object.isSkinnedMesh ? getMaxBones( object ) : 0; - - if ( material.precision !== null ) { - - precision = capabilities.getMaxPrecision( material.precision ); - - if ( precision !== material.precision ) { - - console.warn( 'THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.' ); - - } - - } - - let vertexShader, fragmentShader; - - if ( shaderID ) { - - const shader = ShaderLib[ shaderID ]; - - vertexShader = shader.vertexShader; - fragmentShader = shader.fragmentShader; - - } else { - - vertexShader = material.vertexShader; - fragmentShader = material.fragmentShader; - - } - - const currentRenderTarget = renderer.getRenderTarget(); - - const parameters = { - - isWebGL2: isWebGL2, - - shaderID: shaderID, - shaderName: material.type, - - vertexShader: vertexShader, - fragmentShader: fragmentShader, - defines: material.defines, - - isRawShaderMaterial: material.isRawShaderMaterial === true, - glslVersion: material.glslVersion, - - precision: precision, - - instancing: object.isInstancedMesh === true, - instancingColor: object.isInstancedMesh === true && object.instanceColor !== null, - - supportsVertexTextures: vertexTextures, - outputEncoding: ( currentRenderTarget !== null ) ? getTextureEncodingFromMap( currentRenderTarget.texture ) : renderer.outputEncoding, - map: !! material.map, - mapEncoding: getTextureEncodingFromMap( material.map ), - matcap: !! material.matcap, - matcapEncoding: getTextureEncodingFromMap( material.matcap ), - envMap: !! envMap, - envMapMode: envMap && envMap.mapping, - envMapEncoding: getTextureEncodingFromMap( envMap ), - envMapCubeUV: ( !! envMap ) && ( ( envMap.mapping === CubeUVReflectionMapping ) || ( envMap.mapping === CubeUVRefractionMapping ) ), - lightMap: !! material.lightMap, - lightMapEncoding: getTextureEncodingFromMap( material.lightMap ), - aoMap: !! material.aoMap, - emissiveMap: !! material.emissiveMap, - emissiveMapEncoding: getTextureEncodingFromMap( material.emissiveMap ), - bumpMap: !! material.bumpMap, - normalMap: !! material.normalMap, - objectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap, - tangentSpaceNormalMap: material.normalMapType === TangentSpaceNormalMap, - clearcoatMap: !! material.clearcoatMap, - clearcoatRoughnessMap: !! material.clearcoatRoughnessMap, - clearcoatNormalMap: !! material.clearcoatNormalMap, - displacementMap: !! material.displacementMap, - roughnessMap: !! material.roughnessMap, - metalnessMap: !! material.metalnessMap, - specularMap: !! material.specularMap, - alphaMap: !! material.alphaMap, - - gradientMap: !! material.gradientMap, - - sheen: !! material.sheen, - - transmission: !! material.transmission, - transmissionMap: !! material.transmissionMap, - thicknessMap: !! material.thicknessMap, - - combine: material.combine, - - vertexTangents: ( material.normalMap && material.vertexTangents ), - vertexColors: material.vertexColors, - vertexAlphas: material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4, - vertexUvs: !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatMap || !! material.clearcoatRoughnessMap || !! material.clearcoatNormalMap || !! material.displacementMap || !! material.transmissionMap || !! material.thicknessMap, - uvsVertexOnly: ! ( !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatNormalMap || !! material.transmission || !! material.transmissionMap || !! material.thicknessMap ) && !! material.displacementMap, - - fog: !! fog, - useFog: material.fog, - fogExp2: ( fog && fog.isFogExp2 ), - - flatShading: !! material.flatShading, - - sizeAttenuation: material.sizeAttenuation, - logarithmicDepthBuffer: logarithmicDepthBuffer, - - skinning: object.isSkinnedMesh === true && maxBones > 0, - maxBones: maxBones, - useVertexTexture: floatVertexTextures, - - morphTargets: material.morphTargets, - morphNormals: material.morphNormals, - - numDirLights: lights.directional.length, - numPointLights: lights.point.length, - numSpotLights: lights.spot.length, - numRectAreaLights: lights.rectArea.length, - numHemiLights: lights.hemi.length, - - numDirLightShadows: lights.directionalShadowMap.length, - numPointLightShadows: lights.pointShadowMap.length, - numSpotLightShadows: lights.spotShadowMap.length, - - numClippingPlanes: clipping.numPlanes, - numClipIntersection: clipping.numIntersection, - - dithering: material.dithering, - - shadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0, - shadowMapType: renderer.shadowMap.type, - - toneMapping: material.toneMapped ? renderer.toneMapping : NoToneMapping, - physicallyCorrectLights: renderer.physicallyCorrectLights, - - premultipliedAlpha: material.premultipliedAlpha, - - alphaTest: material.alphaTest, - doubleSided: material.side === DoubleSide, - flipSided: material.side === BackSide, - - depthPacking: ( material.depthPacking !== undefined ) ? material.depthPacking : false, - - index0AttributeName: material.index0AttributeName, - - extensionDerivatives: material.extensions && material.extensions.derivatives, - extensionFragDepth: material.extensions && material.extensions.fragDepth, - extensionDrawBuffers: material.extensions && material.extensions.drawBuffers, - extensionShaderTextureLOD: material.extensions && material.extensions.shaderTextureLOD, - - rendererExtensionFragDepth: isWebGL2 || extensions.has( 'EXT_frag_depth' ), - rendererExtensionDrawBuffers: isWebGL2 || extensions.has( 'WEBGL_draw_buffers' ), - rendererExtensionShaderTextureLod: isWebGL2 || extensions.has( 'EXT_shader_texture_lod' ), - - customProgramCacheKey: material.customProgramCacheKey() - - }; - - return parameters; - - } - - function getProgramCacheKey( parameters ) { - - const array = []; - - if ( parameters.shaderID ) { - - array.push( parameters.shaderID ); - - } else { - - array.push( parameters.fragmentShader ); - array.push( parameters.vertexShader ); - - } - - if ( parameters.defines !== undefined ) { - - for ( const name in parameters.defines ) { - - array.push( name ); - array.push( parameters.defines[ name ] ); - - } - - } - - if ( parameters.isRawShaderMaterial === false ) { - - for ( let i = 0; i < parameterNames.length; i ++ ) { - - array.push( parameters[ parameterNames[ i ] ] ); - - } - - array.push( renderer.outputEncoding ); - array.push( renderer.gammaFactor ); - - } - - array.push( parameters.customProgramCacheKey ); - - return array.join(); - - } - - function getUniforms( material ) { - - const shaderID = shaderIDs[ material.type ]; - let uniforms; - - if ( shaderID ) { - - const shader = ShaderLib[ shaderID ]; - uniforms = UniformsUtils.clone( shader.uniforms ); - - } else { - - uniforms = material.uniforms; - - } - - return uniforms; - - } - - function acquireProgram( parameters, cacheKey ) { - - let program; - - // Check if code has been already compiled - for ( let p = 0, pl = programs.length; p < pl; p ++ ) { - - const preexistingProgram = programs[ p ]; - - if ( preexistingProgram.cacheKey === cacheKey ) { - - program = preexistingProgram; - ++ program.usedTimes; - - break; - - } - - } - - if ( program === undefined ) { - - program = new WebGLProgram( renderer, cacheKey, parameters, bindingStates ); - programs.push( program ); - - } - - return program; - - } - - function releaseProgram( program ) { - - if ( -- program.usedTimes === 0 ) { - - // Remove from unordered set - const i = programs.indexOf( program ); - programs[ i ] = programs[ programs.length - 1 ]; - programs.pop(); - - // Free WebGL resources - program.destroy(); - - } - - } - - return { - getParameters: getParameters, - getProgramCacheKey: getProgramCacheKey, - getUniforms: getUniforms, - acquireProgram: acquireProgram, - releaseProgram: releaseProgram, - // Exposed for resource monitoring & error feedback via renderer.info: - programs: programs - }; - -} - -function WebGLProperties() { - - let properties = new WeakMap(); - - function get( object ) { - - let map = properties.get( object ); - - if ( map === undefined ) { - - map = {}; - properties.set( object, map ); - - } - - return map; - - } - - function remove( object ) { - - properties.delete( object ); - - } - - function update( object, key, value ) { - - properties.get( object )[ key ] = value; - - } - - function dispose() { - - properties = new WeakMap(); - - } - - return { - get: get, - remove: remove, - update: update, - dispose: dispose - }; - -} - -function painterSortStable( a, b ) { - - if ( a.groupOrder !== b.groupOrder ) { - - return a.groupOrder - b.groupOrder; - - } else if ( a.renderOrder !== b.renderOrder ) { - - return a.renderOrder - b.renderOrder; - - } else if ( a.program !== b.program ) { - - return a.program.id - b.program.id; - - } else if ( a.material.id !== b.material.id ) { - - return a.material.id - b.material.id; - - } else if ( a.z !== b.z ) { - - return a.z - b.z; - - } else { - - return a.id - b.id; - - } - -} - -function reversePainterSortStable( a, b ) { - - if ( a.groupOrder !== b.groupOrder ) { - - return a.groupOrder - b.groupOrder; - - } else if ( a.renderOrder !== b.renderOrder ) { - - return a.renderOrder - b.renderOrder; - - } else if ( a.z !== b.z ) { - - return b.z - a.z; - - } else { - - return a.id - b.id; - - } - -} - - -function WebGLRenderList( properties ) { - - const renderItems = []; - let renderItemsIndex = 0; - - const opaque = []; - const transmissive = []; - const transparent = []; - - const defaultProgram = { id: - 1 }; - - function init() { - - renderItemsIndex = 0; - - opaque.length = 0; - transmissive.length = 0; - transparent.length = 0; - - } - - function getNextRenderItem( object, geometry, material, groupOrder, z, group ) { - - let renderItem = renderItems[ renderItemsIndex ]; - const materialProperties = properties.get( material ); - - if ( renderItem === undefined ) { - - renderItem = { - id: object.id, - object: object, - geometry: geometry, - material: material, - program: materialProperties.program || defaultProgram, - groupOrder: groupOrder, - renderOrder: object.renderOrder, - z: z, - group: group - }; - - renderItems[ renderItemsIndex ] = renderItem; - - } else { - - renderItem.id = object.id; - renderItem.object = object; - renderItem.geometry = geometry; - renderItem.material = material; - renderItem.program = materialProperties.program || defaultProgram; - renderItem.groupOrder = groupOrder; - renderItem.renderOrder = object.renderOrder; - renderItem.z = z; - renderItem.group = group; - - } - - renderItemsIndex ++; - - return renderItem; - - } - - function push( object, geometry, material, groupOrder, z, group ) { - - const renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group ); - - if ( material.transmission > 0.0 ) { - - transmissive.push( renderItem ); - - } else if ( material.transparent === true ) { - - transparent.push( renderItem ); - - } else { - - opaque.push( renderItem ); - - } - - } - - function unshift( object, geometry, material, groupOrder, z, group ) { - - const renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group ); - - if ( material.transmission > 0.0 ) { - - transmissive.unshift( renderItem ); - - } else if ( material.transparent === true ) { - - transparent.unshift( renderItem ); - - } else { - - opaque.unshift( renderItem ); - - } - - } - - function sort( customOpaqueSort, customTransparentSort ) { - - if ( opaque.length > 1 ) opaque.sort( customOpaqueSort || painterSortStable ); - if ( transmissive.length > 1 ) transmissive.sort( customTransparentSort || reversePainterSortStable ); - if ( transparent.length > 1 ) transparent.sort( customTransparentSort || reversePainterSortStable ); - - } - - function finish() { - - // Clear references from inactive renderItems in the list - - for ( let i = renderItemsIndex, il = renderItems.length; i < il; i ++ ) { - - const renderItem = renderItems[ i ]; - - if ( renderItem.id === null ) break; - - renderItem.id = null; - renderItem.object = null; - renderItem.geometry = null; - renderItem.material = null; - renderItem.program = null; - renderItem.group = null; - - } - - } - - return { - - opaque: opaque, - transmissive: transmissive, - transparent: transparent, - - init: init, - push: push, - unshift: unshift, - finish: finish, - - sort: sort - }; - -} - -function WebGLRenderLists( properties ) { - - let lists = new WeakMap(); - - function get( scene, renderCallDepth ) { - - let list; - - if ( lists.has( scene ) === false ) { - - list = new WebGLRenderList( properties ); - lists.set( scene, [ list ] ); - - } else { - - if ( renderCallDepth >= lists.get( scene ).length ) { - - list = new WebGLRenderList( properties ); - lists.get( scene ).push( list ); - - } else { - - list = lists.get( scene )[ renderCallDepth ]; - - } - - } - - return list; - - } - - function dispose() { - - lists = new WeakMap(); - - } - - return { - get: get, - dispose: dispose - }; - -} - -function UniformsCache() { - - const lights = {}; - - return { - - get: function ( light ) { - - if ( lights[ light.id ] !== undefined ) { - - return lights[ light.id ]; - - } - - let uniforms; - - switch ( light.type ) { - - case 'DirectionalLight': - uniforms = { - direction: new Vector3(), - color: new Color() - }; - break; - - case 'SpotLight': - uniforms = { - position: new Vector3(), - direction: new Vector3(), - color: new Color(), - distance: 0, - coneCos: 0, - penumbraCos: 0, - decay: 0 - }; - break; - - case 'PointLight': - uniforms = { - position: new Vector3(), - color: new Color(), - distance: 0, - decay: 0 - }; - break; - - case 'HemisphereLight': - uniforms = { - direction: new Vector3(), - skyColor: new Color(), - groundColor: new Color() - }; - break; - - case 'RectAreaLight': - uniforms = { - color: new Color(), - position: new Vector3(), - halfWidth: new Vector3(), - halfHeight: new Vector3() - }; - break; - - } - - lights[ light.id ] = uniforms; - - return uniforms; - - } - - }; - -} - -function ShadowUniformsCache() { - - const lights = {}; - - return { - - get: function ( light ) { - - if ( lights[ light.id ] !== undefined ) { - - return lights[ light.id ]; - - } - - let uniforms; - - switch ( light.type ) { - - case 'DirectionalLight': - uniforms = { - shadowBias: 0, - shadowNormalBias: 0, - shadowRadius: 1, - shadowMapSize: new Vector2() - }; - break; - - case 'SpotLight': - uniforms = { - shadowBias: 0, - shadowNormalBias: 0, - shadowRadius: 1, - shadowMapSize: new Vector2() - }; - break; - - case 'PointLight': - uniforms = { - shadowBias: 0, - shadowNormalBias: 0, - shadowRadius: 1, - shadowMapSize: new Vector2(), - shadowCameraNear: 1, - shadowCameraFar: 1000 - }; - break; - - // TODO (abelnation): set RectAreaLight shadow uniforms - - } - - lights[ light.id ] = uniforms; - - return uniforms; - - } - - }; - -} - - - -let nextVersion = 0; - -function shadowCastingLightsFirst( lightA, lightB ) { - - return ( lightB.castShadow ? 1 : 0 ) - ( lightA.castShadow ? 1 : 0 ); - -} - -function WebGLLights( extensions, capabilities ) { - - const cache = new UniformsCache(); - - const shadowCache = ShadowUniformsCache(); - - const state = { - - version: 0, - - hash: { - directionalLength: - 1, - pointLength: - 1, - spotLength: - 1, - rectAreaLength: - 1, - hemiLength: - 1, - - numDirectionalShadows: - 1, - numPointShadows: - 1, - numSpotShadows: - 1 - }, - - ambient: [ 0, 0, 0 ], - probe: [], - directional: [], - directionalShadow: [], - directionalShadowMap: [], - directionalShadowMatrix: [], - spot: [], - spotShadow: [], - spotShadowMap: [], - spotShadowMatrix: [], - rectArea: [], - rectAreaLTC1: null, - rectAreaLTC2: null, - point: [], - pointShadow: [], - pointShadowMap: [], - pointShadowMatrix: [], - hemi: [] - - }; - - for ( let i = 0; i < 9; i ++ ) state.probe.push( new Vector3() ); - - const vector3 = new Vector3(); - const matrix4 = new Matrix4(); - const matrix42 = new Matrix4(); - - function setup( lights ) { - - let r = 0, g = 0, b = 0; - - for ( let i = 0; i < 9; i ++ ) state.probe[ i ].set( 0, 0, 0 ); - - let directionalLength = 0; - let pointLength = 0; - let spotLength = 0; - let rectAreaLength = 0; - let hemiLength = 0; - - let numDirectionalShadows = 0; - let numPointShadows = 0; - let numSpotShadows = 0; - - lights.sort( shadowCastingLightsFirst ); - - for ( let i = 0, l = lights.length; i < l; i ++ ) { - - const light = lights[ i ]; - - const color = light.color; - const intensity = light.intensity; - const distance = light.distance; - - const shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null; - - if ( light.isAmbientLight ) { - - r += color.r * intensity; - g += color.g * intensity; - b += color.b * intensity; - - } else if ( light.isLightProbe ) { - - for ( let j = 0; j < 9; j ++ ) { - - state.probe[ j ].addScaledVector( light.sh.coefficients[ j ], intensity ); - - } - - } else if ( light.isDirectionalLight ) { - - const uniforms = cache.get( light ); - - uniforms.color.copy( light.color ).multiplyScalar( light.intensity ); - - if ( light.castShadow ) { - - const shadow = light.shadow; - - const shadowUniforms = shadowCache.get( light ); - - shadowUniforms.shadowBias = shadow.bias; - shadowUniforms.shadowNormalBias = shadow.normalBias; - shadowUniforms.shadowRadius = shadow.radius; - shadowUniforms.shadowMapSize = shadow.mapSize; - - state.directionalShadow[ directionalLength ] = shadowUniforms; - state.directionalShadowMap[ directionalLength ] = shadowMap; - state.directionalShadowMatrix[ directionalLength ] = light.shadow.matrix; - - numDirectionalShadows ++; - - } - - state.directional[ directionalLength ] = uniforms; - - directionalLength ++; - - } else if ( light.isSpotLight ) { - - const uniforms = cache.get( light ); - - uniforms.position.setFromMatrixPosition( light.matrixWorld ); - - uniforms.color.copy( color ).multiplyScalar( intensity ); - uniforms.distance = distance; - - uniforms.coneCos = Math.cos( light.angle ); - uniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) ); - uniforms.decay = light.decay; - - if ( light.castShadow ) { - - const shadow = light.shadow; - - const shadowUniforms = shadowCache.get( light ); - - shadowUniforms.shadowBias = shadow.bias; - shadowUniforms.shadowNormalBias = shadow.normalBias; - shadowUniforms.shadowRadius = shadow.radius; - shadowUniforms.shadowMapSize = shadow.mapSize; - - state.spotShadow[ spotLength ] = shadowUniforms; - state.spotShadowMap[ spotLength ] = shadowMap; - state.spotShadowMatrix[ spotLength ] = light.shadow.matrix; - - numSpotShadows ++; - - } - - state.spot[ spotLength ] = uniforms; - - spotLength ++; - - } else if ( light.isRectAreaLight ) { - - const uniforms = cache.get( light ); - - // (a) intensity is the total visible light emitted - //uniforms.color.copy( color ).multiplyScalar( intensity / ( light.width * light.height * Math.PI ) ); - - // (b) intensity is the brightness of the light - uniforms.color.copy( color ).multiplyScalar( intensity ); - - uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 ); - uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 ); - - state.rectArea[ rectAreaLength ] = uniforms; - - rectAreaLength ++; - - } else if ( light.isPointLight ) { - - const uniforms = cache.get( light ); - - uniforms.color.copy( light.color ).multiplyScalar( light.intensity ); - uniforms.distance = light.distance; - uniforms.decay = light.decay; - - if ( light.castShadow ) { - - const shadow = light.shadow; - - const shadowUniforms = shadowCache.get( light ); - - shadowUniforms.shadowBias = shadow.bias; - shadowUniforms.shadowNormalBias = shadow.normalBias; - shadowUniforms.shadowRadius = shadow.radius; - shadowUniforms.shadowMapSize = shadow.mapSize; - shadowUniforms.shadowCameraNear = shadow.camera.near; - shadowUniforms.shadowCameraFar = shadow.camera.far; - - state.pointShadow[ pointLength ] = shadowUniforms; - state.pointShadowMap[ pointLength ] = shadowMap; - state.pointShadowMatrix[ pointLength ] = light.shadow.matrix; - - numPointShadows ++; - - } - - state.point[ pointLength ] = uniforms; - - pointLength ++; - - } else if ( light.isHemisphereLight ) { - - const uniforms = cache.get( light ); - - uniforms.skyColor.copy( light.color ).multiplyScalar( intensity ); - uniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity ); - - state.hemi[ hemiLength ] = uniforms; - - hemiLength ++; - - } - - } - - if ( rectAreaLength > 0 ) { - - if ( capabilities.isWebGL2 ) { - - // WebGL 2 - - state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1; - state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2; - - } else { - - // WebGL 1 - - if ( extensions.has( 'OES_texture_float_linear' ) === true ) { - - state.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1; - state.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2; - - } else if ( extensions.has( 'OES_texture_half_float_linear' ) === true ) { - - state.rectAreaLTC1 = UniformsLib.LTC_HALF_1; - state.rectAreaLTC2 = UniformsLib.LTC_HALF_2; - - } else { - - console.error( 'THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.' ); - - } - - } - - } - - state.ambient[ 0 ] = r; - state.ambient[ 1 ] = g; - state.ambient[ 2 ] = b; - - const hash = state.hash; - - if ( hash.directionalLength !== directionalLength || - hash.pointLength !== pointLength || - hash.spotLength !== spotLength || - hash.rectAreaLength !== rectAreaLength || - hash.hemiLength !== hemiLength || - hash.numDirectionalShadows !== numDirectionalShadows || - hash.numPointShadows !== numPointShadows || - hash.numSpotShadows !== numSpotShadows ) { - - state.directional.length = directionalLength; - state.spot.length = spotLength; - state.rectArea.length = rectAreaLength; - state.point.length = pointLength; - state.hemi.length = hemiLength; - - state.directionalShadow.length = numDirectionalShadows; - state.directionalShadowMap.length = numDirectionalShadows; - state.pointShadow.length = numPointShadows; - state.pointShadowMap.length = numPointShadows; - state.spotShadow.length = numSpotShadows; - state.spotShadowMap.length = numSpotShadows; - state.directionalShadowMatrix.length = numDirectionalShadows; - state.pointShadowMatrix.length = numPointShadows; - state.spotShadowMatrix.length = numSpotShadows; - - hash.directionalLength = directionalLength; - hash.pointLength = pointLength; - hash.spotLength = spotLength; - hash.rectAreaLength = rectAreaLength; - hash.hemiLength = hemiLength; - - hash.numDirectionalShadows = numDirectionalShadows; - hash.numPointShadows = numPointShadows; - hash.numSpotShadows = numSpotShadows; - - state.version = nextVersion ++; - - } - - } - - function setupView( lights, camera ) { - - let directionalLength = 0; - let pointLength = 0; - let spotLength = 0; - let rectAreaLength = 0; - let hemiLength = 0; - - const viewMatrix = camera.matrixWorldInverse; - - for ( let i = 0, l = lights.length; i < l; i ++ ) { - - const light = lights[ i ]; - - if ( light.isDirectionalLight ) { - - const uniforms = state.directional[ directionalLength ]; - - uniforms.direction.setFromMatrixPosition( light.matrixWorld ); - vector3.setFromMatrixPosition( light.target.matrixWorld ); - uniforms.direction.sub( vector3 ); - uniforms.direction.transformDirection( viewMatrix ); - - directionalLength ++; - - } else if ( light.isSpotLight ) { - - const uniforms = state.spot[ spotLength ]; - - uniforms.position.setFromMatrixPosition( light.matrixWorld ); - uniforms.position.applyMatrix4( viewMatrix ); - - uniforms.direction.setFromMatrixPosition( light.matrixWorld ); - vector3.setFromMatrixPosition( light.target.matrixWorld ); - uniforms.direction.sub( vector3 ); - uniforms.direction.transformDirection( viewMatrix ); - - spotLength ++; - - } else if ( light.isRectAreaLight ) { - - const uniforms = state.rectArea[ rectAreaLength ]; - - uniforms.position.setFromMatrixPosition( light.matrixWorld ); - uniforms.position.applyMatrix4( viewMatrix ); - - // extract local rotation of light to derive width/height half vectors - matrix42.identity(); - matrix4.copy( light.matrixWorld ); - matrix4.premultiply( viewMatrix ); - matrix42.extractRotation( matrix4 ); - - uniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 ); - uniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 ); - - uniforms.halfWidth.applyMatrix4( matrix42 ); - uniforms.halfHeight.applyMatrix4( matrix42 ); - - rectAreaLength ++; - - } else if ( light.isPointLight ) { - - const uniforms = state.point[ pointLength ]; - - uniforms.position.setFromMatrixPosition( light.matrixWorld ); - uniforms.position.applyMatrix4( viewMatrix ); - - pointLength ++; - - } else if ( light.isHemisphereLight ) { - - const uniforms = state.hemi[ hemiLength ]; - - uniforms.direction.setFromMatrixPosition( light.matrixWorld ); - uniforms.direction.transformDirection( viewMatrix ); - uniforms.direction.normalize(); - - hemiLength ++; - - } - - } - - } - - return { - setup: setup, - setupView: setupView, - state: state - }; - -} - -function WebGLRenderState( extensions, capabilities ) { - - const lights = new WebGLLights( extensions, capabilities ); - - const lightsArray = []; - const shadowsArray = []; - - function init() { - - lightsArray.length = 0; - shadowsArray.length = 0; - - } - - function pushLight( light ) { - - lightsArray.push( light ); - - } - - function pushShadow( shadowLight ) { - - shadowsArray.push( shadowLight ); - - } - - function setupLights() { - - lights.setup( lightsArray ); - - } - - function setupLightsView( camera ) { - - lights.setupView( lightsArray, camera ); - - } - - const state = { - lightsArray: lightsArray, - shadowsArray: shadowsArray, - - lights: lights - }; - - return { - init: init, - state: state, - setupLights: setupLights, - setupLightsView: setupLightsView, - - pushLight: pushLight, - pushShadow: pushShadow - }; - -} - -function WebGLRenderStates( extensions, capabilities ) { - - let renderStates = new WeakMap(); - - function get( scene, renderCallDepth = 0 ) { - - let renderState; - - if ( renderStates.has( scene ) === false ) { - - renderState = new WebGLRenderState( extensions, capabilities ); - renderStates.set( scene, [ renderState ] ); - - } else { - - if ( renderCallDepth >= renderStates.get( scene ).length ) { - - renderState = new WebGLRenderState( extensions, capabilities ); - renderStates.get( scene ).push( renderState ); - - } else { - - renderState = renderStates.get( scene )[ renderCallDepth ]; - - } - - } - - return renderState; - - } - - function dispose() { - - renderStates = new WeakMap(); - - } - - return { - get: get, - dispose: dispose - }; - -} - -/** - * parameters = { - * - * opacity: , - * - * map: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * wireframe: , - * wireframeLinewidth: - * } - */ - -class MeshDepthMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'MeshDepthMaterial'; - - this.depthPacking = BasicDepthPacking; - - this.morphTargets = false; - - this.map = null; - - this.alphaMap = null; - - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - - this.wireframe = false; - this.wireframeLinewidth = 1; - - this.fog = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.depthPacking = source.depthPacking; - - this.morphTargets = source.morphTargets; - - this.map = source.map; - - this.alphaMap = source.alphaMap; - - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - - return this; - - } - -} - -MeshDepthMaterial.prototype.isMeshDepthMaterial = true; - -/** - * parameters = { - * - * referencePosition: , - * nearDistance: , - * farDistance: , - * - * morphTargets: , - * - * map: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: - * - * } - */ - -class MeshDistanceMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'MeshDistanceMaterial'; - - this.referencePosition = new Vector3(); - this.nearDistance = 1; - this.farDistance = 1000; - - this.morphTargets = false; - - this.map = null; - - this.alphaMap = null; - - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - - this.fog = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.referencePosition.copy( source.referencePosition ); - this.nearDistance = source.nearDistance; - this.farDistance = source.farDistance; - - this.morphTargets = source.morphTargets; - - this.map = source.map; - - this.alphaMap = source.alphaMap; - - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - - return this; - - } - -} - -MeshDistanceMaterial.prototype.isMeshDistanceMaterial = true; - -var vsm_frag = "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"; - -var vsm_vert = "void main() {\n\tgl_Position = vec4( position, 1.0 );\n}"; - -function WebGLShadowMap( _renderer, _objects, _capabilities ) { - - let _frustum = new Frustum(); - - const _shadowMapSize = new Vector2(), - _viewportSize = new Vector2(), - - _viewport = new Vector4(), - - _depthMaterials = [], - _distanceMaterials = [], - - _materialCache = {}, - - _maxTextureSize = _capabilities.maxTextureSize; - - const shadowSide = { 0: BackSide, 1: FrontSide, 2: DoubleSide }; - - const shadowMaterialVertical = new ShaderMaterial( { - - defines: { - SAMPLE_RATE: 2.0 / 8.0, - HALF_SAMPLE_RATE: 1.0 / 8.0 - }, - - uniforms: { - shadow_pass: { value: null }, - resolution: { value: new Vector2() }, - radius: { value: 4.0 } - }, - - vertexShader: vsm_vert, - - fragmentShader: vsm_frag - - } ); - - const shadowMaterialHorizontal = shadowMaterialVertical.clone(); - shadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1; - - const fullScreenTri = new BufferGeometry(); - fullScreenTri.setAttribute( - 'position', - new BufferAttribute( - new Float32Array( [ - 1, - 1, 0.5, 3, - 1, 0.5, - 1, 3, 0.5 ] ), - 3 - ) - ); - - const fullScreenMesh = new Mesh( fullScreenTri, shadowMaterialVertical ); - - const scope = this; - - this.enabled = false; - - this.autoUpdate = true; - this.needsUpdate = false; - - this.type = PCFShadowMap; - - this.render = function ( lights, scene, camera ) { - - if ( scope.enabled === false ) return; - if ( scope.autoUpdate === false && scope.needsUpdate === false ) return; - - if ( lights.length === 0 ) return; - - const currentRenderTarget = _renderer.getRenderTarget(); - const activeCubeFace = _renderer.getActiveCubeFace(); - const activeMipmapLevel = _renderer.getActiveMipmapLevel(); - - const _state = _renderer.state; - - // Set GL state for depth map. - _state.setBlending( NoBlending ); - _state.buffers.color.setClear( 1, 1, 1, 1 ); - _state.buffers.depth.setTest( true ); - _state.setScissorTest( false ); - - // render depth map - - for ( let i = 0, il = lights.length; i < il; i ++ ) { - - const light = lights[ i ]; - const shadow = light.shadow; - - if ( shadow === undefined ) { - - console.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' ); - continue; - - } - - if ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue; - - _shadowMapSize.copy( shadow.mapSize ); - - const shadowFrameExtents = shadow.getFrameExtents(); - - _shadowMapSize.multiply( shadowFrameExtents ); - - _viewportSize.copy( shadow.mapSize ); - - if ( _shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize ) { - - if ( _shadowMapSize.x > _maxTextureSize ) { - - _viewportSize.x = Math.floor( _maxTextureSize / shadowFrameExtents.x ); - _shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x; - shadow.mapSize.x = _viewportSize.x; - - } - - if ( _shadowMapSize.y > _maxTextureSize ) { - - _viewportSize.y = Math.floor( _maxTextureSize / shadowFrameExtents.y ); - _shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y; - shadow.mapSize.y = _viewportSize.y; - - } - - } - - if ( shadow.map === null && ! shadow.isPointLightShadow && this.type === VSMShadowMap ) { - - const pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat }; - - shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars ); - shadow.map.texture.name = light.name + '.shadowMap'; - - shadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars ); - - shadow.camera.updateProjectionMatrix(); - - } - - if ( shadow.map === null ) { - - const pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat }; - - shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars ); - shadow.map.texture.name = light.name + '.shadowMap'; - - shadow.camera.updateProjectionMatrix(); - - } - - _renderer.setRenderTarget( shadow.map ); - _renderer.clear(); - - const viewportCount = shadow.getViewportCount(); - - for ( let vp = 0; vp < viewportCount; vp ++ ) { - - const viewport = shadow.getViewport( vp ); - - _viewport.set( - _viewportSize.x * viewport.x, - _viewportSize.y * viewport.y, - _viewportSize.x * viewport.z, - _viewportSize.y * viewport.w - ); - - _state.viewport( _viewport ); - - shadow.updateMatrices( light, vp ); - - _frustum = shadow.getFrustum(); - - renderObject( scene, camera, shadow.camera, light, this.type ); - - } - - // do blur pass for VSM - - if ( ! shadow.isPointLightShadow && this.type === VSMShadowMap ) { - - VSMPass( shadow, camera ); - - } - - shadow.needsUpdate = false; - - } - - scope.needsUpdate = false; - - _renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel ); - - }; - - function VSMPass( shadow, camera ) { - - const geometry = _objects.update( fullScreenMesh ); - - // vertical pass - - shadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture; - shadowMaterialVertical.uniforms.resolution.value = shadow.mapSize; - shadowMaterialVertical.uniforms.radius.value = shadow.radius; - _renderer.setRenderTarget( shadow.mapPass ); - _renderer.clear(); - _renderer.renderBufferDirect( camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null ); - - // horizontal pass - - shadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture; - shadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize; - shadowMaterialHorizontal.uniforms.radius.value = shadow.radius; - _renderer.setRenderTarget( shadow.map ); - _renderer.clear(); - _renderer.renderBufferDirect( camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null ); - - } - - function getDepthMaterialVariant( useMorphing ) { - - const index = useMorphing << 0; - - let material = _depthMaterials[ index ]; - - if ( material === undefined ) { - - material = new MeshDepthMaterial( { - - depthPacking: RGBADepthPacking, - - morphTargets: useMorphing - - } ); - - _depthMaterials[ index ] = material; - - } - - return material; - - } - - function getDistanceMaterialVariant( useMorphing ) { - - const index = useMorphing << 0; - - let material = _distanceMaterials[ index ]; - - if ( material === undefined ) { - - material = new MeshDistanceMaterial( { - - morphTargets: useMorphing - - } ); - - _distanceMaterials[ index ] = material; - - } - - return material; - - } - - function getDepthMaterial( object, geometry, material, light, shadowCameraNear, shadowCameraFar, type ) { - - let result = null; - - let getMaterialVariant = getDepthMaterialVariant; - let customMaterial = object.customDepthMaterial; - - if ( light.isPointLight === true ) { - - getMaterialVariant = getDistanceMaterialVariant; - customMaterial = object.customDistanceMaterial; - - } - - if ( customMaterial === undefined ) { - - let useMorphing = false; - - if ( material.morphTargets === true ) { - - useMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0; - - } - - result = getMaterialVariant( useMorphing ); - - } else { - - result = customMaterial; - - } - - if ( _renderer.localClippingEnabled && - material.clipShadows === true && - material.clippingPlanes.length !== 0 ) { - - // in this case we need a unique material instance reflecting the - // appropriate state - - const keyA = result.uuid, keyB = material.uuid; - - let materialsForVariant = _materialCache[ keyA ]; - - if ( materialsForVariant === undefined ) { - - materialsForVariant = {}; - _materialCache[ keyA ] = materialsForVariant; - - } - - let cachedMaterial = materialsForVariant[ keyB ]; - - if ( cachedMaterial === undefined ) { - - cachedMaterial = result.clone(); - materialsForVariant[ keyB ] = cachedMaterial; - - } - - result = cachedMaterial; - - } - - result.visible = material.visible; - result.wireframe = material.wireframe; - - if ( type === VSMShadowMap ) { - - result.side = ( material.shadowSide !== null ) ? material.shadowSide : material.side; - - } else { - - result.side = ( material.shadowSide !== null ) ? material.shadowSide : shadowSide[ material.side ]; - - } - - result.clipShadows = material.clipShadows; - result.clippingPlanes = material.clippingPlanes; - result.clipIntersection = material.clipIntersection; - - result.wireframeLinewidth = material.wireframeLinewidth; - result.linewidth = material.linewidth; - - if ( light.isPointLight === true && result.isMeshDistanceMaterial === true ) { - - result.referencePosition.setFromMatrixPosition( light.matrixWorld ); - result.nearDistance = shadowCameraNear; - result.farDistance = shadowCameraFar; - - } - - return result; - - } - - function renderObject( object, camera, shadowCamera, light, type ) { - - if ( object.visible === false ) return; - - const visible = object.layers.test( camera.layers ); - - if ( visible && ( object.isMesh || object.isLine || object.isPoints ) ) { - - if ( ( object.castShadow || ( object.receiveShadow && type === VSMShadowMap ) ) && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) { - - object.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld ); - - const geometry = _objects.update( object ); - const material = object.material; - - if ( Array.isArray( material ) ) { - - const groups = geometry.groups; - - for ( let k = 0, kl = groups.length; k < kl; k ++ ) { - - const group = groups[ k ]; - const groupMaterial = material[ group.materialIndex ]; - - if ( groupMaterial && groupMaterial.visible ) { - - const depthMaterial = getDepthMaterial( object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type ); - - _renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group ); - - } - - } - - } else if ( material.visible ) { - - const depthMaterial = getDepthMaterial( object, geometry, material, light, shadowCamera.near, shadowCamera.far, type ); - - _renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null ); - - } - - } - - } - - const children = object.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - renderObject( children[ i ], camera, shadowCamera, light, type ); - - } - - } - -} - -function WebGLState( gl, extensions, capabilities ) { - - const isWebGL2 = capabilities.isWebGL2; - - function ColorBuffer() { - - let locked = false; - - const color = new Vector4(); - let currentColorMask = null; - const currentColorClear = new Vector4( 0, 0, 0, 0 ); - - return { - - setMask: function ( colorMask ) { - - if ( currentColorMask !== colorMask && ! locked ) { - - gl.colorMask( colorMask, colorMask, colorMask, colorMask ); - currentColorMask = colorMask; - - } - - }, - - setLocked: function ( lock ) { - - locked = lock; - - }, - - setClear: function ( r, g, b, a, premultipliedAlpha ) { - - if ( premultipliedAlpha === true ) { - - r *= a; g *= a; b *= a; - - } - - color.set( r, g, b, a ); - - if ( currentColorClear.equals( color ) === false ) { - - gl.clearColor( r, g, b, a ); - currentColorClear.copy( color ); - - } - - }, - - reset: function () { - - locked = false; - - currentColorMask = null; - currentColorClear.set( - 1, 0, 0, 0 ); // set to invalid state - - } - - }; - - } - - function DepthBuffer() { - - let locked = false; - - let currentDepthMask = null; - let currentDepthFunc = null; - let currentDepthClear = null; - - return { - - setTest: function ( depthTest ) { - - if ( depthTest ) { - - enable( 2929 ); - - } else { - - disable( 2929 ); - - } - - }, - - setMask: function ( depthMask ) { - - if ( currentDepthMask !== depthMask && ! locked ) { - - gl.depthMask( depthMask ); - currentDepthMask = depthMask; - - } - - }, - - setFunc: function ( depthFunc ) { - - if ( currentDepthFunc !== depthFunc ) { - - if ( depthFunc ) { - - switch ( depthFunc ) { - - case NeverDepth: - - gl.depthFunc( 512 ); - break; - - case AlwaysDepth: - - gl.depthFunc( 519 ); - break; - - case LessDepth: - - gl.depthFunc( 513 ); - break; - - case LessEqualDepth: - - gl.depthFunc( 515 ); - break; - - case EqualDepth: - - gl.depthFunc( 514 ); - break; - - case GreaterEqualDepth: - - gl.depthFunc( 518 ); - break; - - case GreaterDepth: - - gl.depthFunc( 516 ); - break; - - case NotEqualDepth: - - gl.depthFunc( 517 ); - break; - - default: - - gl.depthFunc( 515 ); - - } - - } else { - - gl.depthFunc( 515 ); - - } - - currentDepthFunc = depthFunc; - - } - - }, - - setLocked: function ( lock ) { - - locked = lock; - - }, - - setClear: function ( depth ) { - - if ( currentDepthClear !== depth ) { - - gl.clearDepth( depth ); - currentDepthClear = depth; - - } - - }, - - reset: function () { - - locked = false; - - currentDepthMask = null; - currentDepthFunc = null; - currentDepthClear = null; - - } - - }; - - } - - function StencilBuffer() { - - let locked = false; - - let currentStencilMask = null; - let currentStencilFunc = null; - let currentStencilRef = null; - let currentStencilFuncMask = null; - let currentStencilFail = null; - let currentStencilZFail = null; - let currentStencilZPass = null; - let currentStencilClear = null; - - return { - - setTest: function ( stencilTest ) { - - if ( ! locked ) { - - if ( stencilTest ) { - - enable( 2960 ); - - } else { - - disable( 2960 ); - - } - - } - - }, - - setMask: function ( stencilMask ) { - - if ( currentStencilMask !== stencilMask && ! locked ) { - - gl.stencilMask( stencilMask ); - currentStencilMask = stencilMask; - - } - - }, - - setFunc: function ( stencilFunc, stencilRef, stencilMask ) { - - if ( currentStencilFunc !== stencilFunc || - currentStencilRef !== stencilRef || - currentStencilFuncMask !== stencilMask ) { - - gl.stencilFunc( stencilFunc, stencilRef, stencilMask ); - - currentStencilFunc = stencilFunc; - currentStencilRef = stencilRef; - currentStencilFuncMask = stencilMask; - - } - - }, - - setOp: function ( stencilFail, stencilZFail, stencilZPass ) { - - if ( currentStencilFail !== stencilFail || - currentStencilZFail !== stencilZFail || - currentStencilZPass !== stencilZPass ) { - - gl.stencilOp( stencilFail, stencilZFail, stencilZPass ); - - currentStencilFail = stencilFail; - currentStencilZFail = stencilZFail; - currentStencilZPass = stencilZPass; - - } - - }, - - setLocked: function ( lock ) { - - locked = lock; - - }, - - setClear: function ( stencil ) { - - if ( currentStencilClear !== stencil ) { - - gl.clearStencil( stencil ); - currentStencilClear = stencil; - - } - - }, - - reset: function () { - - locked = false; - - currentStencilMask = null; - currentStencilFunc = null; - currentStencilRef = null; - currentStencilFuncMask = null; - currentStencilFail = null; - currentStencilZFail = null; - currentStencilZPass = null; - currentStencilClear = null; - - } - - }; - - } - - // - - const colorBuffer = new ColorBuffer(); - const depthBuffer = new DepthBuffer(); - const stencilBuffer = new StencilBuffer(); - - let enabledCapabilities = {}; - - let xrFramebuffer = null; - let currentBoundFramebuffers = {}; - - let currentProgram = null; - - let currentBlendingEnabled = false; - let currentBlending = null; - let currentBlendEquation = null; - let currentBlendSrc = null; - let currentBlendDst = null; - let currentBlendEquationAlpha = null; - let currentBlendSrcAlpha = null; - let currentBlendDstAlpha = null; - let currentPremultipledAlpha = false; - - let currentFlipSided = null; - let currentCullFace = null; - - let currentLineWidth = null; - - let currentPolygonOffsetFactor = null; - let currentPolygonOffsetUnits = null; - - const maxTextures = gl.getParameter( 35661 ); - - let lineWidthAvailable = false; - let version = 0; - const glVersion = gl.getParameter( 7938 ); - - if ( glVersion.indexOf( 'WebGL' ) !== - 1 ) { - - version = parseFloat( /^WebGL (\d)/.exec( glVersion )[ 1 ] ); - lineWidthAvailable = ( version >= 1.0 ); - - } else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) { - - version = parseFloat( /^OpenGL ES (\d)/.exec( glVersion )[ 1 ] ); - lineWidthAvailable = ( version >= 2.0 ); - - } - - let currentTextureSlot = null; - let currentBoundTextures = {}; - - const scissorParam = gl.getParameter( 3088 ); - const viewportParam = gl.getParameter( 2978 ); - - const currentScissor = new Vector4().fromArray( scissorParam ); - const currentViewport = new Vector4().fromArray( viewportParam ); - - function createTexture( type, target, count ) { - - const data = new Uint8Array( 4 ); // 4 is required to match default unpack alignment of 4. - const texture = gl.createTexture(); - - gl.bindTexture( type, texture ); - gl.texParameteri( type, 10241, 9728 ); - gl.texParameteri( type, 10240, 9728 ); - - for ( let i = 0; i < count; i ++ ) { - - gl.texImage2D( target + i, 0, 6408, 1, 1, 0, 6408, 5121, data ); - - } - - return texture; - - } - - const emptyTextures = {}; - emptyTextures[ 3553 ] = createTexture( 3553, 3553, 1 ); - emptyTextures[ 34067 ] = createTexture( 34067, 34069, 6 ); - - // init - - colorBuffer.setClear( 0, 0, 0, 1 ); - depthBuffer.setClear( 1 ); - stencilBuffer.setClear( 0 ); - - enable( 2929 ); - depthBuffer.setFunc( LessEqualDepth ); - - setFlipSided( false ); - setCullFace( CullFaceBack ); - enable( 2884 ); - - setBlending( NoBlending ); - - // - - function enable( id ) { - - if ( enabledCapabilities[ id ] !== true ) { - - gl.enable( id ); - enabledCapabilities[ id ] = true; - - } - - } - - function disable( id ) { - - if ( enabledCapabilities[ id ] !== false ) { - - gl.disable( id ); - enabledCapabilities[ id ] = false; - - } - - } - - function bindXRFramebuffer( framebuffer ) { - - if ( framebuffer !== xrFramebuffer ) { - - gl.bindFramebuffer( 36160, framebuffer ); - - xrFramebuffer = framebuffer; - - } - - } - - function bindFramebuffer( target, framebuffer ) { - - if ( framebuffer === null && xrFramebuffer !== null ) framebuffer = xrFramebuffer; // use active XR framebuffer if available - - if ( currentBoundFramebuffers[ target ] !== framebuffer ) { - - gl.bindFramebuffer( target, framebuffer ); - - currentBoundFramebuffers[ target ] = framebuffer; - - if ( isWebGL2 ) { - - // 36009 is equivalent to 36160 - - if ( target === 36009 ) { - - currentBoundFramebuffers[ 36160 ] = framebuffer; - - } - - if ( target === 36160 ) { - - currentBoundFramebuffers[ 36009 ] = framebuffer; - - } - - } - - return true; - - } - - return false; - - } - - function useProgram( program ) { - - if ( currentProgram !== program ) { - - gl.useProgram( program ); - - currentProgram = program; - - return true; - - } - - return false; - - } - - const equationToGL = { - [ AddEquation ]: 32774, - [ SubtractEquation ]: 32778, - [ ReverseSubtractEquation ]: 32779 - }; - - if ( isWebGL2 ) { - - equationToGL[ MinEquation ] = 32775; - equationToGL[ MaxEquation ] = 32776; - - } else { - - const extension = extensions.get( 'EXT_blend_minmax' ); - - if ( extension !== null ) { - - equationToGL[ MinEquation ] = extension.MIN_EXT; - equationToGL[ MaxEquation ] = extension.MAX_EXT; - - } - - } - - const factorToGL = { - [ ZeroFactor ]: 0, - [ OneFactor ]: 1, - [ SrcColorFactor ]: 768, - [ SrcAlphaFactor ]: 770, - [ SrcAlphaSaturateFactor ]: 776, - [ DstColorFactor ]: 774, - [ DstAlphaFactor ]: 772, - [ OneMinusSrcColorFactor ]: 769, - [ OneMinusSrcAlphaFactor ]: 771, - [ OneMinusDstColorFactor ]: 775, - [ OneMinusDstAlphaFactor ]: 773 - }; - - function setBlending( blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha ) { - - if ( blending === NoBlending ) { - - if ( currentBlendingEnabled === true ) { - - disable( 3042 ); - currentBlendingEnabled = false; - - } - - return; - - } - - if ( currentBlendingEnabled === false ) { - - enable( 3042 ); - currentBlendingEnabled = true; - - } - - if ( blending !== CustomBlending ) { - - if ( blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha ) { - - if ( currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation ) { - - gl.blendEquation( 32774 ); - - currentBlendEquation = AddEquation; - currentBlendEquationAlpha = AddEquation; - - } - - if ( premultipliedAlpha ) { - - switch ( blending ) { - - case NormalBlending: - gl.blendFuncSeparate( 1, 771, 1, 771 ); - break; - - case AdditiveBlending: - gl.blendFunc( 1, 1 ); - break; - - case SubtractiveBlending: - gl.blendFuncSeparate( 0, 0, 769, 771 ); - break; - - case MultiplyBlending: - gl.blendFuncSeparate( 0, 768, 0, 770 ); - break; - - default: - console.error( 'THREE.WebGLState: Invalid blending: ', blending ); - break; - - } - - } else { - - switch ( blending ) { - - case NormalBlending: - gl.blendFuncSeparate( 770, 771, 1, 771 ); - break; - - case AdditiveBlending: - gl.blendFunc( 770, 1 ); - break; - - case SubtractiveBlending: - gl.blendFunc( 0, 769 ); - break; - - case MultiplyBlending: - gl.blendFunc( 0, 768 ); - break; - - default: - console.error( 'THREE.WebGLState: Invalid blending: ', blending ); - break; - - } - - } - - currentBlendSrc = null; - currentBlendDst = null; - currentBlendSrcAlpha = null; - currentBlendDstAlpha = null; - - currentBlending = blending; - currentPremultipledAlpha = premultipliedAlpha; - - } - - return; - - } - - // custom blending - - blendEquationAlpha = blendEquationAlpha || blendEquation; - blendSrcAlpha = blendSrcAlpha || blendSrc; - blendDstAlpha = blendDstAlpha || blendDst; - - if ( blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha ) { - - gl.blendEquationSeparate( equationToGL[ blendEquation ], equationToGL[ blendEquationAlpha ] ); - - currentBlendEquation = blendEquation; - currentBlendEquationAlpha = blendEquationAlpha; - - } - - if ( blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha ) { - - gl.blendFuncSeparate( factorToGL[ blendSrc ], factorToGL[ blendDst ], factorToGL[ blendSrcAlpha ], factorToGL[ blendDstAlpha ] ); - - currentBlendSrc = blendSrc; - currentBlendDst = blendDst; - currentBlendSrcAlpha = blendSrcAlpha; - currentBlendDstAlpha = blendDstAlpha; - - } - - currentBlending = blending; - currentPremultipledAlpha = null; - - } - - function setMaterial( material, frontFaceCW ) { - - material.side === DoubleSide - ? disable( 2884 ) - : enable( 2884 ); - - let flipSided = ( material.side === BackSide ); - if ( frontFaceCW ) flipSided = ! flipSided; - - setFlipSided( flipSided ); - - ( material.blending === NormalBlending && material.transparent === false ) - ? setBlending( NoBlending ) - : setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha ); - - depthBuffer.setFunc( material.depthFunc ); - depthBuffer.setTest( material.depthTest ); - depthBuffer.setMask( material.depthWrite ); - colorBuffer.setMask( material.colorWrite ); - - const stencilWrite = material.stencilWrite; - stencilBuffer.setTest( stencilWrite ); - if ( stencilWrite ) { - - stencilBuffer.setMask( material.stencilWriteMask ); - stencilBuffer.setFunc( material.stencilFunc, material.stencilRef, material.stencilFuncMask ); - stencilBuffer.setOp( material.stencilFail, material.stencilZFail, material.stencilZPass ); - - } - - setPolygonOffset( material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits ); - - material.alphaToCoverage === true - ? enable( 32926 ) - : disable( 32926 ); - - } - - // - - function setFlipSided( flipSided ) { - - if ( currentFlipSided !== flipSided ) { - - if ( flipSided ) { - - gl.frontFace( 2304 ); - - } else { - - gl.frontFace( 2305 ); - - } - - currentFlipSided = flipSided; - - } - - } - - function setCullFace( cullFace ) { - - if ( cullFace !== CullFaceNone ) { - - enable( 2884 ); - - if ( cullFace !== currentCullFace ) { - - if ( cullFace === CullFaceBack ) { - - gl.cullFace( 1029 ); - - } else if ( cullFace === CullFaceFront ) { - - gl.cullFace( 1028 ); - - } else { - - gl.cullFace( 1032 ); - - } - - } - - } else { - - disable( 2884 ); - - } - - currentCullFace = cullFace; - - } - - function setLineWidth( width ) { - - if ( width !== currentLineWidth ) { - - if ( lineWidthAvailable ) gl.lineWidth( width ); - - currentLineWidth = width; - - } - - } - - function setPolygonOffset( polygonOffset, factor, units ) { - - if ( polygonOffset ) { - - enable( 32823 ); - - if ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) { - - gl.polygonOffset( factor, units ); - - currentPolygonOffsetFactor = factor; - currentPolygonOffsetUnits = units; - - } - - } else { - - disable( 32823 ); - - } - - } - - function setScissorTest( scissorTest ) { - - if ( scissorTest ) { - - enable( 3089 ); - - } else { - - disable( 3089 ); - - } - - } - - // texture - - function activeTexture( webglSlot ) { - - if ( webglSlot === undefined ) webglSlot = 33984 + maxTextures - 1; - - if ( currentTextureSlot !== webglSlot ) { - - gl.activeTexture( webglSlot ); - currentTextureSlot = webglSlot; - - } - - } - - function bindTexture( webglType, webglTexture ) { - - if ( currentTextureSlot === null ) { - - activeTexture(); - - } - - let boundTexture = currentBoundTextures[ currentTextureSlot ]; - - if ( boundTexture === undefined ) { - - boundTexture = { type: undefined, texture: undefined }; - currentBoundTextures[ currentTextureSlot ] = boundTexture; - - } - - if ( boundTexture.type !== webglType || boundTexture.texture !== webglTexture ) { - - gl.bindTexture( webglType, webglTexture || emptyTextures[ webglType ] ); - - boundTexture.type = webglType; - boundTexture.texture = webglTexture; - - } - - } - - function unbindTexture() { - - const boundTexture = currentBoundTextures[ currentTextureSlot ]; - - if ( boundTexture !== undefined && boundTexture.type !== undefined ) { - - gl.bindTexture( boundTexture.type, null ); - - boundTexture.type = undefined; - boundTexture.texture = undefined; - - } - - } - - function compressedTexImage2D() { - - try { - - gl.compressedTexImage2D.apply( gl, arguments ); - - } catch ( error ) { - - console.error( 'THREE.WebGLState:', error ); - - } - - } - - function texImage2D() { - - try { - - gl.texImage2D.apply( gl, arguments ); - - } catch ( error ) { - - console.error( 'THREE.WebGLState:', error ); - - } - - } - - function texImage3D() { - - try { - - gl.texImage3D.apply( gl, arguments ); - - } catch ( error ) { - - console.error( 'THREE.WebGLState:', error ); - - } - - } - - // - - function scissor( scissor ) { - - if ( currentScissor.equals( scissor ) === false ) { - - gl.scissor( scissor.x, scissor.y, scissor.z, scissor.w ); - currentScissor.copy( scissor ); - - } - - } - - function viewport( viewport ) { - - if ( currentViewport.equals( viewport ) === false ) { - - gl.viewport( viewport.x, viewport.y, viewport.z, viewport.w ); - currentViewport.copy( viewport ); - - } - - } - - // - - function reset() { - - // reset state - - gl.disable( 3042 ); - gl.disable( 2884 ); - gl.disable( 2929 ); - gl.disable( 32823 ); - gl.disable( 3089 ); - gl.disable( 2960 ); - gl.disable( 32926 ); - - gl.blendEquation( 32774 ); - gl.blendFunc( 1, 0 ); - gl.blendFuncSeparate( 1, 0, 1, 0 ); - - gl.colorMask( true, true, true, true ); - gl.clearColor( 0, 0, 0, 0 ); - - gl.depthMask( true ); - gl.depthFunc( 513 ); - gl.clearDepth( 1 ); - - gl.stencilMask( 0xffffffff ); - gl.stencilFunc( 519, 0, 0xffffffff ); - gl.stencilOp( 7680, 7680, 7680 ); - gl.clearStencil( 0 ); - - gl.cullFace( 1029 ); - gl.frontFace( 2305 ); - - gl.polygonOffset( 0, 0 ); - - gl.activeTexture( 33984 ); - - gl.bindFramebuffer( 36160, null ); - - if ( isWebGL2 === true ) { - - gl.bindFramebuffer( 36009, null ); - gl.bindFramebuffer( 36008, null ); - - } - - gl.useProgram( null ); - - gl.lineWidth( 1 ); - - gl.scissor( 0, 0, gl.canvas.width, gl.canvas.height ); - gl.viewport( 0, 0, gl.canvas.width, gl.canvas.height ); - - // reset internals - - enabledCapabilities = {}; - - currentTextureSlot = null; - currentBoundTextures = {}; - - xrFramebuffer = null; - currentBoundFramebuffers = {}; - - currentProgram = null; - - currentBlendingEnabled = false; - currentBlending = null; - currentBlendEquation = null; - currentBlendSrc = null; - currentBlendDst = null; - currentBlendEquationAlpha = null; - currentBlendSrcAlpha = null; - currentBlendDstAlpha = null; - currentPremultipledAlpha = false; - - currentFlipSided = null; - currentCullFace = null; - - currentLineWidth = null; - - currentPolygonOffsetFactor = null; - currentPolygonOffsetUnits = null; - - currentScissor.set( 0, 0, gl.canvas.width, gl.canvas.height ); - currentViewport.set( 0, 0, gl.canvas.width, gl.canvas.height ); - - colorBuffer.reset(); - depthBuffer.reset(); - stencilBuffer.reset(); - - } - - return { - - buffers: { - color: colorBuffer, - depth: depthBuffer, - stencil: stencilBuffer - }, - - enable: enable, - disable: disable, - - bindFramebuffer: bindFramebuffer, - bindXRFramebuffer: bindXRFramebuffer, - - useProgram: useProgram, - - setBlending: setBlending, - setMaterial: setMaterial, - - setFlipSided: setFlipSided, - setCullFace: setCullFace, - - setLineWidth: setLineWidth, - setPolygonOffset: setPolygonOffset, - - setScissorTest: setScissorTest, - - activeTexture: activeTexture, - bindTexture: bindTexture, - unbindTexture: unbindTexture, - compressedTexImage2D: compressedTexImage2D, - texImage2D: texImage2D, - texImage3D: texImage3D, - - scissor: scissor, - viewport: viewport, - - reset: reset - - }; - -} - -function WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) { - - const isWebGL2 = capabilities.isWebGL2; - const maxTextures = capabilities.maxTextures; - const maxCubemapSize = capabilities.maxCubemapSize; - const maxTextureSize = capabilities.maxTextureSize; - const maxSamples = capabilities.maxSamples; - - const _videoTextures = new WeakMap(); - let _canvas; - - // cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas, - // also OffscreenCanvas.getContext("webgl"), but not OffscreenCanvas.getContext("2d")! - // Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d). - - let useOffscreenCanvas = false; - - try { - - useOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' - && ( new OffscreenCanvas( 1, 1 ).getContext( '2d' ) ) !== null; - - } catch ( err ) { - - // Ignore any errors - - } - - function createCanvas( width, height ) { - - // Use OffscreenCanvas when available. Specially needed in web workers - - return useOffscreenCanvas ? - new OffscreenCanvas( width, height ) : - document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' ); - - } - - function resizeImage( image, needsPowerOfTwo, needsNewCanvas, maxSize ) { - - let scale = 1; - - // handle case if texture exceeds max size - - if ( image.width > maxSize || image.height > maxSize ) { - - scale = maxSize / Math.max( image.width, image.height ); - - } - - // only perform resize if necessary - - if ( scale < 1 || needsPowerOfTwo === true ) { - - // only perform resize for certain image types - - if ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) || - ( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) || - ( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) { - - const floor = needsPowerOfTwo ? floorPowerOfTwo : Math.floor; - - const width = floor( scale * image.width ); - const height = floor( scale * image.height ); - - if ( _canvas === undefined ) _canvas = createCanvas( width, height ); - - // cube textures can't reuse the same canvas - - const canvas = needsNewCanvas ? createCanvas( width, height ) : _canvas; - - canvas.width = width; - canvas.height = height; - - const context = canvas.getContext( '2d' ); - context.drawImage( image, 0, 0, width, height ); - - console.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').' ); - - return canvas; - - } else { - - if ( 'data' in image ) { - - console.warn( 'THREE.WebGLRenderer: Image in DataTexture is too big (' + image.width + 'x' + image.height + ').' ); - - } - - return image; - - } - - } - - return image; - - } - - function isPowerOfTwo$1( image ) { - - return isPowerOfTwo( image.width ) && isPowerOfTwo( image.height ); - - } - - function textureNeedsPowerOfTwo( texture ) { - - if ( isWebGL2 ) return false; - - return ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) || - ( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ); - - } - - function textureNeedsGenerateMipmaps( texture, supportsMips ) { - - return texture.generateMipmaps && supportsMips && - texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter; - - } - - function generateMipmap( target, texture, width, height, depth = 1 ) { - - _gl.generateMipmap( target ); - - const textureProperties = properties.get( texture ); - - textureProperties.__maxMipLevel = Math.log2( Math.max( width, height, depth ) ); - - } - - function getInternalFormat( internalFormatName, glFormat, glType ) { - - if ( isWebGL2 === false ) return glFormat; - - if ( internalFormatName !== null ) { - - if ( _gl[ internalFormatName ] !== undefined ) return _gl[ internalFormatName ]; - - console.warn( 'THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \'' + internalFormatName + '\'' ); - - } - - let internalFormat = glFormat; - - if ( glFormat === 6403 ) { - - if ( glType === 5126 ) internalFormat = 33326; - if ( glType === 5131 ) internalFormat = 33325; - if ( glType === 5121 ) internalFormat = 33321; - - } - - if ( glFormat === 6407 ) { - - if ( glType === 5126 ) internalFormat = 34837; - if ( glType === 5131 ) internalFormat = 34843; - if ( glType === 5121 ) internalFormat = 32849; - - } - - if ( glFormat === 6408 ) { - - if ( glType === 5126 ) internalFormat = 34836; - if ( glType === 5131 ) internalFormat = 34842; - if ( glType === 5121 ) internalFormat = 32856; - - } - - if ( internalFormat === 33325 || internalFormat === 33326 || - internalFormat === 34842 || internalFormat === 34836 ) { - - extensions.get( 'EXT_color_buffer_float' ); - - } - - return internalFormat; - - } - - // Fallback filters for non-power-of-2 textures - - function filterFallback( f ) { - - if ( f === NearestFilter || f === NearestMipmapNearestFilter || f === NearestMipmapLinearFilter ) { - - return 9728; - - } - - return 9729; - - } - - // - - function onTextureDispose( event ) { - - const texture = event.target; - - texture.removeEventListener( 'dispose', onTextureDispose ); - - deallocateTexture( texture ); - - if ( texture.isVideoTexture ) { - - _videoTextures.delete( texture ); - - } - - info.memory.textures --; - - } - - function onRenderTargetDispose( event ) { - - const renderTarget = event.target; - - renderTarget.removeEventListener( 'dispose', onRenderTargetDispose ); - - deallocateRenderTarget( renderTarget ); - - } - - // - - function deallocateTexture( texture ) { - - const textureProperties = properties.get( texture ); - - if ( textureProperties.__webglInit === undefined ) return; - - _gl.deleteTexture( textureProperties.__webglTexture ); - - properties.remove( texture ); - - } - - function deallocateRenderTarget( renderTarget ) { - - const texture = renderTarget.texture; - - const renderTargetProperties = properties.get( renderTarget ); - const textureProperties = properties.get( texture ); - - if ( ! renderTarget ) return; - - if ( textureProperties.__webglTexture !== undefined ) { - - _gl.deleteTexture( textureProperties.__webglTexture ); - - info.memory.textures --; - - } - - if ( renderTarget.depthTexture ) { - - renderTarget.depthTexture.dispose(); - - } - - if ( renderTarget.isWebGLCubeRenderTarget ) { - - for ( let i = 0; i < 6; i ++ ) { - - _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] ); - if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] ); - - } - - } else { - - _gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer ); - if ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer ); - if ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer ); - if ( renderTargetProperties.__webglColorRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglColorRenderbuffer ); - if ( renderTargetProperties.__webglDepthRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthRenderbuffer ); - - } - - if ( renderTarget.isWebGLMultipleRenderTargets ) { - - for ( let i = 0, il = texture.length; i < il; i ++ ) { - - const attachmentProperties = properties.get( texture[ i ] ); - - if ( attachmentProperties.__webglTexture ) { - - _gl.deleteTexture( attachmentProperties.__webglTexture ); - - info.memory.textures --; - - } - - properties.remove( texture[ i ] ); - - } - - } - - properties.remove( texture ); - properties.remove( renderTarget ); - - } - - // - - let textureUnits = 0; - - function resetTextureUnits() { - - textureUnits = 0; - - } - - function allocateTextureUnit() { - - const textureUnit = textureUnits; - - if ( textureUnit >= maxTextures ) { - - console.warn( 'THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + maxTextures ); - - } - - textureUnits += 1; - - return textureUnit; - - } - - // - - function setTexture2D( texture, slot ) { - - const textureProperties = properties.get( texture ); - - if ( texture.isVideoTexture ) updateVideoTexture( texture ); - - if ( texture.version > 0 && textureProperties.__version !== texture.version ) { - - const image = texture.image; - - if ( image === undefined ) { - - console.warn( 'THREE.WebGLRenderer: Texture marked for update but image is undefined' ); - - } else if ( image.complete === false ) { - - console.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete' ); - - } else { - - uploadTexture( textureProperties, texture, slot ); - return; - - } - - } - - state.activeTexture( 33984 + slot ); - state.bindTexture( 3553, textureProperties.__webglTexture ); - - } - - function setTexture2DArray( texture, slot ) { - - const textureProperties = properties.get( texture ); - - if ( texture.version > 0 && textureProperties.__version !== texture.version ) { - - uploadTexture( textureProperties, texture, slot ); - return; - - } - - state.activeTexture( 33984 + slot ); - state.bindTexture( 35866, textureProperties.__webglTexture ); - - } - - function setTexture3D( texture, slot ) { - - const textureProperties = properties.get( texture ); - - if ( texture.version > 0 && textureProperties.__version !== texture.version ) { - - uploadTexture( textureProperties, texture, slot ); - return; - - } - - state.activeTexture( 33984 + slot ); - state.bindTexture( 32879, textureProperties.__webglTexture ); - - } - - function setTextureCube( texture, slot ) { - - const textureProperties = properties.get( texture ); - - if ( texture.version > 0 && textureProperties.__version !== texture.version ) { - - uploadCubeTexture( textureProperties, texture, slot ); - return; - - } - - state.activeTexture( 33984 + slot ); - state.bindTexture( 34067, textureProperties.__webglTexture ); - - } - - const wrappingToGL = { - [ RepeatWrapping ]: 10497, - [ ClampToEdgeWrapping ]: 33071, - [ MirroredRepeatWrapping ]: 33648 - }; - - const filterToGL = { - [ NearestFilter ]: 9728, - [ NearestMipmapNearestFilter ]: 9984, - [ NearestMipmapLinearFilter ]: 9986, - - [ LinearFilter ]: 9729, - [ LinearMipmapNearestFilter ]: 9985, - [ LinearMipmapLinearFilter ]: 9987 - }; - - function setTextureParameters( textureType, texture, supportsMips ) { - - if ( supportsMips ) { - - _gl.texParameteri( textureType, 10242, wrappingToGL[ texture.wrapS ] ); - _gl.texParameteri( textureType, 10243, wrappingToGL[ texture.wrapT ] ); - - if ( textureType === 32879 || textureType === 35866 ) { - - _gl.texParameteri( textureType, 32882, wrappingToGL[ texture.wrapR ] ); - - } - - _gl.texParameteri( textureType, 10240, filterToGL[ texture.magFilter ] ); - _gl.texParameteri( textureType, 10241, filterToGL[ texture.minFilter ] ); - - } else { - - _gl.texParameteri( textureType, 10242, 33071 ); - _gl.texParameteri( textureType, 10243, 33071 ); - - if ( textureType === 32879 || textureType === 35866 ) { - - _gl.texParameteri( textureType, 32882, 33071 ); - - } - - if ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) { - - console.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.' ); - - } - - _gl.texParameteri( textureType, 10240, filterFallback( texture.magFilter ) ); - _gl.texParameteri( textureType, 10241, filterFallback( texture.minFilter ) ); - - if ( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) { - - console.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.' ); - - } - - } - - if ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) { - - const extension = extensions.get( 'EXT_texture_filter_anisotropic' ); - - if ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension for WebGL 1 and WebGL 2 - if ( isWebGL2 === false && ( texture.type === HalfFloatType && extensions.has( 'OES_texture_half_float_linear' ) === false ) ) return; // verify extension for WebGL 1 only - - if ( texture.anisotropy > 1 || properties.get( texture ).__currentAnisotropy ) { - - _gl.texParameterf( textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min( texture.anisotropy, capabilities.getMaxAnisotropy() ) ); - properties.get( texture ).__currentAnisotropy = texture.anisotropy; - - } - - } - - } - - function initTexture( textureProperties, texture ) { - - if ( textureProperties.__webglInit === undefined ) { - - textureProperties.__webglInit = true; - - texture.addEventListener( 'dispose', onTextureDispose ); - - textureProperties.__webglTexture = _gl.createTexture(); - - info.memory.textures ++; - - } - - } - - function uploadTexture( textureProperties, texture, slot ) { - - let textureType = 3553; - - if ( texture.isDataTexture2DArray ) textureType = 35866; - if ( texture.isDataTexture3D ) textureType = 32879; - - initTexture( textureProperties, texture ); - - state.activeTexture( 33984 + slot ); - state.bindTexture( textureType, textureProperties.__webglTexture ); - - _gl.pixelStorei( 37440, texture.flipY ); - _gl.pixelStorei( 37441, texture.premultiplyAlpha ); - _gl.pixelStorei( 3317, texture.unpackAlignment ); - _gl.pixelStorei( 37443, 0 ); - - const needsPowerOfTwo = textureNeedsPowerOfTwo( texture ) && isPowerOfTwo$1( texture.image ) === false; - const image = resizeImage( texture.image, needsPowerOfTwo, false, maxTextureSize ); - - const supportsMips = isPowerOfTwo$1( image ) || isWebGL2, - glFormat = utils.convert( texture.format ); - - let glType = utils.convert( texture.type ), - glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType ); - - setTextureParameters( textureType, texture, supportsMips ); - - let mipmap; - const mipmaps = texture.mipmaps; - - if ( texture.isDepthTexture ) { - - // populate depth texture with dummy data - - glInternalFormat = 6402; - - if ( isWebGL2 ) { - - if ( texture.type === FloatType ) { - - glInternalFormat = 36012; - - } else if ( texture.type === UnsignedIntType ) { - - glInternalFormat = 33190; - - } else if ( texture.type === UnsignedInt248Type ) { - - glInternalFormat = 35056; - - } else { - - glInternalFormat = 33189; // WebGL2 requires sized internalformat for glTexImage2D - - } - - } else { - - if ( texture.type === FloatType ) { - - console.error( 'WebGLRenderer: Floating point depth texture requires WebGL2.' ); - - } - - } - - // validation checks for WebGL 1 - - if ( texture.format === DepthFormat && glInternalFormat === 6402 ) { - - // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are - // DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT - // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/) - if ( texture.type !== UnsignedShortType && texture.type !== UnsignedIntType ) { - - console.warn( 'THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.' ); - - texture.type = UnsignedShortType; - glType = utils.convert( texture.type ); - - } - - } - - if ( texture.format === DepthStencilFormat && glInternalFormat === 6402 ) { - - // Depth stencil textures need the DEPTH_STENCIL internal format - // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/) - glInternalFormat = 34041; - - // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are - // DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL. - // (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/) - if ( texture.type !== UnsignedInt248Type ) { - - console.warn( 'THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.' ); - - texture.type = UnsignedInt248Type; - glType = utils.convert( texture.type ); - - } - - } - - // - - state.texImage2D( 3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null ); - - } else if ( texture.isDataTexture ) { - - // use manually created mipmaps if available - // if there are no manual mipmaps - // set 0 level mipmap and then use GL to generate other mipmap levels - - if ( mipmaps.length > 0 && supportsMips ) { - - for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { - - mipmap = mipmaps[ i ]; - state.texImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); - - } - - texture.generateMipmaps = false; - textureProperties.__maxMipLevel = mipmaps.length - 1; - - } else { - - state.texImage2D( 3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data ); - textureProperties.__maxMipLevel = 0; - - } - - } else if ( texture.isCompressedTexture ) { - - for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { - - mipmap = mipmaps[ i ]; - - if ( texture.format !== RGBAFormat && texture.format !== RGBFormat ) { - - if ( glFormat !== null ) { - - state.compressedTexImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data ); - - } else { - - console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' ); - - } - - } else { - - state.texImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); - - } - - } - - textureProperties.__maxMipLevel = mipmaps.length - 1; - - } else if ( texture.isDataTexture2DArray ) { - - state.texImage3D( 35866, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data ); - textureProperties.__maxMipLevel = 0; - - } else if ( texture.isDataTexture3D ) { - - state.texImage3D( 32879, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data ); - textureProperties.__maxMipLevel = 0; - - } else { - - // regular Texture (image, video, canvas) - - // use manually created mipmaps if available - // if there are no manual mipmaps - // set 0 level mipmap and then use GL to generate other mipmap levels - - if ( mipmaps.length > 0 && supportsMips ) { - - for ( let i = 0, il = mipmaps.length; i < il; i ++ ) { - - mipmap = mipmaps[ i ]; - state.texImage2D( 3553, i, glInternalFormat, glFormat, glType, mipmap ); - - } - - texture.generateMipmaps = false; - textureProperties.__maxMipLevel = mipmaps.length - 1; - - } else { - - state.texImage2D( 3553, 0, glInternalFormat, glFormat, glType, image ); - textureProperties.__maxMipLevel = 0; - - } - - } - - if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) { - - generateMipmap( textureType, texture, image.width, image.height ); - - } - - textureProperties.__version = texture.version; - - if ( texture.onUpdate ) texture.onUpdate( texture ); - - } - - function uploadCubeTexture( textureProperties, texture, slot ) { - - if ( texture.image.length !== 6 ) return; - - initTexture( textureProperties, texture ); - - state.activeTexture( 33984 + slot ); - state.bindTexture( 34067, textureProperties.__webglTexture ); - - _gl.pixelStorei( 37440, texture.flipY ); - _gl.pixelStorei( 37441, texture.premultiplyAlpha ); - _gl.pixelStorei( 3317, texture.unpackAlignment ); - _gl.pixelStorei( 37443, 0 ); - - const isCompressed = ( texture && ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture ) ); - const isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture ); - - const cubeImage = []; - - for ( let i = 0; i < 6; i ++ ) { - - if ( ! isCompressed && ! isDataTexture ) { - - cubeImage[ i ] = resizeImage( texture.image[ i ], false, true, maxCubemapSize ); - - } else { - - cubeImage[ i ] = isDataTexture ? texture.image[ i ].image : texture.image[ i ]; - - } - - } - - const image = cubeImage[ 0 ], - supportsMips = isPowerOfTwo$1( image ) || isWebGL2, - glFormat = utils.convert( texture.format ), - glType = utils.convert( texture.type ), - glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType ); - - setTextureParameters( 34067, texture, supportsMips ); - - let mipmaps; - - if ( isCompressed ) { - - for ( let i = 0; i < 6; i ++ ) { - - mipmaps = cubeImage[ i ].mipmaps; - - for ( let j = 0; j < mipmaps.length; j ++ ) { - - const mipmap = mipmaps[ j ]; - - if ( texture.format !== RGBAFormat && texture.format !== RGBFormat ) { - - if ( glFormat !== null ) { - - state.compressedTexImage2D( 34069 + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data ); - - } else { - - console.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()' ); - - } - - } else { - - state.texImage2D( 34069 + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data ); - - } - - } - - } - - textureProperties.__maxMipLevel = mipmaps.length - 1; - - } else { - - mipmaps = texture.mipmaps; - - for ( let i = 0; i < 6; i ++ ) { - - if ( isDataTexture ) { - - state.texImage2D( 34069 + i, 0, glInternalFormat, cubeImage[ i ].width, cubeImage[ i ].height, 0, glFormat, glType, cubeImage[ i ].data ); - - for ( let j = 0; j < mipmaps.length; j ++ ) { - - const mipmap = mipmaps[ j ]; - const mipmapImage = mipmap.image[ i ].image; - - state.texImage2D( 34069 + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data ); - - } - - } else { - - state.texImage2D( 34069 + i, 0, glInternalFormat, glFormat, glType, cubeImage[ i ] ); - - for ( let j = 0; j < mipmaps.length; j ++ ) { - - const mipmap = mipmaps[ j ]; - - state.texImage2D( 34069 + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[ i ] ); - - } - - } - - } - - textureProperties.__maxMipLevel = mipmaps.length; - - } - - if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) { - - // We assume images for cube map have the same size. - generateMipmap( 34067, texture, image.width, image.height ); - - } - - textureProperties.__version = texture.version; - - if ( texture.onUpdate ) texture.onUpdate( texture ); - - } - - // Render targets - - // Setup storage for target texture and bind it to correct framebuffer - function setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget ) { - - const glFormat = utils.convert( texture.format ); - const glType = utils.convert( texture.type ); - const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType ); - - if ( textureTarget === 32879 || textureTarget === 35866 ) { - - state.texImage3D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, renderTarget.depth, 0, glFormat, glType, null ); - - } else { - - state.texImage2D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null ); - - } - - state.bindFramebuffer( 36160, framebuffer ); - _gl.framebufferTexture2D( 36160, attachment, textureTarget, properties.get( texture ).__webglTexture, 0 ); - state.bindFramebuffer( 36160, null ); - - } - - // Setup storage for internal depth/stencil buffers and bind to correct framebuffer - function setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) { - - _gl.bindRenderbuffer( 36161, renderbuffer ); - - if ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) { - - let glInternalFormat = 33189; - - if ( isMultisample ) { - - const depthTexture = renderTarget.depthTexture; - - if ( depthTexture && depthTexture.isDepthTexture ) { - - if ( depthTexture.type === FloatType ) { - - glInternalFormat = 36012; - - } else if ( depthTexture.type === UnsignedIntType ) { - - glInternalFormat = 33190; - - } - - } - - const samples = getRenderTargetSamples( renderTarget ); - - _gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height ); - - } else { - - _gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height ); - - } - - _gl.framebufferRenderbuffer( 36160, 36096, 36161, renderbuffer ); - - } else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) { - - if ( isMultisample ) { - - const samples = getRenderTargetSamples( renderTarget ); - - _gl.renderbufferStorageMultisample( 36161, samples, 35056, renderTarget.width, renderTarget.height ); - - } else { - - _gl.renderbufferStorage( 36161, 34041, renderTarget.width, renderTarget.height ); - - } - - - _gl.framebufferRenderbuffer( 36160, 33306, 36161, renderbuffer ); - - } else { - - // Use the first texture for MRT so far - const texture = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture[ 0 ] : renderTarget.texture; - - const glFormat = utils.convert( texture.format ); - const glType = utils.convert( texture.type ); - const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType ); - - if ( isMultisample ) { - - const samples = getRenderTargetSamples( renderTarget ); - - _gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height ); - - } else { - - _gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height ); - - } - - } - - _gl.bindRenderbuffer( 36161, null ); - - } - - // Setup resources for a Depth Texture for a FBO (needs an extension) - function setupDepthTexture( framebuffer, renderTarget ) { - - const isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget ); - if ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' ); - - state.bindFramebuffer( 36160, framebuffer ); - - if ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) { - - throw new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' ); - - } - - // upload an empty depth texture with framebuffer size - if ( ! properties.get( renderTarget.depthTexture ).__webglTexture || - renderTarget.depthTexture.image.width !== renderTarget.width || - renderTarget.depthTexture.image.height !== renderTarget.height ) { - - renderTarget.depthTexture.image.width = renderTarget.width; - renderTarget.depthTexture.image.height = renderTarget.height; - renderTarget.depthTexture.needsUpdate = true; - - } - - setTexture2D( renderTarget.depthTexture, 0 ); - - const webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture; - - if ( renderTarget.depthTexture.format === DepthFormat ) { - - _gl.framebufferTexture2D( 36160, 36096, 3553, webglDepthTexture, 0 ); - - } else if ( renderTarget.depthTexture.format === DepthStencilFormat ) { - - _gl.framebufferTexture2D( 36160, 33306, 3553, webglDepthTexture, 0 ); - - } else { - - throw new Error( 'Unknown depthTexture format' ); - - } - - } - - // Setup GL resources for a non-texture depth buffer - function setupDepthRenderbuffer( renderTarget ) { - - const renderTargetProperties = properties.get( renderTarget ); - - const isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); - - if ( renderTarget.depthTexture ) { - - if ( isCube ) throw new Error( 'target.depthTexture not supported in Cube render targets' ); - - setupDepthTexture( renderTargetProperties.__webglFramebuffer, renderTarget ); - - } else { - - if ( isCube ) { - - renderTargetProperties.__webglDepthbuffer = []; - - for ( let i = 0; i < 6; i ++ ) { - - state.bindFramebuffer( 36160, renderTargetProperties.__webglFramebuffer[ i ] ); - renderTargetProperties.__webglDepthbuffer[ i ] = _gl.createRenderbuffer(); - setupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer[ i ], renderTarget, false ); - - } - - } else { - - state.bindFramebuffer( 36160, renderTargetProperties.__webglFramebuffer ); - renderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer(); - setupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer, renderTarget, false ); - - } - - } - - state.bindFramebuffer( 36160, null ); - - } - - // Set up GL resources for the render target - function setupRenderTarget( renderTarget ) { - - const texture = renderTarget.texture; - - const renderTargetProperties = properties.get( renderTarget ); - const textureProperties = properties.get( texture ); - - renderTarget.addEventListener( 'dispose', onRenderTargetDispose ); - - if ( renderTarget.isWebGLMultipleRenderTargets !== true ) { - - textureProperties.__webglTexture = _gl.createTexture(); - textureProperties.__version = texture.version; - info.memory.textures ++; - - } - - const isCube = ( renderTarget.isWebGLCubeRenderTarget === true ); - const isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true ); - const isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true ); - const isRenderTarget3D = texture.isDataTexture3D || texture.isDataTexture2DArray; - const supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2; - - // Handles WebGL2 RGBFormat fallback - #18858 - - if ( isWebGL2 && texture.format === RGBFormat && ( texture.type === FloatType || texture.type === HalfFloatType ) ) { - - texture.format = RGBAFormat; - - console.warn( 'THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.' ); - - } - - // Setup framebuffer - - if ( isCube ) { - - renderTargetProperties.__webglFramebuffer = []; - - for ( let i = 0; i < 6; i ++ ) { - - renderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer(); - - } - - } else { - - renderTargetProperties.__webglFramebuffer = _gl.createFramebuffer(); - - if ( isMultipleRenderTargets ) { - - if ( capabilities.drawBuffers ) { - - const textures = renderTarget.texture; - - for ( let i = 0, il = textures.length; i < il; i ++ ) { - - const attachmentProperties = properties.get( textures[ i ] ); - - if ( attachmentProperties.__webglTexture === undefined ) { - - attachmentProperties.__webglTexture = _gl.createTexture(); - - info.memory.textures ++; - - } - - } - - } else { - - console.warn( 'THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.' ); - - } - - } else if ( isMultisample ) { - - if ( isWebGL2 ) { - - renderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer(); - renderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer(); - - _gl.bindRenderbuffer( 36161, renderTargetProperties.__webglColorRenderbuffer ); - - const glFormat = utils.convert( texture.format ); - const glType = utils.convert( texture.type ); - const glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType ); - const samples = getRenderTargetSamples( renderTarget ); - _gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height ); - - state.bindFramebuffer( 36160, renderTargetProperties.__webglMultisampledFramebuffer ); - _gl.framebufferRenderbuffer( 36160, 36064, 36161, renderTargetProperties.__webglColorRenderbuffer ); - _gl.bindRenderbuffer( 36161, null ); - - if ( renderTarget.depthBuffer ) { - - renderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer(); - setupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true ); - - } - - state.bindFramebuffer( 36160, null ); - - - } else { - - console.warn( 'THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' ); - - } - - } - - } - - // Setup color buffer - - if ( isCube ) { - - state.bindTexture( 34067, textureProperties.__webglTexture ); - setTextureParameters( 34067, texture, supportsMips ); - - for ( let i = 0; i < 6; i ++ ) { - - setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, 36064, 34069 + i ); - - } - - if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) { - - generateMipmap( 34067, texture, renderTarget.width, renderTarget.height ); - - } - - state.bindTexture( 34067, null ); - - } else if ( isMultipleRenderTargets ) { - - const textures = renderTarget.texture; - - for ( let i = 0, il = textures.length; i < il; i ++ ) { - - const attachment = textures[ i ]; - const attachmentProperties = properties.get( attachment ); - - state.bindTexture( 3553, attachmentProperties.__webglTexture ); - setTextureParameters( 3553, attachment, supportsMips ); - setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, 36064 + i, 3553 ); - - if ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) { - - generateMipmap( 3553, attachment, renderTarget.width, renderTarget.height ); - - } - - } - - state.bindTexture( 3553, null ); - - } else { - - let glTextureType = 3553; - - if ( isRenderTarget3D ) { - - // Render targets containing layers, i.e: Texture 3D and 2d arrays - - if ( isWebGL2 ) { - - const isTexture3D = texture.isDataTexture3D; - glTextureType = isTexture3D ? 32879 : 35866; - - } else { - - console.warn( 'THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.' ); - - } - - } - - state.bindTexture( glTextureType, textureProperties.__webglTexture ); - setTextureParameters( glTextureType, texture, supportsMips ); - setupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, 36064, glTextureType ); - - if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) { - - generateMipmap( glTextureType, texture, renderTarget.width, renderTarget.height, renderTarget.depth ); - - } - - state.bindTexture( glTextureType, null ); - - } - - // Setup depth and stencil buffers - - if ( renderTarget.depthBuffer ) { - - setupDepthRenderbuffer( renderTarget ); - - } - - } - - function updateRenderTargetMipmap( renderTarget ) { - - const supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2; - - const textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [ renderTarget.texture ]; - - for ( let i = 0, il = textures.length; i < il; i ++ ) { - - const texture = textures[ i ]; - - if ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) { - - const target = renderTarget.isWebGLCubeRenderTarget ? 34067 : 3553; - const webglTexture = properties.get( texture ).__webglTexture; - - state.bindTexture( target, webglTexture ); - generateMipmap( target, texture, renderTarget.width, renderTarget.height ); - state.bindTexture( target, null ); - - } - - } - - } - - function updateMultisampleRenderTarget( renderTarget ) { - - if ( renderTarget.isWebGLMultisampleRenderTarget ) { - - if ( isWebGL2 ) { - - const width = renderTarget.width; - const height = renderTarget.height; - let mask = 16384; - - if ( renderTarget.depthBuffer ) mask |= 256; - if ( renderTarget.stencilBuffer ) mask |= 1024; - - const renderTargetProperties = properties.get( renderTarget ); - - state.bindFramebuffer( 36008, renderTargetProperties.__webglMultisampledFramebuffer ); - state.bindFramebuffer( 36009, renderTargetProperties.__webglFramebuffer ); - - _gl.blitFramebuffer( 0, 0, width, height, 0, 0, width, height, mask, 9728 ); - - state.bindFramebuffer( 36008, null ); - state.bindFramebuffer( 36009, renderTargetProperties.__webglMultisampledFramebuffer ); - - } else { - - console.warn( 'THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' ); - - } - - } - - } - - function getRenderTargetSamples( renderTarget ) { - - return ( isWebGL2 && renderTarget.isWebGLMultisampleRenderTarget ) ? - Math.min( maxSamples, renderTarget.samples ) : 0; - - } - - function updateVideoTexture( texture ) { - - const frame = info.render.frame; - - // Check the last frame we updated the VideoTexture - - if ( _videoTextures.get( texture ) !== frame ) { - - _videoTextures.set( texture, frame ); - texture.update(); - - } - - } - - // backwards compatibility - - let warnedTexture2D = false; - let warnedTextureCube = false; - - function safeSetTexture2D( texture, slot ) { - - if ( texture && texture.isWebGLRenderTarget ) { - - if ( warnedTexture2D === false ) { - - console.warn( 'THREE.WebGLTextures.safeSetTexture2D: don\'t use render targets as textures. Use their .texture property instead.' ); - warnedTexture2D = true; - - } - - texture = texture.texture; - - } - - setTexture2D( texture, slot ); - - } - - function safeSetTextureCube( texture, slot ) { - - if ( texture && texture.isWebGLCubeRenderTarget ) { - - if ( warnedTextureCube === false ) { - - console.warn( 'THREE.WebGLTextures.safeSetTextureCube: don\'t use cube render targets as textures. Use their .texture property instead.' ); - warnedTextureCube = true; - - } - - texture = texture.texture; - - } - - - setTextureCube( texture, slot ); - - } - - // - - this.allocateTextureUnit = allocateTextureUnit; - this.resetTextureUnits = resetTextureUnits; - - this.setTexture2D = setTexture2D; - this.setTexture2DArray = setTexture2DArray; - this.setTexture3D = setTexture3D; - this.setTextureCube = setTextureCube; - this.setupRenderTarget = setupRenderTarget; - this.updateRenderTargetMipmap = updateRenderTargetMipmap; - this.updateMultisampleRenderTarget = updateMultisampleRenderTarget; - - this.safeSetTexture2D = safeSetTexture2D; - this.safeSetTextureCube = safeSetTextureCube; - -} - -function WebGLUtils( gl, extensions, capabilities ) { - - const isWebGL2 = capabilities.isWebGL2; - - function convert( p ) { - - let extension; - - if ( p === UnsignedByteType ) return 5121; - if ( p === UnsignedShort4444Type ) return 32819; - if ( p === UnsignedShort5551Type ) return 32820; - if ( p === UnsignedShort565Type ) return 33635; - - if ( p === ByteType ) return 5120; - if ( p === ShortType ) return 5122; - if ( p === UnsignedShortType ) return 5123; - if ( p === IntType ) return 5124; - if ( p === UnsignedIntType ) return 5125; - if ( p === FloatType ) return 5126; - - if ( p === HalfFloatType ) { - - if ( isWebGL2 ) return 5131; - - extension = extensions.get( 'OES_texture_half_float' ); - - if ( extension !== null ) { - - return extension.HALF_FLOAT_OES; - - } else { - - return null; - - } - - } - - if ( p === AlphaFormat ) return 6406; - if ( p === RGBFormat ) return 6407; - if ( p === RGBAFormat ) return 6408; - if ( p === LuminanceFormat ) return 6409; - if ( p === LuminanceAlphaFormat ) return 6410; - if ( p === DepthFormat ) return 6402; - if ( p === DepthStencilFormat ) return 34041; - if ( p === RedFormat ) return 6403; - - // WebGL2 formats. - - if ( p === RedIntegerFormat ) return 36244; - if ( p === RGFormat ) return 33319; - if ( p === RGIntegerFormat ) return 33320; - if ( p === RGBIntegerFormat ) return 36248; - if ( p === RGBAIntegerFormat ) return 36249; - - if ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || - p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) { - - extension = extensions.get( 'WEBGL_compressed_texture_s3tc' ); - - if ( extension !== null ) { - - if ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT; - if ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT; - if ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT; - if ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT; - - } else { - - return null; - - } - - } - - if ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || - p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) { - - extension = extensions.get( 'WEBGL_compressed_texture_pvrtc' ); - - if ( extension !== null ) { - - if ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG; - if ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG; - if ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG; - if ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG; - - } else { - - return null; - - } - - } - - if ( p === RGB_ETC1_Format ) { - - extension = extensions.get( 'WEBGL_compressed_texture_etc1' ); - - if ( extension !== null ) { - - return extension.COMPRESSED_RGB_ETC1_WEBGL; - - } else { - - return null; - - } - - } - - if ( p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format ) { - - extension = extensions.get( 'WEBGL_compressed_texture_etc' ); - - if ( extension !== null ) { - - if ( p === RGB_ETC2_Format ) return extension.COMPRESSED_RGB8_ETC2; - if ( p === RGBA_ETC2_EAC_Format ) return extension.COMPRESSED_RGBA8_ETC2_EAC; - - } - - } - - if ( p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format || - p === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format || - p === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format || - p === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format || - p === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format || - p === SRGB8_ALPHA8_ASTC_4x4_Format || p === SRGB8_ALPHA8_ASTC_5x4_Format || p === SRGB8_ALPHA8_ASTC_5x5_Format || - p === SRGB8_ALPHA8_ASTC_6x5_Format || p === SRGB8_ALPHA8_ASTC_6x6_Format || p === SRGB8_ALPHA8_ASTC_8x5_Format || - p === SRGB8_ALPHA8_ASTC_8x6_Format || p === SRGB8_ALPHA8_ASTC_8x8_Format || p === SRGB8_ALPHA8_ASTC_10x5_Format || - p === SRGB8_ALPHA8_ASTC_10x6_Format || p === SRGB8_ALPHA8_ASTC_10x8_Format || p === SRGB8_ALPHA8_ASTC_10x10_Format || - p === SRGB8_ALPHA8_ASTC_12x10_Format || p === SRGB8_ALPHA8_ASTC_12x12_Format ) { - - extension = extensions.get( 'WEBGL_compressed_texture_astc' ); - - if ( extension !== null ) { - - // TODO Complete? - - return p; - - } else { - - return null; - - } - - } - - if ( p === RGBA_BPTC_Format ) { - - extension = extensions.get( 'EXT_texture_compression_bptc' ); - - if ( extension !== null ) { - - // TODO Complete? - - return p; - - } else { - - return null; - - } - - } - - if ( p === UnsignedInt248Type ) { - - if ( isWebGL2 ) return 34042; - - extension = extensions.get( 'WEBGL_depth_texture' ); - - if ( extension !== null ) { - - return extension.UNSIGNED_INT_24_8_WEBGL; - - } else { - - return null; - - } - - } - - } - - return { convert: convert }; - -} - -class ArrayCamera extends PerspectiveCamera { - - constructor( array = [] ) { - - super(); - - this.cameras = array; - - } - -} - -ArrayCamera.prototype.isArrayCamera = true; - -class Group extends Object3D { - - constructor() { - - super(); - - this.type = 'Group'; - - } - -} - -Group.prototype.isGroup = true; - -const _moveEvent = { type: 'move' }; - -class WebXRController { - - constructor() { - - this._targetRay = null; - this._grip = null; - this._hand = null; - - } - - getHandSpace() { - - if ( this._hand === null ) { - - this._hand = new Group(); - this._hand.matrixAutoUpdate = false; - this._hand.visible = false; - - this._hand.joints = {}; - this._hand.inputState = { pinching: false }; - - } - - return this._hand; - - } - - getTargetRaySpace() { - - if ( this._targetRay === null ) { - - this._targetRay = new Group(); - this._targetRay.matrixAutoUpdate = false; - this._targetRay.visible = false; - this._targetRay.hasLinearVelocity = false; - this._targetRay.linearVelocity = new Vector3(); - this._targetRay.hasAngularVelocity = false; - this._targetRay.angularVelocity = new Vector3(); - - } - - return this._targetRay; - - } - - getGripSpace() { - - if ( this._grip === null ) { - - this._grip = new Group(); - this._grip.matrixAutoUpdate = false; - this._grip.visible = false; - this._grip.hasLinearVelocity = false; - this._grip.linearVelocity = new Vector3(); - this._grip.hasAngularVelocity = false; - this._grip.angularVelocity = new Vector3(); - - } - - return this._grip; - - } - - dispatchEvent( event ) { - - if ( this._targetRay !== null ) { - - this._targetRay.dispatchEvent( event ); - - } - - if ( this._grip !== null ) { - - this._grip.dispatchEvent( event ); - - } - - if ( this._hand !== null ) { - - this._hand.dispatchEvent( event ); - - } - - return this; - - } - - disconnect( inputSource ) { - - this.dispatchEvent( { type: 'disconnected', data: inputSource } ); - - if ( this._targetRay !== null ) { - - this._targetRay.visible = false; - - } - - if ( this._grip !== null ) { - - this._grip.visible = false; - - } - - if ( this._hand !== null ) { - - this._hand.visible = false; - - } - - return this; - - } - - update( inputSource, frame, referenceSpace ) { - - let inputPose = null; - let gripPose = null; - let handPose = null; - - const targetRay = this._targetRay; - const grip = this._grip; - const hand = this._hand; - - if ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) { - - if ( targetRay !== null ) { - - inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace ); - - if ( inputPose !== null ) { - - targetRay.matrix.fromArray( inputPose.transform.matrix ); - targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale ); - - if ( inputPose.linearVelocity ) { - - targetRay.hasLinearVelocity = true; - targetRay.linearVelocity.copy( inputPose.linearVelocity ); - - } else { - - targetRay.hasLinearVelocity = false; - - } - - if ( inputPose.angularVelocity ) { - - targetRay.hasAngularVelocity = true; - targetRay.angularVelocity.copy( inputPose.angularVelocity ); - - } else { - - targetRay.hasAngularVelocity = false; - - } - - this.dispatchEvent( _moveEvent ); - - } - - } - - if ( hand && inputSource.hand ) { - - handPose = true; - - for ( const inputjoint of inputSource.hand.values() ) { - - // Update the joints groups with the XRJoint poses - const jointPose = frame.getJointPose( inputjoint, referenceSpace ); - - if ( hand.joints[ inputjoint.jointName ] === undefined ) { - - // The transform of this joint will be updated with the joint pose on each frame - const joint = new Group(); - joint.matrixAutoUpdate = false; - joint.visible = false; - hand.joints[ inputjoint.jointName ] = joint; - // ?? - hand.add( joint ); - - } - - const joint = hand.joints[ inputjoint.jointName ]; - - if ( jointPose !== null ) { - - joint.matrix.fromArray( jointPose.transform.matrix ); - joint.matrix.decompose( joint.position, joint.rotation, joint.scale ); - joint.jointRadius = jointPose.radius; - - } - - joint.visible = jointPose !== null; - - } - - // Custom events - - // Check pinchz - const indexTip = hand.joints[ 'index-finger-tip' ]; - const thumbTip = hand.joints[ 'thumb-tip' ]; - const distance = indexTip.position.distanceTo( thumbTip.position ); - - const distanceToPinch = 0.02; - const threshold = 0.005; - - if ( hand.inputState.pinching && distance > distanceToPinch + threshold ) { - - hand.inputState.pinching = false; - this.dispatchEvent( { - type: 'pinchend', - handedness: inputSource.handedness, - target: this - } ); - - } else if ( ! hand.inputState.pinching && distance <= distanceToPinch - threshold ) { - - hand.inputState.pinching = true; - this.dispatchEvent( { - type: 'pinchstart', - handedness: inputSource.handedness, - target: this - } ); - - } - - } else { - - if ( grip !== null && inputSource.gripSpace ) { - - gripPose = frame.getPose( inputSource.gripSpace, referenceSpace ); - - if ( gripPose !== null ) { - - grip.matrix.fromArray( gripPose.transform.matrix ); - grip.matrix.decompose( grip.position, grip.rotation, grip.scale ); - - if ( gripPose.linearVelocity ) { - - grip.hasLinearVelocity = true; - grip.linearVelocity.copy( gripPose.linearVelocity ); - - } else { - - grip.hasLinearVelocity = false; - - } - - if ( gripPose.angularVelocity ) { - - grip.hasAngularVelocity = true; - grip.angularVelocity.copy( gripPose.angularVelocity ); - - } else { - - grip.hasAngularVelocity = false; - - } - - } - - } - - } - - } - - if ( targetRay !== null ) { - - targetRay.visible = ( inputPose !== null ); - - } - - if ( grip !== null ) { - - grip.visible = ( gripPose !== null ); - - } - - if ( hand !== null ) { - - hand.visible = ( handPose !== null ); - - } - - return this; - - } - -} - -class WebXRManager extends EventDispatcher { - - constructor( renderer, gl ) { - - super(); - - const scope = this; - const state = renderer.state; - - let session = null; - let framebufferScaleFactor = 1.0; - - let referenceSpace = null; - let referenceSpaceType = 'local-floor'; - - let pose = null; - let glBinding = null; - let glFramebuffer = null; - let glProjLayer = null; - - const controllers = []; - const inputSourcesMap = new Map(); - - // - - const cameraL = new PerspectiveCamera(); - cameraL.layers.enable( 1 ); - cameraL.viewport = new Vector4(); - - const cameraR = new PerspectiveCamera(); - cameraR.layers.enable( 2 ); - cameraR.viewport = new Vector4(); - - const cameras = [ cameraL, cameraR ]; - - const cameraVR = new ArrayCamera(); - cameraVR.layers.enable( 1 ); - cameraVR.layers.enable( 2 ); - - let _currentDepthNear = null; - let _currentDepthFar = null; - - // - - this.cameraAutoUpdate = true; - this.enabled = false; - - this.isPresenting = false; - - this.getController = function ( index ) { - - let controller = controllers[ index ]; - - if ( controller === undefined ) { - - controller = new WebXRController(); - controllers[ index ] = controller; - - } - - return controller.getTargetRaySpace(); - - }; - - this.getControllerGrip = function ( index ) { - - let controller = controllers[ index ]; - - if ( controller === undefined ) { - - controller = new WebXRController(); - controllers[ index ] = controller; - - } - - return controller.getGripSpace(); - - }; - - this.getHand = function ( index ) { - - let controller = controllers[ index ]; - - if ( controller === undefined ) { - - controller = new WebXRController(); - controllers[ index ] = controller; - - } - - return controller.getHandSpace(); - - }; - - // - - function onSessionEvent( event ) { - - const controller = inputSourcesMap.get( event.inputSource ); - - if ( controller ) { - - controller.dispatchEvent( { type: event.type, data: event.inputSource } ); - - } - - } - - function onSessionEnd() { - - inputSourcesMap.forEach( function ( controller, inputSource ) { - - controller.disconnect( inputSource ); - - } ); - - inputSourcesMap.clear(); - - _currentDepthNear = null; - _currentDepthFar = null; - - // restore framebuffer/rendering state - - state.bindXRFramebuffer( null ); - renderer.setRenderTarget( renderer.getRenderTarget() ); - - // - - animation.stop(); - - scope.isPresenting = false; - - scope.dispatchEvent( { type: 'sessionend' } ); - - } - - this.setFramebufferScaleFactor = function ( value ) { - - framebufferScaleFactor = value; - - if ( scope.isPresenting === true ) { - - console.warn( 'THREE.WebXRManager: Cannot change framebuffer scale while presenting.' ); - - } - - }; - - this.setReferenceSpaceType = function ( value ) { - - referenceSpaceType = value; - - if ( scope.isPresenting === true ) { - - console.warn( 'THREE.WebXRManager: Cannot change reference space type while presenting.' ); - - } - - }; - - this.getReferenceSpace = function () { - - return referenceSpace; - - }; - - this.getSession = function () { - - return session; - - }; - - this.setSession = async function ( value ) { - - session = value; - - if ( session !== null ) { - - session.addEventListener( 'select', onSessionEvent ); - session.addEventListener( 'selectstart', onSessionEvent ); - session.addEventListener( 'selectend', onSessionEvent ); - session.addEventListener( 'squeeze', onSessionEvent ); - session.addEventListener( 'squeezestart', onSessionEvent ); - session.addEventListener( 'squeezeend', onSessionEvent ); - session.addEventListener( 'end', onSessionEnd ); - session.addEventListener( 'inputsourceschange', onInputSourcesChange ); - - const attributes = gl.getContextAttributes(); - - if ( attributes.xrCompatible !== true ) { - - await gl.makeXRCompatible(); - - } - - if ( session.renderState.layers === undefined ) { - - const layerInit = { - antialias: attributes.antialias, - alpha: attributes.alpha, - depth: attributes.depth, - stencil: attributes.stencil, - framebufferScaleFactor: framebufferScaleFactor - }; - - // eslint-disable-next-line no-undef - const baseLayer = new XRWebGLLayer( session, gl, layerInit ); - - session.updateRenderState( { baseLayer: baseLayer } ); - - } else { - - let depthFormat = 0; - - if ( attributes.depth ) { - - depthFormat = attributes.stencil ? 34041 : 6402; - - } - - const projectionlayerInit = { - colorFormat: attributes.alpha ? 6408 : 6407, - depthFormat: depthFormat, - scaleFactor: framebufferScaleFactor - }; - - // eslint-disable-next-line no-undef - glBinding = new XRWebGLBinding( session, gl ); - - glProjLayer = glBinding.createProjectionLayer( projectionlayerInit ); - - glFramebuffer = gl.createFramebuffer(); - - session.updateRenderState( { layers: [ glProjLayer ] } ); - - } - - referenceSpace = await session.requestReferenceSpace( referenceSpaceType ); - - animation.setContext( session ); - animation.start(); - - scope.isPresenting = true; - - scope.dispatchEvent( { type: 'sessionstart' } ); - - } - - }; - - function onInputSourcesChange( event ) { - - const inputSources = session.inputSources; - - // Assign inputSources to available controllers - - for ( let i = 0; i < controllers.length; i ++ ) { - - inputSourcesMap.set( inputSources[ i ], controllers[ i ] ); - - } - - // Notify disconnected - - for ( let i = 0; i < event.removed.length; i ++ ) { - - const inputSource = event.removed[ i ]; - const controller = inputSourcesMap.get( inputSource ); - - if ( controller ) { - - controller.dispatchEvent( { type: 'disconnected', data: inputSource } ); - inputSourcesMap.delete( inputSource ); - - } - - } - - // Notify connected - - for ( let i = 0; i < event.added.length; i ++ ) { - - const inputSource = event.added[ i ]; - const controller = inputSourcesMap.get( inputSource ); - - if ( controller ) { - - controller.dispatchEvent( { type: 'connected', data: inputSource } ); - - } - - } - - } - - // - - const cameraLPos = new Vector3(); - const cameraRPos = new Vector3(); - - /** - * Assumes 2 cameras that are parallel and share an X-axis, and that - * the cameras' projection and world matrices have already been set. - * And that near and far planes are identical for both cameras. - * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765 - */ - function setProjectionFromUnion( camera, cameraL, cameraR ) { - - cameraLPos.setFromMatrixPosition( cameraL.matrixWorld ); - cameraRPos.setFromMatrixPosition( cameraR.matrixWorld ); - - const ipd = cameraLPos.distanceTo( cameraRPos ); - - const projL = cameraL.projectionMatrix.elements; - const projR = cameraR.projectionMatrix.elements; - - // VR systems will have identical far and near planes, and - // most likely identical top and bottom frustum extents. - // Use the left camera for these values. - const near = projL[ 14 ] / ( projL[ 10 ] - 1 ); - const far = projL[ 14 ] / ( projL[ 10 ] + 1 ); - const topFov = ( projL[ 9 ] + 1 ) / projL[ 5 ]; - const bottomFov = ( projL[ 9 ] - 1 ) / projL[ 5 ]; - - const leftFov = ( projL[ 8 ] - 1 ) / projL[ 0 ]; - const rightFov = ( projR[ 8 ] + 1 ) / projR[ 0 ]; - const left = near * leftFov; - const right = near * rightFov; - - // Calculate the new camera's position offset from the - // left camera. xOffset should be roughly half `ipd`. - const zOffset = ipd / ( - leftFov + rightFov ); - const xOffset = zOffset * - leftFov; - - // TODO: Better way to apply this offset? - cameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale ); - camera.translateX( xOffset ); - camera.translateZ( zOffset ); - camera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale ); - camera.matrixWorldInverse.copy( camera.matrixWorld ).invert(); - - // Find the union of the frustum values of the cameras and scale - // the values so that the near plane's position does not change in world space, - // although must now be relative to the new union camera. - const near2 = near + zOffset; - const far2 = far + zOffset; - const left2 = left - xOffset; - const right2 = right + ( ipd - xOffset ); - const top2 = topFov * far / far2 * near2; - const bottom2 = bottomFov * far / far2 * near2; - - camera.projectionMatrix.makePerspective( left2, right2, top2, bottom2, near2, far2 ); - - } - - function updateCamera( camera, parent ) { - - if ( parent === null ) { - - camera.matrixWorld.copy( camera.matrix ); - - } else { - - camera.matrixWorld.multiplyMatrices( parent.matrixWorld, camera.matrix ); - - } - - camera.matrixWorldInverse.copy( camera.matrixWorld ).invert(); - - } - - this.updateCamera = function ( camera ) { - - if ( session === null ) return; - - cameraVR.near = cameraR.near = cameraL.near = camera.near; - cameraVR.far = cameraR.far = cameraL.far = camera.far; - - if ( _currentDepthNear !== cameraVR.near || _currentDepthFar !== cameraVR.far ) { - - // Note that the new renderState won't apply until the next frame. See #18320 - - session.updateRenderState( { - depthNear: cameraVR.near, - depthFar: cameraVR.far - } ); - - _currentDepthNear = cameraVR.near; - _currentDepthFar = cameraVR.far; - - } - - const parent = camera.parent; - const cameras = cameraVR.cameras; - - updateCamera( cameraVR, parent ); - - for ( let i = 0; i < cameras.length; i ++ ) { - - updateCamera( cameras[ i ], parent ); - - } - - cameraVR.matrixWorld.decompose( cameraVR.position, cameraVR.quaternion, cameraVR.scale ); - - // update user camera and its children - - camera.position.copy( cameraVR.position ); - camera.quaternion.copy( cameraVR.quaternion ); - camera.scale.copy( cameraVR.scale ); - camera.matrix.copy( cameraVR.matrix ); - camera.matrixWorld.copy( cameraVR.matrixWorld ); - - const children = camera.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - children[ i ].updateMatrixWorld( true ); - - } - - // update projection matrix for proper view frustum culling - - if ( cameras.length === 2 ) { - - setProjectionFromUnion( cameraVR, cameraL, cameraR ); - - } else { - - // assume single camera setup (AR) - - cameraVR.projectionMatrix.copy( cameraL.projectionMatrix ); - - } - - }; - - this.getCamera = function () { - - return cameraVR; - - }; - - // Animation Loop - - let onAnimationFrameCallback = null; - - function onAnimationFrame( time, frame ) { - - pose = frame.getViewerPose( referenceSpace ); - - if ( pose !== null ) { - - const views = pose.views; - - const baseLayer = session.renderState.baseLayer; - - if ( session.renderState.layers === undefined ) { - - state.bindXRFramebuffer( baseLayer.framebuffer ); - - } - - let cameraVRNeedsUpdate = false; - - // check if it's necessary to rebuild cameraVR's camera list - - if ( views.length !== cameraVR.cameras.length ) { - - cameraVR.cameras.length = 0; - - cameraVRNeedsUpdate = true; - - - } - - for ( let i = 0; i < views.length; i ++ ) { - - const view = views[ i ]; - - let viewport = null; - - if ( session.renderState.layers === undefined ) { - - viewport = baseLayer.getViewport( view ); - - } else { - - const glSubImage = glBinding.getViewSubImage( glProjLayer, view ); - - state.bindXRFramebuffer( glFramebuffer ); - - gl.framebufferTexture2D( 36160, 36064, 3553, glSubImage.colorTexture, 0 ); - - if ( glSubImage.depthStencilTexture !== undefined ) { - - gl.framebufferTexture2D( 36160, 36096, 3553, glSubImage.depthStencilTexture, 0 ); - - } - - viewport = glSubImage.viewport; - - } - - const camera = cameras[ i ]; - - camera.matrix.fromArray( view.transform.matrix ); - - camera.projectionMatrix.fromArray( view.projectionMatrix ); - - camera.viewport.set( viewport.x, viewport.y, viewport.width, viewport.height ); - - if ( i === 0 ) { - - cameraVR.matrix.copy( camera.matrix ); - - } - - if ( cameraVRNeedsUpdate === true ) { - - cameraVR.cameras.push( camera ); - - } - - } - - } - - // - - const inputSources = session.inputSources; - - for ( let i = 0; i < controllers.length; i ++ ) { - - const controller = controllers[ i ]; - const inputSource = inputSources[ i ]; - - controller.update( inputSource, frame, referenceSpace ); - - } - - if ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame ); - - } - - const animation = new WebGLAnimation(); - animation.setAnimationLoop( onAnimationFrame ); - - this.setAnimationLoop = function ( callback ) { - - onAnimationFrameCallback = callback; - - }; - - this.dispose = function () {}; - - } - -} - -function WebGLMaterials( properties ) { - - function refreshFogUniforms( uniforms, fog ) { - - uniforms.fogColor.value.copy( fog.color ); - - if ( fog.isFog ) { - - uniforms.fogNear.value = fog.near; - uniforms.fogFar.value = fog.far; - - } else if ( fog.isFogExp2 ) { - - uniforms.fogDensity.value = fog.density; - - } - - } - - function refreshMaterialUniforms( uniforms, material, pixelRatio, height, transmissionRenderTarget ) { - - if ( material.isMeshBasicMaterial ) { - - refreshUniformsCommon( uniforms, material ); - - } else if ( material.isMeshLambertMaterial ) { - - refreshUniformsCommon( uniforms, material ); - refreshUniformsLambert( uniforms, material ); - - } else if ( material.isMeshToonMaterial ) { - - refreshUniformsCommon( uniforms, material ); - refreshUniformsToon( uniforms, material ); - - } else if ( material.isMeshPhongMaterial ) { - - refreshUniformsCommon( uniforms, material ); - refreshUniformsPhong( uniforms, material ); - - } else if ( material.isMeshStandardMaterial ) { - - refreshUniformsCommon( uniforms, material ); - - if ( material.isMeshPhysicalMaterial ) { - - refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ); - - } else { - - refreshUniformsStandard( uniforms, material ); - - } - - } else if ( material.isMeshMatcapMaterial ) { - - refreshUniformsCommon( uniforms, material ); - refreshUniformsMatcap( uniforms, material ); - - } else if ( material.isMeshDepthMaterial ) { - - refreshUniformsCommon( uniforms, material ); - refreshUniformsDepth( uniforms, material ); - - } else if ( material.isMeshDistanceMaterial ) { - - refreshUniformsCommon( uniforms, material ); - refreshUniformsDistance( uniforms, material ); - - } else if ( material.isMeshNormalMaterial ) { - - refreshUniformsCommon( uniforms, material ); - refreshUniformsNormal( uniforms, material ); - - } else if ( material.isLineBasicMaterial ) { - - refreshUniformsLine( uniforms, material ); - - if ( material.isLineDashedMaterial ) { - - refreshUniformsDash( uniforms, material ); - - } - - } else if ( material.isPointsMaterial ) { - - refreshUniformsPoints( uniforms, material, pixelRatio, height ); - - } else if ( material.isSpriteMaterial ) { - - refreshUniformsSprites( uniforms, material ); - - } else if ( material.isShadowMaterial ) { - - uniforms.color.value.copy( material.color ); - uniforms.opacity.value = material.opacity; - - } else if ( material.isShaderMaterial ) { - - material.uniformsNeedUpdate = false; // #15581 - - } - - } - - function refreshUniformsCommon( uniforms, material ) { - - uniforms.opacity.value = material.opacity; - - if ( material.color ) { - - uniforms.diffuse.value.copy( material.color ); - - } - - if ( material.emissive ) { - - uniforms.emissive.value.copy( material.emissive ).multiplyScalar( material.emissiveIntensity ); - - } - - if ( material.map ) { - - uniforms.map.value = material.map; - - } - - if ( material.alphaMap ) { - - uniforms.alphaMap.value = material.alphaMap; - - } - - if ( material.specularMap ) { - - uniforms.specularMap.value = material.specularMap; - - } - - const envMap = properties.get( material ).envMap; - - if ( envMap ) { - - uniforms.envMap.value = envMap; - - uniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap._needsFlipEnvMap ) ? - 1 : 1; - - uniforms.reflectivity.value = material.reflectivity; - uniforms.refractionRatio.value = material.refractionRatio; - - const maxMipLevel = properties.get( envMap ).__maxMipLevel; - - if ( maxMipLevel !== undefined ) { - - uniforms.maxMipLevel.value = maxMipLevel; - - } - - } - - if ( material.lightMap ) { - - uniforms.lightMap.value = material.lightMap; - uniforms.lightMapIntensity.value = material.lightMapIntensity; - - } - - if ( material.aoMap ) { - - uniforms.aoMap.value = material.aoMap; - uniforms.aoMapIntensity.value = material.aoMapIntensity; - - } - - // uv repeat and offset setting priorities - // 1. color map - // 2. specular map - // 3. displacementMap map - // 4. normal map - // 5. bump map - // 6. roughnessMap map - // 7. metalnessMap map - // 8. alphaMap map - // 9. emissiveMap map - // 10. clearcoat map - // 11. clearcoat normal map - // 12. clearcoat roughnessMap map - - let uvScaleMap; - - if ( material.map ) { - - uvScaleMap = material.map; - - } else if ( material.specularMap ) { - - uvScaleMap = material.specularMap; - - } else if ( material.displacementMap ) { - - uvScaleMap = material.displacementMap; - - } else if ( material.normalMap ) { - - uvScaleMap = material.normalMap; - - } else if ( material.bumpMap ) { - - uvScaleMap = material.bumpMap; - - } else if ( material.roughnessMap ) { - - uvScaleMap = material.roughnessMap; - - } else if ( material.metalnessMap ) { - - uvScaleMap = material.metalnessMap; - - } else if ( material.alphaMap ) { - - uvScaleMap = material.alphaMap; - - } else if ( material.emissiveMap ) { - - uvScaleMap = material.emissiveMap; - - } else if ( material.clearcoatMap ) { - - uvScaleMap = material.clearcoatMap; - - } else if ( material.clearcoatNormalMap ) { - - uvScaleMap = material.clearcoatNormalMap; - - } else if ( material.clearcoatRoughnessMap ) { - - uvScaleMap = material.clearcoatRoughnessMap; - - } - - if ( uvScaleMap !== undefined ) { - - // backwards compatibility - if ( uvScaleMap.isWebGLRenderTarget ) { - - uvScaleMap = uvScaleMap.texture; - - } - - if ( uvScaleMap.matrixAutoUpdate === true ) { - - uvScaleMap.updateMatrix(); - - } - - uniforms.uvTransform.value.copy( uvScaleMap.matrix ); - - } - - // uv repeat and offset setting priorities for uv2 - // 1. ao map - // 2. light map - - let uv2ScaleMap; - - if ( material.aoMap ) { - - uv2ScaleMap = material.aoMap; - - } else if ( material.lightMap ) { - - uv2ScaleMap = material.lightMap; - - } - - if ( uv2ScaleMap !== undefined ) { - - // backwards compatibility - if ( uv2ScaleMap.isWebGLRenderTarget ) { - - uv2ScaleMap = uv2ScaleMap.texture; - - } - - if ( uv2ScaleMap.matrixAutoUpdate === true ) { - - uv2ScaleMap.updateMatrix(); - - } - - uniforms.uv2Transform.value.copy( uv2ScaleMap.matrix ); - - } - - } - - function refreshUniformsLine( uniforms, material ) { - - uniforms.diffuse.value.copy( material.color ); - uniforms.opacity.value = material.opacity; - - } - - function refreshUniformsDash( uniforms, material ) { - - uniforms.dashSize.value = material.dashSize; - uniforms.totalSize.value = material.dashSize + material.gapSize; - uniforms.scale.value = material.scale; - - } - - function refreshUniformsPoints( uniforms, material, pixelRatio, height ) { - - uniforms.diffuse.value.copy( material.color ); - uniforms.opacity.value = material.opacity; - uniforms.size.value = material.size * pixelRatio; - uniforms.scale.value = height * 0.5; - - if ( material.map ) { - - uniforms.map.value = material.map; - - } - - if ( material.alphaMap ) { - - uniforms.alphaMap.value = material.alphaMap; - - } - - // uv repeat and offset setting priorities - // 1. color map - // 2. alpha map - - let uvScaleMap; - - if ( material.map ) { - - uvScaleMap = material.map; - - } else if ( material.alphaMap ) { - - uvScaleMap = material.alphaMap; - - } - - if ( uvScaleMap !== undefined ) { - - if ( uvScaleMap.matrixAutoUpdate === true ) { - - uvScaleMap.updateMatrix(); - - } - - uniforms.uvTransform.value.copy( uvScaleMap.matrix ); - - } - - } - - function refreshUniformsSprites( uniforms, material ) { - - uniforms.diffuse.value.copy( material.color ); - uniforms.opacity.value = material.opacity; - uniforms.rotation.value = material.rotation; - - if ( material.map ) { - - uniforms.map.value = material.map; - - } - - if ( material.alphaMap ) { - - uniforms.alphaMap.value = material.alphaMap; - - } - - // uv repeat and offset setting priorities - // 1. color map - // 2. alpha map - - let uvScaleMap; - - if ( material.map ) { - - uvScaleMap = material.map; - - } else if ( material.alphaMap ) { - - uvScaleMap = material.alphaMap; - - } - - if ( uvScaleMap !== undefined ) { - - if ( uvScaleMap.matrixAutoUpdate === true ) { - - uvScaleMap.updateMatrix(); - - } - - uniforms.uvTransform.value.copy( uvScaleMap.matrix ); - - } - - } - - function refreshUniformsLambert( uniforms, material ) { - - if ( material.emissiveMap ) { - - uniforms.emissiveMap.value = material.emissiveMap; - - } - - } - - function refreshUniformsPhong( uniforms, material ) { - - uniforms.specular.value.copy( material.specular ); - uniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 ) - - if ( material.emissiveMap ) { - - uniforms.emissiveMap.value = material.emissiveMap; - - } - - if ( material.bumpMap ) { - - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if ( material.side === BackSide ) uniforms.bumpScale.value *= - 1; - - } - - if ( material.normalMap ) { - - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy( material.normalScale ); - if ( material.side === BackSide ) uniforms.normalScale.value.negate(); - - } - - if ( material.displacementMap ) { - - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - - } - - } - - function refreshUniformsToon( uniforms, material ) { - - if ( material.gradientMap ) { - - uniforms.gradientMap.value = material.gradientMap; - - } - - if ( material.emissiveMap ) { - - uniforms.emissiveMap.value = material.emissiveMap; - - } - - if ( material.bumpMap ) { - - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if ( material.side === BackSide ) uniforms.bumpScale.value *= - 1; - - } - - if ( material.normalMap ) { - - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy( material.normalScale ); - if ( material.side === BackSide ) uniforms.normalScale.value.negate(); - - } - - if ( material.displacementMap ) { - - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - - } - - } - - function refreshUniformsStandard( uniforms, material ) { - - uniforms.roughness.value = material.roughness; - uniforms.metalness.value = material.metalness; - - if ( material.roughnessMap ) { - - uniforms.roughnessMap.value = material.roughnessMap; - - } - - if ( material.metalnessMap ) { - - uniforms.metalnessMap.value = material.metalnessMap; - - } - - if ( material.emissiveMap ) { - - uniforms.emissiveMap.value = material.emissiveMap; - - } - - if ( material.bumpMap ) { - - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if ( material.side === BackSide ) uniforms.bumpScale.value *= - 1; - - } - - if ( material.normalMap ) { - - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy( material.normalScale ); - if ( material.side === BackSide ) uniforms.normalScale.value.negate(); - - } - - if ( material.displacementMap ) { - - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - - } - - const envMap = properties.get( material ).envMap; - - if ( envMap ) { - - //uniforms.envMap.value = material.envMap; // part of uniforms common - uniforms.envMapIntensity.value = material.envMapIntensity; - - } - - } - - function refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ) { - - refreshUniformsStandard( uniforms, material ); - - uniforms.reflectivity.value = material.reflectivity; // also part of uniforms common - - uniforms.clearcoat.value = material.clearcoat; - uniforms.clearcoatRoughness.value = material.clearcoatRoughness; - - if ( material.sheen ) uniforms.sheen.value.copy( material.sheen ); - - if ( material.clearcoatMap ) { - - uniforms.clearcoatMap.value = material.clearcoatMap; - - } - - if ( material.clearcoatRoughnessMap ) { - - uniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap; - - } - - if ( material.clearcoatNormalMap ) { - - uniforms.clearcoatNormalScale.value.copy( material.clearcoatNormalScale ); - uniforms.clearcoatNormalMap.value = material.clearcoatNormalMap; - - if ( material.side === BackSide ) { - - uniforms.clearcoatNormalScale.value.negate(); - - } - - } - - uniforms.transmission.value = material.transmission; - - if ( material.transmissionMap ) { - - uniforms.transmissionMap.value = material.transmissionMap; - - } - - if ( material.transmission > 0.0 ) { - - uniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture; - uniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height ); - - } - - uniforms.thickness.value = material.thickness; - - if ( material.thicknessMap ) { - - uniforms.thicknessMap.value = material.thicknessMap; - - } - - uniforms.attenuationDistance.value = material.attenuationDistance; - uniforms.attenuationColor.value.copy( material.attenuationColor ); - - } - - function refreshUniformsMatcap( uniforms, material ) { - - if ( material.matcap ) { - - uniforms.matcap.value = material.matcap; - - } - - if ( material.bumpMap ) { - - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if ( material.side === BackSide ) uniforms.bumpScale.value *= - 1; - - } - - if ( material.normalMap ) { - - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy( material.normalScale ); - if ( material.side === BackSide ) uniforms.normalScale.value.negate(); - - } - - if ( material.displacementMap ) { - - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - - } - - } - - function refreshUniformsDepth( uniforms, material ) { - - if ( material.displacementMap ) { - - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - - } - - } - - function refreshUniformsDistance( uniforms, material ) { - - if ( material.displacementMap ) { - - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - - } - - uniforms.referencePosition.value.copy( material.referencePosition ); - uniforms.nearDistance.value = material.nearDistance; - uniforms.farDistance.value = material.farDistance; - - } - - function refreshUniformsNormal( uniforms, material ) { - - if ( material.bumpMap ) { - - uniforms.bumpMap.value = material.bumpMap; - uniforms.bumpScale.value = material.bumpScale; - if ( material.side === BackSide ) uniforms.bumpScale.value *= - 1; - - } - - if ( material.normalMap ) { - - uniforms.normalMap.value = material.normalMap; - uniforms.normalScale.value.copy( material.normalScale ); - if ( material.side === BackSide ) uniforms.normalScale.value.negate(); - - } - - if ( material.displacementMap ) { - - uniforms.displacementMap.value = material.displacementMap; - uniforms.displacementScale.value = material.displacementScale; - uniforms.displacementBias.value = material.displacementBias; - - } - - } - - return { - refreshFogUniforms: refreshFogUniforms, - refreshMaterialUniforms: refreshMaterialUniforms - }; - -} - -function createCanvasElement() { - - const canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' ); - canvas.style.display = 'block'; - return canvas; - -} - -function WebGLRenderer( parameters = {} ) { - - const _canvas = parameters.canvas !== undefined ? parameters.canvas : createCanvasElement(), - _context = parameters.context !== undefined ? parameters.context : null, - - _alpha = parameters.alpha !== undefined ? parameters.alpha : false, - _depth = parameters.depth !== undefined ? parameters.depth : true, - _stencil = parameters.stencil !== undefined ? parameters.stencil : true, - _antialias = parameters.antialias !== undefined ? parameters.antialias : false, - _premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true, - _preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false, - _powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default', - _failIfMajorPerformanceCaveat = parameters.failIfMajorPerformanceCaveat !== undefined ? parameters.failIfMajorPerformanceCaveat : false; - - let currentRenderList = null; - let currentRenderState = null; - - // render() can be called from within a callback triggered by another render. - // We track this so that the nested render call gets its list and state isolated from the parent render call. - - const renderListStack = []; - const renderStateStack = []; - - // public properties - - this.domElement = _canvas; - - // Debug configuration container - this.debug = { - - /** - * Enables error checking and reporting when shader programs are being compiled - * @type {boolean} - */ - checkShaderErrors: true - }; - - // clearing - - this.autoClear = true; - this.autoClearColor = true; - this.autoClearDepth = true; - this.autoClearStencil = true; - - // scene graph - - this.sortObjects = true; - - // user-defined clipping - - this.clippingPlanes = []; - this.localClippingEnabled = false; - - // physically based shading - - this.gammaFactor = 2.0; // for backwards compatibility - this.outputEncoding = LinearEncoding; - - // physical lights - - this.physicallyCorrectLights = false; - - // tone mapping - - this.toneMapping = NoToneMapping; - this.toneMappingExposure = 1.0; - - // internal properties - - const _this = this; - - let _isContextLost = false; - - // internal state cache - - let _currentActiveCubeFace = 0; - let _currentActiveMipmapLevel = 0; - let _currentRenderTarget = null; - let _currentMaterialId = - 1; - - let _currentCamera = null; - - const _currentViewport = new Vector4(); - const _currentScissor = new Vector4(); - let _currentScissorTest = null; - - // - - let _width = _canvas.width; - let _height = _canvas.height; - - let _pixelRatio = 1; - let _opaqueSort = null; - let _transparentSort = null; - - const _viewport = new Vector4( 0, 0, _width, _height ); - const _scissor = new Vector4( 0, 0, _width, _height ); - let _scissorTest = false; - - // - - const _currentDrawBuffers = []; - - // frustum - - const _frustum = new Frustum(); - - // clipping - - let _clippingEnabled = false; - let _localClippingEnabled = false; - - // transmission - - let _transmissionRenderTarget = null; - - // camera matrices cache - - const _projScreenMatrix = new Matrix4(); - - const _vector3 = new Vector3(); - - const _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true }; - - function getTargetPixelRatio() { - - return _currentRenderTarget === null ? _pixelRatio : 1; - - } - - // initialize - - let _gl = _context; - - function getContext( contextNames, contextAttributes ) { - - for ( let i = 0; i < contextNames.length; i ++ ) { - - const contextName = contextNames[ i ]; - const context = _canvas.getContext( contextName, contextAttributes ); - if ( context !== null ) return context; - - } - - return null; - - } - - try { - - const contextAttributes = { - alpha: _alpha, - depth: _depth, - stencil: _stencil, - antialias: _antialias, - premultipliedAlpha: _premultipliedAlpha, - preserveDrawingBuffer: _preserveDrawingBuffer, - powerPreference: _powerPreference, - failIfMajorPerformanceCaveat: _failIfMajorPerformanceCaveat - }; - - // event listeners must be registered before WebGL context is created, see #12753 - - _canvas.addEventListener( 'webglcontextlost', onContextLost, false ); - _canvas.addEventListener( 'webglcontextrestored', onContextRestore, false ); - - if ( _gl === null ) { - - const contextNames = [ 'webgl2', 'webgl', 'experimental-webgl' ]; - - if ( _this.isWebGL1Renderer === true ) { - - contextNames.shift(); - - } - - _gl = getContext( contextNames, contextAttributes ); - - if ( _gl === null ) { - - if ( getContext( contextNames ) ) { - - throw new Error( 'Error creating WebGL context with your selected attributes.' ); - - } else { - - throw new Error( 'Error creating WebGL context.' ); - - } - - } - - } - - // Some experimental-webgl implementations do not have getShaderPrecisionFormat - - if ( _gl.getShaderPrecisionFormat === undefined ) { - - _gl.getShaderPrecisionFormat = function () { - - return { 'rangeMin': 1, 'rangeMax': 1, 'precision': 1 }; - - }; - - } - - } catch ( error ) { - - console.error( 'THREE.WebGLRenderer: ' + error.message ); - throw error; - - } - - let extensions, capabilities, state, info; - let properties, textures, cubemaps, attributes, geometries, objects; - let programCache, materials, renderLists, renderStates, clipping, shadowMap; - - let background, morphtargets, bufferRenderer, indexedBufferRenderer; - - let utils, bindingStates; - - function initGLContext() { - - extensions = new WebGLExtensions( _gl ); - - capabilities = new WebGLCapabilities( _gl, extensions, parameters ); - - extensions.init( capabilities ); - - utils = new WebGLUtils( _gl, extensions, capabilities ); - - state = new WebGLState( _gl, extensions, capabilities ); - - _currentDrawBuffers[ 0 ] = 1029; - - info = new WebGLInfo( _gl ); - properties = new WebGLProperties(); - textures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ); - cubemaps = new WebGLCubeMaps( _this ); - attributes = new WebGLAttributes( _gl, capabilities ); - bindingStates = new WebGLBindingStates( _gl, extensions, attributes, capabilities ); - geometries = new WebGLGeometries( _gl, attributes, info, bindingStates ); - objects = new WebGLObjects( _gl, geometries, attributes, info ); - morphtargets = new WebGLMorphtargets( _gl ); - clipping = new WebGLClipping( properties ); - programCache = new WebGLPrograms( _this, cubemaps, extensions, capabilities, bindingStates, clipping ); - materials = new WebGLMaterials( properties ); - renderLists = new WebGLRenderLists( properties ); - renderStates = new WebGLRenderStates( extensions, capabilities ); - background = new WebGLBackground( _this, cubemaps, state, objects, _premultipliedAlpha ); - shadowMap = new WebGLShadowMap( _this, objects, capabilities ); - - bufferRenderer = new WebGLBufferRenderer( _gl, extensions, info, capabilities ); - indexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info, capabilities ); - - info.programs = programCache.programs; - - _this.capabilities = capabilities; - _this.extensions = extensions; - _this.properties = properties; - _this.renderLists = renderLists; - _this.shadowMap = shadowMap; - _this.state = state; - _this.info = info; - - } - - initGLContext(); - - // xr - - const xr = new WebXRManager( _this, _gl ); - - this.xr = xr; - - // API - - this.getContext = function () { - - return _gl; - - }; - - this.getContextAttributes = function () { - - return _gl.getContextAttributes(); - - }; - - this.forceContextLoss = function () { - - const extension = extensions.get( 'WEBGL_lose_context' ); - if ( extension ) extension.loseContext(); - - }; - - this.forceContextRestore = function () { - - const extension = extensions.get( 'WEBGL_lose_context' ); - if ( extension ) extension.restoreContext(); - - }; - - this.getPixelRatio = function () { - - return _pixelRatio; - - }; - - this.setPixelRatio = function ( value ) { - - if ( value === undefined ) return; - - _pixelRatio = value; - - this.setSize( _width, _height, false ); - - }; - - this.getSize = function ( target ) { - - return target.set( _width, _height ); - - }; - - this.setSize = function ( width, height, updateStyle ) { - - if ( xr.isPresenting ) { - - console.warn( 'THREE.WebGLRenderer: Can\'t change size while VR device is presenting.' ); - return; - - } - - _width = width; - _height = height; - - _canvas.width = Math.floor( width * _pixelRatio ); - _canvas.height = Math.floor( height * _pixelRatio ); - - if ( updateStyle !== false ) { - - _canvas.style.width = width + 'px'; - _canvas.style.height = height + 'px'; - - } - - this.setViewport( 0, 0, width, height ); - - }; - - this.getDrawingBufferSize = function ( target ) { - - return target.set( _width * _pixelRatio, _height * _pixelRatio ).floor(); - - }; - - this.setDrawingBufferSize = function ( width, height, pixelRatio ) { - - _width = width; - _height = height; - - _pixelRatio = pixelRatio; - - _canvas.width = Math.floor( width * pixelRatio ); - _canvas.height = Math.floor( height * pixelRatio ); - - this.setViewport( 0, 0, width, height ); - - }; - - this.getCurrentViewport = function ( target ) { - - return target.copy( _currentViewport ); - - }; - - this.getViewport = function ( target ) { - - return target.copy( _viewport ); - - }; - - this.setViewport = function ( x, y, width, height ) { - - if ( x.isVector4 ) { - - _viewport.set( x.x, x.y, x.z, x.w ); - - } else { - - _viewport.set( x, y, width, height ); - - } - - state.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() ); - - }; - - this.getScissor = function ( target ) { - - return target.copy( _scissor ); - - }; - - this.setScissor = function ( x, y, width, height ) { - - if ( x.isVector4 ) { - - _scissor.set( x.x, x.y, x.z, x.w ); - - } else { - - _scissor.set( x, y, width, height ); - - } - - state.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() ); - - }; - - this.getScissorTest = function () { - - return _scissorTest; - - }; - - this.setScissorTest = function ( boolean ) { - - state.setScissorTest( _scissorTest = boolean ); - - }; - - this.setOpaqueSort = function ( method ) { - - _opaqueSort = method; - - }; - - this.setTransparentSort = function ( method ) { - - _transparentSort = method; - - }; - - // Clearing - - this.getClearColor = function ( target ) { - - return target.copy( background.getClearColor() ); - - }; - - this.setClearColor = function () { - - background.setClearColor.apply( background, arguments ); - - }; - - this.getClearAlpha = function () { - - return background.getClearAlpha(); - - }; - - this.setClearAlpha = function () { - - background.setClearAlpha.apply( background, arguments ); - - }; - - this.clear = function ( color, depth, stencil ) { - - let bits = 0; - - if ( color === undefined || color ) bits |= 16384; - if ( depth === undefined || depth ) bits |= 256; - if ( stencil === undefined || stencil ) bits |= 1024; - - _gl.clear( bits ); - - }; - - this.clearColor = function () { - - this.clear( true, false, false ); - - }; - - this.clearDepth = function () { - - this.clear( false, true, false ); - - }; - - this.clearStencil = function () { - - this.clear( false, false, true ); - - }; - - // - - this.dispose = function () { - - _canvas.removeEventListener( 'webglcontextlost', onContextLost, false ); - _canvas.removeEventListener( 'webglcontextrestored', onContextRestore, false ); - - renderLists.dispose(); - renderStates.dispose(); - properties.dispose(); - cubemaps.dispose(); - objects.dispose(); - bindingStates.dispose(); - - xr.dispose(); - - xr.removeEventListener( 'sessionstart', onXRSessionStart ); - xr.removeEventListener( 'sessionend', onXRSessionEnd ); - - if ( _transmissionRenderTarget ) { - - _transmissionRenderTarget.dispose(); - _transmissionRenderTarget = null; - - } - - animation.stop(); - - }; - - // Events - - function onContextLost( event ) { - - event.preventDefault(); - - console.log( 'THREE.WebGLRenderer: Context Lost.' ); - - _isContextLost = true; - - } - - function onContextRestore( /* event */ ) { - - console.log( 'THREE.WebGLRenderer: Context Restored.' ); - - _isContextLost = false; - - const infoAutoReset = info.autoReset; - const shadowMapEnabled = shadowMap.enabled; - const shadowMapAutoUpdate = shadowMap.autoUpdate; - const shadowMapNeedsUpdate = shadowMap.needsUpdate; - const shadowMapType = shadowMap.type; - - initGLContext(); - - info.autoReset = infoAutoReset; - shadowMap.enabled = shadowMapEnabled; - shadowMap.autoUpdate = shadowMapAutoUpdate; - shadowMap.needsUpdate = shadowMapNeedsUpdate; - shadowMap.type = shadowMapType; - - } - - function onMaterialDispose( event ) { - - const material = event.target; - - material.removeEventListener( 'dispose', onMaterialDispose ); - - deallocateMaterial( material ); - - } - - // Buffer deallocation - - function deallocateMaterial( material ) { - - releaseMaterialProgramReferences( material ); - - properties.remove( material ); - - } - - - function releaseMaterialProgramReferences( material ) { - - const programs = properties.get( material ).programs; - - if ( programs !== undefined ) { - - programs.forEach( function ( program ) { - - programCache.releaseProgram( program ); - - } ); - - } - - } - - // Buffer rendering - - function renderObjectImmediate( object, program ) { - - object.render( function ( object ) { - - _this.renderBufferImmediate( object, program ); - - } ); - - } - - this.renderBufferImmediate = function ( object, program ) { - - bindingStates.initAttributes(); - - const buffers = properties.get( object ); - - if ( object.hasPositions && ! buffers.position ) buffers.position = _gl.createBuffer(); - if ( object.hasNormals && ! buffers.normal ) buffers.normal = _gl.createBuffer(); - if ( object.hasUvs && ! buffers.uv ) buffers.uv = _gl.createBuffer(); - if ( object.hasColors && ! buffers.color ) buffers.color = _gl.createBuffer(); - - const programAttributes = program.getAttributes(); - - if ( object.hasPositions ) { - - _gl.bindBuffer( 34962, buffers.position ); - _gl.bufferData( 34962, object.positionArray, 35048 ); - - bindingStates.enableAttribute( programAttributes.position ); - _gl.vertexAttribPointer( programAttributes.position, 3, 5126, false, 0, 0 ); - - } - - if ( object.hasNormals ) { - - _gl.bindBuffer( 34962, buffers.normal ); - _gl.bufferData( 34962, object.normalArray, 35048 ); - - bindingStates.enableAttribute( programAttributes.normal ); - _gl.vertexAttribPointer( programAttributes.normal, 3, 5126, false, 0, 0 ); - - } - - if ( object.hasUvs ) { - - _gl.bindBuffer( 34962, buffers.uv ); - _gl.bufferData( 34962, object.uvArray, 35048 ); - - bindingStates.enableAttribute( programAttributes.uv ); - _gl.vertexAttribPointer( programAttributes.uv, 2, 5126, false, 0, 0 ); - - } - - if ( object.hasColors ) { - - _gl.bindBuffer( 34962, buffers.color ); - _gl.bufferData( 34962, object.colorArray, 35048 ); - - bindingStates.enableAttribute( programAttributes.color ); - _gl.vertexAttribPointer( programAttributes.color, 3, 5126, false, 0, 0 ); - - } - - bindingStates.disableUnusedAttributes(); - - _gl.drawArrays( 4, 0, object.count ); - - object.count = 0; - - }; - - this.renderBufferDirect = function ( camera, scene, geometry, material, object, group ) { - - if ( scene === null ) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null) - - const frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 ); - - const program = setProgram( camera, scene, material, object ); - - state.setMaterial( material, frontFaceCW ); - - // - - let index = geometry.index; - const position = geometry.attributes.position; - - // - - if ( index === null ) { - - if ( position === undefined || position.count === 0 ) return; - - } else if ( index.count === 0 ) { - - return; - - } - - // - - let rangeFactor = 1; - - if ( material.wireframe === true ) { - - index = geometries.getWireframeAttribute( geometry ); - rangeFactor = 2; - - } - - if ( material.morphTargets || material.morphNormals ) { - - morphtargets.update( object, geometry, material, program ); - - } - - bindingStates.setup( object, material, program, geometry, index ); - - let attribute; - let renderer = bufferRenderer; - - if ( index !== null ) { - - attribute = attributes.get( index ); - - renderer = indexedBufferRenderer; - renderer.setIndex( attribute ); - - } - - // - - const dataCount = ( index !== null ) ? index.count : position.count; - - const rangeStart = geometry.drawRange.start * rangeFactor; - const rangeCount = geometry.drawRange.count * rangeFactor; - - const groupStart = group !== null ? group.start * rangeFactor : 0; - const groupCount = group !== null ? group.count * rangeFactor : Infinity; - - const drawStart = Math.max( rangeStart, groupStart ); - const drawEnd = Math.min( dataCount, rangeStart + rangeCount, groupStart + groupCount ) - 1; - - const drawCount = Math.max( 0, drawEnd - drawStart + 1 ); - - if ( drawCount === 0 ) return; - - // - - if ( object.isMesh ) { - - if ( material.wireframe === true ) { - - state.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() ); - renderer.setMode( 1 ); - - } else { - - renderer.setMode( 4 ); - - } - - } else if ( object.isLine ) { - - let lineWidth = material.linewidth; - - if ( lineWidth === undefined ) lineWidth = 1; // Not using Line*Material - - state.setLineWidth( lineWidth * getTargetPixelRatio() ); - - if ( object.isLineSegments ) { - - renderer.setMode( 1 ); - - } else if ( object.isLineLoop ) { - - renderer.setMode( 2 ); - - } else { - - renderer.setMode( 3 ); - - } - - } else if ( object.isPoints ) { - - renderer.setMode( 0 ); - - } else if ( object.isSprite ) { - - renderer.setMode( 4 ); - - } - - if ( object.isInstancedMesh ) { - - renderer.renderInstances( drawStart, drawCount, object.count ); - - } else if ( geometry.isInstancedBufferGeometry ) { - - const instanceCount = Math.min( geometry.instanceCount, geometry._maxInstanceCount ); - - renderer.renderInstances( drawStart, drawCount, instanceCount ); - - } else { - - renderer.render( drawStart, drawCount ); - - } - - }; - - // Compile - - this.compile = function ( scene, camera ) { - - currentRenderState = renderStates.get( scene ); - currentRenderState.init(); - - scene.traverseVisible( function ( object ) { - - if ( object.isLight && object.layers.test( camera.layers ) ) { - - currentRenderState.pushLight( object ); - - if ( object.castShadow ) { - - currentRenderState.pushShadow( object ); - - } - - } - - } ); - - currentRenderState.setupLights(); - - scene.traverse( function ( object ) { - - const material = object.material; - - if ( material ) { - - if ( Array.isArray( material ) ) { - - for ( let i = 0; i < material.length; i ++ ) { - - const material2 = material[ i ]; - - getProgram( material2, scene, object ); - - } - - } else { - - getProgram( material, scene, object ); - - } - - } - - } ); - - }; - - // Animation Loop - - let onAnimationFrameCallback = null; - - function onAnimationFrame( time ) { - - if ( onAnimationFrameCallback ) onAnimationFrameCallback( time ); - - } - - function onXRSessionStart() { - - animation.stop(); - - } - - function onXRSessionEnd() { - - animation.start(); - - } - - const animation = new WebGLAnimation(); - animation.setAnimationLoop( onAnimationFrame ); - - if ( typeof window !== 'undefined' ) animation.setContext( window ); - - this.setAnimationLoop = function ( callback ) { - - onAnimationFrameCallback = callback; - xr.setAnimationLoop( callback ); - - ( callback === null ) ? animation.stop() : animation.start(); - - }; - - xr.addEventListener( 'sessionstart', onXRSessionStart ); - xr.addEventListener( 'sessionend', onXRSessionEnd ); - - // Rendering - - this.render = function ( scene, camera ) { - - if ( camera !== undefined && camera.isCamera !== true ) { - - console.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' ); - return; - - } - - if ( _isContextLost === true ) return; - - // update scene graph - - if ( scene.autoUpdate === true ) scene.updateMatrixWorld(); - - // update camera matrices and frustum - - if ( camera.parent === null ) camera.updateMatrixWorld(); - - if ( xr.enabled === true && xr.isPresenting === true ) { - - if ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera ); - - camera = xr.getCamera(); // use XR camera for rendering - - } - - // - if ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, _currentRenderTarget ); - - currentRenderState = renderStates.get( scene, renderStateStack.length ); - currentRenderState.init(); - - renderStateStack.push( currentRenderState ); - - _projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ); - _frustum.setFromProjectionMatrix( _projScreenMatrix ); - - _localClippingEnabled = this.localClippingEnabled; - _clippingEnabled = clipping.init( this.clippingPlanes, _localClippingEnabled, camera ); - - currentRenderList = renderLists.get( scene, renderListStack.length ); - currentRenderList.init(); - - renderListStack.push( currentRenderList ); - - projectObject( scene, camera, 0, _this.sortObjects ); - - currentRenderList.finish(); - - if ( _this.sortObjects === true ) { - - currentRenderList.sort( _opaqueSort, _transparentSort ); - - } - - // - - if ( _clippingEnabled === true ) clipping.beginShadows(); - - const shadowsArray = currentRenderState.state.shadowsArray; - - shadowMap.render( shadowsArray, scene, camera ); - - currentRenderState.setupLights(); - currentRenderState.setupLightsView( camera ); - - if ( _clippingEnabled === true ) clipping.endShadows(); - - // - - if ( this.info.autoReset === true ) this.info.reset(); - - // - - background.render( currentRenderList, scene ); - - // render scene - - const opaqueObjects = currentRenderList.opaque; - const transmissiveObjects = currentRenderList.transmissive; - const transparentObjects = currentRenderList.transparent; - - if ( opaqueObjects.length > 0 ) renderObjects( opaqueObjects, scene, camera ); - if ( transmissiveObjects.length > 0 ) renderTransmissiveObjects( opaqueObjects, transmissiveObjects, scene, camera ); - if ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera ); - - // - - if ( _currentRenderTarget !== null ) { - - // resolve multisample renderbuffers to a single-sample texture if necessary - - textures.updateMultisampleRenderTarget( _currentRenderTarget ); - - // Generate mipmap if we're using any kind of mipmap filtering - - textures.updateRenderTargetMipmap( _currentRenderTarget ); - - } - - // - - if ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera ); - - // Ensure depth buffer writing is enabled so it can be cleared on next render - - state.buffers.depth.setTest( true ); - state.buffers.depth.setMask( true ); - state.buffers.color.setMask( true ); - - state.setPolygonOffset( false ); - - // _gl.finish(); - - bindingStates.resetDefaultState(); - _currentMaterialId = - 1; - _currentCamera = null; - - renderStateStack.pop(); - - if ( renderStateStack.length > 0 ) { - - currentRenderState = renderStateStack[ renderStateStack.length - 1 ]; - - } else { - - currentRenderState = null; - - } - - renderListStack.pop(); - - if ( renderListStack.length > 0 ) { - - currentRenderList = renderListStack[ renderListStack.length - 1 ]; - - } else { - - currentRenderList = null; - - } - - }; - - function projectObject( object, camera, groupOrder, sortObjects ) { - - if ( object.visible === false ) return; - - const visible = object.layers.test( camera.layers ); - - if ( visible ) { - - if ( object.isGroup ) { - - groupOrder = object.renderOrder; - - } else if ( object.isLOD ) { - - if ( object.autoUpdate === true ) object.update( camera ); - - } else if ( object.isLight ) { - - currentRenderState.pushLight( object ); - - if ( object.castShadow ) { - - currentRenderState.pushShadow( object ); - - } - - } else if ( object.isSprite ) { - - if ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) { - - if ( sortObjects ) { - - _vector3.setFromMatrixPosition( object.matrixWorld ) - .applyMatrix4( _projScreenMatrix ); - - } - - const geometry = objects.update( object ); - const material = object.material; - - if ( material.visible ) { - - currentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null ); - - } - - } - - } else if ( object.isImmediateRenderObject ) { - - if ( sortObjects ) { - - _vector3.setFromMatrixPosition( object.matrixWorld ) - .applyMatrix4( _projScreenMatrix ); - - } - - currentRenderList.push( object, null, object.material, groupOrder, _vector3.z, null ); - - } else if ( object.isMesh || object.isLine || object.isPoints ) { - - if ( object.isSkinnedMesh ) { - - // update skeleton only once in a frame - - if ( object.skeleton.frame !== info.render.frame ) { - - object.skeleton.update(); - object.skeleton.frame = info.render.frame; - - } - - } - - if ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) { - - if ( sortObjects ) { - - _vector3.setFromMatrixPosition( object.matrixWorld ) - .applyMatrix4( _projScreenMatrix ); - - } - - const geometry = objects.update( object ); - const material = object.material; - - if ( Array.isArray( material ) ) { - - const groups = geometry.groups; - - for ( let i = 0, l = groups.length; i < l; i ++ ) { - - const group = groups[ i ]; - const groupMaterial = material[ group.materialIndex ]; - - if ( groupMaterial && groupMaterial.visible ) { - - currentRenderList.push( object, geometry, groupMaterial, groupOrder, _vector3.z, group ); - - } - - } - - } else if ( material.visible ) { - - currentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null ); - - } - - } - - } - - } - - const children = object.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - projectObject( children[ i ], camera, groupOrder, sortObjects ); - - } - - } - - function renderTransmissiveObjects( opaqueObjects, transmissiveObjects, scene, camera ) { - - if ( _transmissionRenderTarget === null ) { - - const needsAntialias = _antialias === true && capabilities.isWebGL2 === true; - const renderTargetType = needsAntialias ? WebGLMultisampleRenderTarget : WebGLRenderTarget; - - _transmissionRenderTarget = new renderTargetType( 1024, 1024, { - generateMipmaps: true, - type: utils.convert( HalfFloatType ) !== null ? HalfFloatType : UnsignedByteType, - minFilter: LinearMipmapLinearFilter, - magFilter: NearestFilter, - wrapS: ClampToEdgeWrapping, - wrapT: ClampToEdgeWrapping - } ); - - } - - const currentRenderTarget = _this.getRenderTarget(); - _this.setRenderTarget( _transmissionRenderTarget ); - _this.clear(); - - // Turn off the features which can affect the frag color for opaque objects pass. - // Otherwise they are applied twice in opaque objects pass and transmission objects pass. - const currentToneMapping = _this.toneMapping; - _this.toneMapping = NoToneMapping; - - renderObjects( opaqueObjects, scene, camera ); - - _this.toneMapping = currentToneMapping; - - textures.updateMultisampleRenderTarget( _transmissionRenderTarget ); - textures.updateRenderTargetMipmap( _transmissionRenderTarget ); - - _this.setRenderTarget( currentRenderTarget ); - - renderObjects( transmissiveObjects, scene, camera ); - - } - - function renderObjects( renderList, scene, camera ) { - - const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null; - - for ( let i = 0, l = renderList.length; i < l; i ++ ) { - - const renderItem = renderList[ i ]; - - const object = renderItem.object; - const geometry = renderItem.geometry; - const material = overrideMaterial === null ? renderItem.material : overrideMaterial; - const group = renderItem.group; - - if ( camera.isArrayCamera ) { - - const cameras = camera.cameras; - - for ( let j = 0, jl = cameras.length; j < jl; j ++ ) { - - const camera2 = cameras[ j ]; - - if ( object.layers.test( camera2.layers ) ) { - - state.viewport( _currentViewport.copy( camera2.viewport ) ); - - currentRenderState.setupLightsView( camera2 ); - - renderObject( object, scene, camera2, geometry, material, group ); - - } - - } - - } else { - - renderObject( object, scene, camera, geometry, material, group ); - - } - - } - - } - - function renderObject( object, scene, camera, geometry, material, group ) { - - object.onBeforeRender( _this, scene, camera, geometry, material, group ); - - object.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld ); - object.normalMatrix.getNormalMatrix( object.modelViewMatrix ); - - if ( object.isImmediateRenderObject ) { - - const program = setProgram( camera, scene, material, object ); - - state.setMaterial( material ); - - bindingStates.reset(); - - renderObjectImmediate( object, program ); - - } else { - - if ( material.transparent === true && material.side === DoubleSide ) { - - material.side = BackSide; - material.needsUpdate = true; - _this.renderBufferDirect( camera, scene, geometry, material, object, group ); - - material.side = FrontSide; - material.needsUpdate = true; - _this.renderBufferDirect( camera, scene, geometry, material, object, group ); - - material.side = DoubleSide; - - } else { - - _this.renderBufferDirect( camera, scene, geometry, material, object, group ); - - } - - } - - object.onAfterRender( _this, scene, camera, geometry, material, group ); - - } - - function getProgram( material, scene, object ) { - - if ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ... - - const materialProperties = properties.get( material ); - - const lights = currentRenderState.state.lights; - const shadowsArray = currentRenderState.state.shadowsArray; - - const lightsStateVersion = lights.state.version; - - const parameters = programCache.getParameters( material, lights.state, shadowsArray, scene, object ); - const programCacheKey = programCache.getProgramCacheKey( parameters ); - - let programs = materialProperties.programs; - - // always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change - - materialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null; - materialProperties.fog = scene.fog; - materialProperties.envMap = cubemaps.get( material.envMap || materialProperties.environment ); - - if ( programs === undefined ) { - - // new material - - material.addEventListener( 'dispose', onMaterialDispose ); - - programs = new Map(); - materialProperties.programs = programs; - - } - - let program = programs.get( programCacheKey ); - - if ( program !== undefined ) { - - // early out if program and light state is identical - - if ( materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion ) { - - updateCommonMaterialProperties( material, parameters ); - - return program; - - } - - } else { - - parameters.uniforms = programCache.getUniforms( material ); - - material.onBuild( parameters, _this ); - - material.onBeforeCompile( parameters, _this ); - - program = programCache.acquireProgram( parameters, programCacheKey ); - programs.set( programCacheKey, program ); - - materialProperties.uniforms = parameters.uniforms; - - } - - const uniforms = materialProperties.uniforms; - - if ( ( ! material.isShaderMaterial && ! material.isRawShaderMaterial ) || material.clipping === true ) { - - uniforms.clippingPlanes = clipping.uniform; - - } - - updateCommonMaterialProperties( material, parameters ); - - // store the light setup it was created for - - materialProperties.needsLights = materialNeedsLights( material ); - materialProperties.lightsStateVersion = lightsStateVersion; - - if ( materialProperties.needsLights ) { - - // wire up the material to this renderer's lighting state - - uniforms.ambientLightColor.value = lights.state.ambient; - uniforms.lightProbe.value = lights.state.probe; - uniforms.directionalLights.value = lights.state.directional; - uniforms.directionalLightShadows.value = lights.state.directionalShadow; - uniforms.spotLights.value = lights.state.spot; - uniforms.spotLightShadows.value = lights.state.spotShadow; - uniforms.rectAreaLights.value = lights.state.rectArea; - uniforms.ltc_1.value = lights.state.rectAreaLTC1; - uniforms.ltc_2.value = lights.state.rectAreaLTC2; - uniforms.pointLights.value = lights.state.point; - uniforms.pointLightShadows.value = lights.state.pointShadow; - uniforms.hemisphereLights.value = lights.state.hemi; - - uniforms.directionalShadowMap.value = lights.state.directionalShadowMap; - uniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix; - uniforms.spotShadowMap.value = lights.state.spotShadowMap; - uniforms.spotShadowMatrix.value = lights.state.spotShadowMatrix; - uniforms.pointShadowMap.value = lights.state.pointShadowMap; - uniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix; - // TODO (abelnation): add area lights shadow info to uniforms - - } - - const progUniforms = program.getUniforms(); - const uniformsList = WebGLUniforms.seqWithValue( progUniforms.seq, uniforms ); - - materialProperties.currentProgram = program; - materialProperties.uniformsList = uniformsList; - - return program; - - } - - function updateCommonMaterialProperties( material, parameters ) { - - const materialProperties = properties.get( material ); - - materialProperties.outputEncoding = parameters.outputEncoding; - materialProperties.instancing = parameters.instancing; - materialProperties.skinning = parameters.skinning; - materialProperties.numClippingPlanes = parameters.numClippingPlanes; - materialProperties.numIntersection = parameters.numClipIntersection; - materialProperties.vertexAlphas = parameters.vertexAlphas; - - } - - function setProgram( camera, scene, material, object ) { - - if ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ... - - textures.resetTextureUnits(); - - const fog = scene.fog; - const environment = material.isMeshStandardMaterial ? scene.environment : null; - const encoding = ( _currentRenderTarget === null ) ? _this.outputEncoding : _currentRenderTarget.texture.encoding; - const envMap = cubemaps.get( material.envMap || environment ); - const vertexAlphas = material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4; - - const materialProperties = properties.get( material ); - const lights = currentRenderState.state.lights; - - if ( _clippingEnabled === true ) { - - if ( _localClippingEnabled === true || camera !== _currentCamera ) { - - const useCache = - camera === _currentCamera && - material.id === _currentMaterialId; - - // we might want to call this function with some ClippingGroup - // object instead of the material, once it becomes feasible - // (#8465, #8379) - clipping.setState( material, camera, useCache ); - - } - - } - - // - - let needsProgramChange = false; - - if ( material.version === materialProperties.__version ) { - - if ( materialProperties.needsLights && ( materialProperties.lightsStateVersion !== lights.state.version ) ) { - - needsProgramChange = true; - - } else if ( materialProperties.outputEncoding !== encoding ) { - - needsProgramChange = true; - - } else if ( object.isInstancedMesh && materialProperties.instancing === false ) { - - needsProgramChange = true; - - } else if ( ! object.isInstancedMesh && materialProperties.instancing === true ) { - - needsProgramChange = true; - - } else if ( object.isSkinnedMesh && materialProperties.skinning === false ) { - - needsProgramChange = true; - - } else if ( ! object.isSkinnedMesh && materialProperties.skinning === true ) { - - needsProgramChange = true; - - } else if ( materialProperties.envMap !== envMap ) { - - needsProgramChange = true; - - } else if ( material.fog && materialProperties.fog !== fog ) { - - needsProgramChange = true; - - } else if ( materialProperties.numClippingPlanes !== undefined && - ( materialProperties.numClippingPlanes !== clipping.numPlanes || - materialProperties.numIntersection !== clipping.numIntersection ) ) { - - needsProgramChange = true; - - } else if ( materialProperties.vertexAlphas !== vertexAlphas ) { - - needsProgramChange = true; - - } - - } else { - - needsProgramChange = true; - materialProperties.__version = material.version; - - } - - // - - let program = materialProperties.currentProgram; - - if ( needsProgramChange === true ) { - - program = getProgram( material, scene, object ); - - } - - let refreshProgram = false; - let refreshMaterial = false; - let refreshLights = false; - - const p_uniforms = program.getUniforms(), - m_uniforms = materialProperties.uniforms; - - if ( state.useProgram( program.program ) ) { - - refreshProgram = true; - refreshMaterial = true; - refreshLights = true; - - } - - if ( material.id !== _currentMaterialId ) { - - _currentMaterialId = material.id; - - refreshMaterial = true; - - } - - if ( refreshProgram || _currentCamera !== camera ) { - - p_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix ); - - if ( capabilities.logarithmicDepthBuffer ) { - - p_uniforms.setValue( _gl, 'logDepthBufFC', - 2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) ); - - } - - if ( _currentCamera !== camera ) { - - _currentCamera = camera; - - // lighting uniforms depend on the camera so enforce an update - // now, in case this material supports lights - or later, when - // the next material that does gets activated: - - refreshMaterial = true; // set to true on material change - refreshLights = true; // remains set until update done - - } - - // load material specific uniforms - // (shader material also gets them for the sake of genericity) - - if ( material.isShaderMaterial || - material.isMeshPhongMaterial || - material.isMeshToonMaterial || - material.isMeshStandardMaterial || - material.envMap ) { - - const uCamPos = p_uniforms.map.cameraPosition; - - if ( uCamPos !== undefined ) { - - uCamPos.setValue( _gl, - _vector3.setFromMatrixPosition( camera.matrixWorld ) ); - - } - - } - - if ( material.isMeshPhongMaterial || - material.isMeshToonMaterial || - material.isMeshLambertMaterial || - material.isMeshBasicMaterial || - material.isMeshStandardMaterial || - material.isShaderMaterial ) { - - p_uniforms.setValue( _gl, 'isOrthographic', camera.isOrthographicCamera === true ); - - } - - if ( material.isMeshPhongMaterial || - material.isMeshToonMaterial || - material.isMeshLambertMaterial || - material.isMeshBasicMaterial || - material.isMeshStandardMaterial || - material.isShaderMaterial || - material.isShadowMaterial || - object.isSkinnedMesh ) { - - p_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse ); - - } - - } - - // skinning uniforms must be set even if material didn't change - // auto-setting of texture unit for bone texture must go before other textures - // otherwise textures used for skinning can take over texture units reserved for other material textures - - if ( object.isSkinnedMesh ) { - - p_uniforms.setOptional( _gl, object, 'bindMatrix' ); - p_uniforms.setOptional( _gl, object, 'bindMatrixInverse' ); - - const skeleton = object.skeleton; - - if ( skeleton ) { - - if ( capabilities.floatVertexTextures ) { - - if ( skeleton.boneTexture === null ) skeleton.computeBoneTexture(); - - p_uniforms.setValue( _gl, 'boneTexture', skeleton.boneTexture, textures ); - p_uniforms.setValue( _gl, 'boneTextureSize', skeleton.boneTextureSize ); - - } else { - - p_uniforms.setOptional( _gl, skeleton, 'boneMatrices' ); - - } - - } - - } - - if ( refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow ) { - - materialProperties.receiveShadow = object.receiveShadow; - p_uniforms.setValue( _gl, 'receiveShadow', object.receiveShadow ); - - } - - if ( refreshMaterial ) { - - p_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure ); - - if ( materialProperties.needsLights ) { - - // the current material requires lighting info - - // note: all lighting uniforms are always set correctly - // they simply reference the renderer's state for their - // values - // - // use the current material's .needsUpdate flags to set - // the GL state when required - - markUniformsLightsNeedsUpdate( m_uniforms, refreshLights ); - - } - - // refresh uniforms common to several materials - - if ( fog && material.fog ) { - - materials.refreshFogUniforms( m_uniforms, fog ); - - } - - materials.refreshMaterialUniforms( m_uniforms, material, _pixelRatio, _height, _transmissionRenderTarget ); - - WebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures ); - - } - - if ( material.isShaderMaterial && material.uniformsNeedUpdate === true ) { - - WebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures ); - material.uniformsNeedUpdate = false; - - } - - if ( material.isSpriteMaterial ) { - - p_uniforms.setValue( _gl, 'center', object.center ); - - } - - // common matrices - - p_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix ); - p_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix ); - p_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld ); - - return program; - - } - - // If uniforms are marked as clean, they don't need to be loaded to the GPU. - - function markUniformsLightsNeedsUpdate( uniforms, value ) { - - uniforms.ambientLightColor.needsUpdate = value; - uniforms.lightProbe.needsUpdate = value; - - uniforms.directionalLights.needsUpdate = value; - uniforms.directionalLightShadows.needsUpdate = value; - uniforms.pointLights.needsUpdate = value; - uniforms.pointLightShadows.needsUpdate = value; - uniforms.spotLights.needsUpdate = value; - uniforms.spotLightShadows.needsUpdate = value; - uniforms.rectAreaLights.needsUpdate = value; - uniforms.hemisphereLights.needsUpdate = value; - - } - - function materialNeedsLights( material ) { - - return material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial || - material.isMeshStandardMaterial || material.isShadowMaterial || - ( material.isShaderMaterial && material.lights === true ); - - } - - this.getActiveCubeFace = function () { - - return _currentActiveCubeFace; - - }; - - this.getActiveMipmapLevel = function () { - - return _currentActiveMipmapLevel; - - }; - - this.getRenderTarget = function () { - - return _currentRenderTarget; - - }; - - this.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) { - - _currentRenderTarget = renderTarget; - _currentActiveCubeFace = activeCubeFace; - _currentActiveMipmapLevel = activeMipmapLevel; - - if ( renderTarget && properties.get( renderTarget ).__webglFramebuffer === undefined ) { - - textures.setupRenderTarget( renderTarget ); - - } - - let framebuffer = null; - let isCube = false; - let isRenderTarget3D = false; - - if ( renderTarget ) { - - const texture = renderTarget.texture; - - if ( texture.isDataTexture3D || texture.isDataTexture2DArray ) { - - isRenderTarget3D = true; - - } - - const __webglFramebuffer = properties.get( renderTarget ).__webglFramebuffer; - - if ( renderTarget.isWebGLCubeRenderTarget ) { - - framebuffer = __webglFramebuffer[ activeCubeFace ]; - isCube = true; - - } else if ( renderTarget.isWebGLMultisampleRenderTarget ) { - - framebuffer = properties.get( renderTarget ).__webglMultisampledFramebuffer; - - } else { - - framebuffer = __webglFramebuffer; - - } - - _currentViewport.copy( renderTarget.viewport ); - _currentScissor.copy( renderTarget.scissor ); - _currentScissorTest = renderTarget.scissorTest; - - } else { - - _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor(); - _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor(); - _currentScissorTest = _scissorTest; - - } - - const framebufferBound = state.bindFramebuffer( 36160, framebuffer ); - - if ( framebufferBound && capabilities.drawBuffers ) { - - let needsUpdate = false; - - if ( renderTarget ) { - - if ( renderTarget.isWebGLMultipleRenderTargets ) { - - const textures = renderTarget.texture; - - if ( _currentDrawBuffers.length !== textures.length || _currentDrawBuffers[ 0 ] !== 36064 ) { - - for ( let i = 0, il = textures.length; i < il; i ++ ) { - - _currentDrawBuffers[ i ] = 36064 + i; - - } - - _currentDrawBuffers.length = textures.length; - - needsUpdate = true; - - } - - } else { - - if ( _currentDrawBuffers.length !== 1 || _currentDrawBuffers[ 0 ] !== 36064 ) { - - _currentDrawBuffers[ 0 ] = 36064; - _currentDrawBuffers.length = 1; - - needsUpdate = true; - - } - - } - - } else { - - if ( _currentDrawBuffers.length !== 1 || _currentDrawBuffers[ 0 ] !== 1029 ) { - - _currentDrawBuffers[ 0 ] = 1029; - _currentDrawBuffers.length = 1; - - needsUpdate = true; - - } - - } - - if ( needsUpdate ) { - - if ( capabilities.isWebGL2 ) { - - _gl.drawBuffers( _currentDrawBuffers ); - - } else { - - extensions.get( 'WEBGL_draw_buffers' ).drawBuffersWEBGL( _currentDrawBuffers ); - - } - - } - - } - - state.viewport( _currentViewport ); - state.scissor( _currentScissor ); - state.setScissorTest( _currentScissorTest ); - - if ( isCube ) { - - const textureProperties = properties.get( renderTarget.texture ); - _gl.framebufferTexture2D( 36160, 36064, 34069 + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel ); - - } else if ( isRenderTarget3D ) { - - const textureProperties = properties.get( renderTarget.texture ); - const layer = activeCubeFace || 0; - _gl.framebufferTextureLayer( 36160, 36064, textureProperties.__webglTexture, activeMipmapLevel || 0, layer ); - - } - - }; - - this.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer, activeCubeFaceIndex ) { - - if ( ! ( renderTarget && renderTarget.isWebGLRenderTarget ) ) { - - console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' ); - return; - - } - - let framebuffer = properties.get( renderTarget ).__webglFramebuffer; - - if ( renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined ) { - - framebuffer = framebuffer[ activeCubeFaceIndex ]; - - } - - if ( framebuffer ) { - - state.bindFramebuffer( 36160, framebuffer ); - - try { - - const texture = renderTarget.texture; - const textureFormat = texture.format; - const textureType = texture.type; - - if ( textureFormat !== RGBAFormat && utils.convert( textureFormat ) !== _gl.getParameter( 35739 ) ) { - - console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' ); - return; - - } - - const halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.has( 'EXT_color_buffer_float' ) ) ); - - if ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( 35738 ) && // Edge and Chrome Mac < 52 (#9513) - ! ( textureType === FloatType && ( capabilities.isWebGL2 || extensions.has( 'OES_texture_float' ) || extensions.has( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox - ! halfFloatSupportedByExt ) { - - console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' ); - return; - - } - - if ( _gl.checkFramebufferStatus( 36160 ) === 36053 ) { - - // the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604) - - if ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) { - - _gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer ); - - } - - } else { - - console.error( 'THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.' ); - - } - - } finally { - - // restore framebuffer of current render target if necessary - - const framebuffer = ( _currentRenderTarget !== null ) ? properties.get( _currentRenderTarget ).__webglFramebuffer : null; - state.bindFramebuffer( 36160, framebuffer ); - - } - - } - - }; - - this.copyFramebufferToTexture = function ( position, texture, level = 0 ) { - - const levelScale = Math.pow( 2, - level ); - const width = Math.floor( texture.image.width * levelScale ); - const height = Math.floor( texture.image.height * levelScale ); - - let glFormat = utils.convert( texture.format ); - - if ( capabilities.isWebGL2 ) { - - // Workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=1120100 - // Not needed in Chrome 93+ - - if ( glFormat === 6407 ) glFormat = 32849; - if ( glFormat === 6408 ) glFormat = 32856; - - } - - textures.setTexture2D( texture, 0 ); - - _gl.copyTexImage2D( 3553, level, glFormat, position.x, position.y, width, height, 0 ); - - state.unbindTexture(); - - }; - - this.copyTextureToTexture = function ( position, srcTexture, dstTexture, level = 0 ) { - - const width = srcTexture.image.width; - const height = srcTexture.image.height; - const glFormat = utils.convert( dstTexture.format ); - const glType = utils.convert( dstTexture.type ); - - textures.setTexture2D( dstTexture, 0 ); - - // As another texture upload may have changed pixelStorei - // parameters, make sure they are correct for the dstTexture - _gl.pixelStorei( 37440, dstTexture.flipY ); - _gl.pixelStorei( 37441, dstTexture.premultiplyAlpha ); - _gl.pixelStorei( 3317, dstTexture.unpackAlignment ); - - if ( srcTexture.isDataTexture ) { - - _gl.texSubImage2D( 3553, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data ); - - } else { - - if ( srcTexture.isCompressedTexture ) { - - _gl.compressedTexSubImage2D( 3553, level, position.x, position.y, srcTexture.mipmaps[ 0 ].width, srcTexture.mipmaps[ 0 ].height, glFormat, srcTexture.mipmaps[ 0 ].data ); - - } else { - - _gl.texSubImage2D( 3553, level, position.x, position.y, glFormat, glType, srcTexture.image ); - - } - - } - - // Generate mipmaps only when copying level 0 - if ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( 3553 ); - - state.unbindTexture(); - - }; - - this.copyTextureToTexture3D = function ( sourceBox, position, srcTexture, dstTexture, level = 0 ) { - - if ( _this.isWebGL1Renderer ) { - - console.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.' ); - return; - - } - - const width = sourceBox.max.x - sourceBox.min.x + 1; - const height = sourceBox.max.y - sourceBox.min.y + 1; - const depth = sourceBox.max.z - sourceBox.min.z + 1; - const glFormat = utils.convert( dstTexture.format ); - const glType = utils.convert( dstTexture.type ); - let glTarget; - - if ( dstTexture.isDataTexture3D ) { - - textures.setTexture3D( dstTexture, 0 ); - glTarget = 32879; - - } else if ( dstTexture.isDataTexture2DArray ) { - - textures.setTexture2DArray( dstTexture, 0 ); - glTarget = 35866; - - } else { - - console.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.' ); - return; - - } - - _gl.pixelStorei( 37440, dstTexture.flipY ); - _gl.pixelStorei( 37441, dstTexture.premultiplyAlpha ); - _gl.pixelStorei( 3317, dstTexture.unpackAlignment ); - - const unpackRowLen = _gl.getParameter( 3314 ); - const unpackImageHeight = _gl.getParameter( 32878 ); - const unpackSkipPixels = _gl.getParameter( 3316 ); - const unpackSkipRows = _gl.getParameter( 3315 ); - const unpackSkipImages = _gl.getParameter( 32877 ); - - const image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[ 0 ] : srcTexture.image; - - _gl.pixelStorei( 3314, image.width ); - _gl.pixelStorei( 32878, image.height ); - _gl.pixelStorei( 3316, sourceBox.min.x ); - _gl.pixelStorei( 3315, sourceBox.min.y ); - _gl.pixelStorei( 32877, sourceBox.min.z ); - - if ( srcTexture.isDataTexture || srcTexture.isDataTexture3D ) { - - _gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data ); - - } else { - - if ( srcTexture.isCompressedTexture ) { - - console.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.' ); - _gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data ); - - } else { - - _gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image ); - - } - - } - - _gl.pixelStorei( 3314, unpackRowLen ); - _gl.pixelStorei( 32878, unpackImageHeight ); - _gl.pixelStorei( 3316, unpackSkipPixels ); - _gl.pixelStorei( 3315, unpackSkipRows ); - _gl.pixelStorei( 32877, unpackSkipImages ); - - // Generate mipmaps only when copying level 0 - if ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( glTarget ); - - state.unbindTexture(); - - }; - - this.initTexture = function ( texture ) { - - textures.setTexture2D( texture, 0 ); - - state.unbindTexture(); - - }; - - this.resetState = function () { - - _currentActiveCubeFace = 0; - _currentActiveMipmapLevel = 0; - _currentRenderTarget = null; - - state.reset(); - bindingStates.reset(); - - }; - - if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { - - __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef - - } - -} - -class WebGL1Renderer extends WebGLRenderer {} - -WebGL1Renderer.prototype.isWebGL1Renderer = true; - -class FogExp2 { - - constructor( color, density = 0.00025 ) { - - this.name = ''; - - this.color = new Color( color ); - this.density = density; - - } - - clone() { - - return new FogExp2( this.color, this.density ); - - } - - toJSON( /* meta */ ) { - - return { - type: 'FogExp2', - color: this.color.getHex(), - density: this.density - }; - - } - -} - -FogExp2.prototype.isFogExp2 = true; - -class Fog { - - constructor( color, near = 1, far = 1000 ) { - - this.name = ''; - - this.color = new Color( color ); - - this.near = near; - this.far = far; - - } - - clone() { - - return new Fog( this.color, this.near, this.far ); - - } - - toJSON( /* meta */ ) { - - return { - type: 'Fog', - color: this.color.getHex(), - near: this.near, - far: this.far - }; - - } - -} - -Fog.prototype.isFog = true; - -class Scene extends Object3D { - - constructor() { - - super(); - - this.type = 'Scene'; - - this.background = null; - this.environment = null; - this.fog = null; - - this.overrideMaterial = null; - - this.autoUpdate = true; // checked by the renderer - - if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { - - __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef - - } - - } - - copy( source, recursive ) { - - super.copy( source, recursive ); - - if ( source.background !== null ) this.background = source.background.clone(); - if ( source.environment !== null ) this.environment = source.environment.clone(); - if ( source.fog !== null ) this.fog = source.fog.clone(); - - if ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone(); - - this.autoUpdate = source.autoUpdate; - this.matrixAutoUpdate = source.matrixAutoUpdate; - - return this; - - } - - toJSON( meta ) { - - const data = super.toJSON( meta ); - - if ( this.fog !== null ) data.object.fog = this.fog.toJSON(); - - return data; - - } - -} - -Scene.prototype.isScene = true; - -class InterleavedBuffer { - - constructor( array, stride ) { - - this.array = array; - this.stride = stride; - this.count = array !== undefined ? array.length / stride : 0; - - this.usage = StaticDrawUsage; - this.updateRange = { offset: 0, count: - 1 }; - - this.version = 0; - - this.uuid = generateUUID(); - - } - - onUploadCallback() {} - - set needsUpdate( value ) { - - if ( value === true ) this.version ++; - - } - - setUsage( value ) { - - this.usage = value; - - return this; - - } - - copy( source ) { - - this.array = new source.array.constructor( source.array ); - this.count = source.count; - this.stride = source.stride; - this.usage = source.usage; - - return this; - - } - - copyAt( index1, attribute, index2 ) { - - index1 *= this.stride; - index2 *= attribute.stride; - - for ( let i = 0, l = this.stride; i < l; i ++ ) { - - this.array[ index1 + i ] = attribute.array[ index2 + i ]; - - } - - return this; - - } - - set( value, offset = 0 ) { - - this.array.set( value, offset ); - - return this; - - } - - clone( data ) { - - if ( data.arrayBuffers === undefined ) { - - data.arrayBuffers = {}; - - } - - if ( this.array.buffer._uuid === undefined ) { - - this.array.buffer._uuid = generateUUID(); - - } - - if ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) { - - data.arrayBuffers[ this.array.buffer._uuid ] = this.array.slice( 0 ).buffer; - - } - - const array = new this.array.constructor( data.arrayBuffers[ this.array.buffer._uuid ] ); - - const ib = new this.constructor( array, this.stride ); - ib.setUsage( this.usage ); - - return ib; - - } - - onUpload( callback ) { - - this.onUploadCallback = callback; - - return this; - - } - - toJSON( data ) { - - if ( data.arrayBuffers === undefined ) { - - data.arrayBuffers = {}; - - } - - // generate UUID for array buffer if necessary - - if ( this.array.buffer._uuid === undefined ) { - - this.array.buffer._uuid = generateUUID(); - - } - - if ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) { - - data.arrayBuffers[ this.array.buffer._uuid ] = Array.prototype.slice.call( new Uint32Array( this.array.buffer ) ); - - } - - // - - return { - uuid: this.uuid, - buffer: this.array.buffer._uuid, - type: this.array.constructor.name, - stride: this.stride - }; - - } - -} - -InterleavedBuffer.prototype.isInterleavedBuffer = true; - -const _vector$6 = /*@__PURE__*/ new Vector3(); - -class InterleavedBufferAttribute { - - constructor( interleavedBuffer, itemSize, offset, normalized = false ) { - - this.name = ''; - - this.data = interleavedBuffer; - this.itemSize = itemSize; - this.offset = offset; - - this.normalized = normalized === true; - - } - - get count() { - - return this.data.count; - - } - - get array() { - - return this.data.array; - - } - - set needsUpdate( value ) { - - this.data.needsUpdate = value; - - } - - applyMatrix4( m ) { - - for ( let i = 0, l = this.data.count; i < l; i ++ ) { - - _vector$6.x = this.getX( i ); - _vector$6.y = this.getY( i ); - _vector$6.z = this.getZ( i ); - - _vector$6.applyMatrix4( m ); - - this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); - - } - - return this; - - } - - applyNormalMatrix( m ) { - - for ( let i = 0, l = this.count; i < l; i ++ ) { - - _vector$6.x = this.getX( i ); - _vector$6.y = this.getY( i ); - _vector$6.z = this.getZ( i ); - - _vector$6.applyNormalMatrix( m ); - - this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); - - } - - return this; - - } - - transformDirection( m ) { - - for ( let i = 0, l = this.count; i < l; i ++ ) { - - _vector$6.x = this.getX( i ); - _vector$6.y = this.getY( i ); - _vector$6.z = this.getZ( i ); - - _vector$6.transformDirection( m ); - - this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z ); - - } - - return this; - - } - - setX( index, x ) { - - this.data.array[ index * this.data.stride + this.offset ] = x; - - return this; - - } - - setY( index, y ) { - - this.data.array[ index * this.data.stride + this.offset + 1 ] = y; - - return this; - - } - - setZ( index, z ) { - - this.data.array[ index * this.data.stride + this.offset + 2 ] = z; - - return this; - - } - - setW( index, w ) { - - this.data.array[ index * this.data.stride + this.offset + 3 ] = w; - - return this; - - } - - getX( index ) { - - return this.data.array[ index * this.data.stride + this.offset ]; - - } - - getY( index ) { - - return this.data.array[ index * this.data.stride + this.offset + 1 ]; - - } - - getZ( index ) { - - return this.data.array[ index * this.data.stride + this.offset + 2 ]; - - } - - getW( index ) { - - return this.data.array[ index * this.data.stride + this.offset + 3 ]; - - } - - setXY( index, x, y ) { - - index = index * this.data.stride + this.offset; - - this.data.array[ index + 0 ] = x; - this.data.array[ index + 1 ] = y; - - return this; - - } - - setXYZ( index, x, y, z ) { - - index = index * this.data.stride + this.offset; - - this.data.array[ index + 0 ] = x; - this.data.array[ index + 1 ] = y; - this.data.array[ index + 2 ] = z; - - return this; - - } - - setXYZW( index, x, y, z, w ) { - - index = index * this.data.stride + this.offset; - - this.data.array[ index + 0 ] = x; - this.data.array[ index + 1 ] = y; - this.data.array[ index + 2 ] = z; - this.data.array[ index + 3 ] = w; - - return this; - - } - - clone( data ) { - - if ( data === undefined ) { - - console.log( 'THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.' ); - - const array = []; - - for ( let i = 0; i < this.count; i ++ ) { - - const index = i * this.data.stride + this.offset; - - for ( let j = 0; j < this.itemSize; j ++ ) { - - array.push( this.data.array[ index + j ] ); - - } - - } - - return new BufferAttribute( new this.array.constructor( array ), this.itemSize, this.normalized ); - - } else { - - if ( data.interleavedBuffers === undefined ) { - - data.interleavedBuffers = {}; - - } - - if ( data.interleavedBuffers[ this.data.uuid ] === undefined ) { - - data.interleavedBuffers[ this.data.uuid ] = this.data.clone( data ); - - } - - return new InterleavedBufferAttribute( data.interleavedBuffers[ this.data.uuid ], this.itemSize, this.offset, this.normalized ); - - } - - } - - toJSON( data ) { - - if ( data === undefined ) { - - console.log( 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.' ); - - const array = []; - - for ( let i = 0; i < this.count; i ++ ) { - - const index = i * this.data.stride + this.offset; - - for ( let j = 0; j < this.itemSize; j ++ ) { - - array.push( this.data.array[ index + j ] ); - - } - - } - - // deinterleave data and save it as an ordinary buffer attribute for now - - return { - itemSize: this.itemSize, - type: this.array.constructor.name, - array: array, - normalized: this.normalized - }; - - } else { - - // save as true interlaved attribtue - - if ( data.interleavedBuffers === undefined ) { - - data.interleavedBuffers = {}; - - } - - if ( data.interleavedBuffers[ this.data.uuid ] === undefined ) { - - data.interleavedBuffers[ this.data.uuid ] = this.data.toJSON( data ); - - } - - return { - isInterleavedBufferAttribute: true, - itemSize: this.itemSize, - data: this.data.uuid, - offset: this.offset, - normalized: this.normalized - }; - - } - - } - -} - -InterleavedBufferAttribute.prototype.isInterleavedBufferAttribute = true; - -/** - * parameters = { - * color: , - * map: new THREE.Texture( ), - * alphaMap: new THREE.Texture( ), - * rotation: , - * sizeAttenuation: - * } - */ - -class SpriteMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'SpriteMaterial'; - - this.color = new Color( 0xffffff ); - - this.map = null; - - this.alphaMap = null; - - this.rotation = 0; - - this.sizeAttenuation = true; - - this.transparent = true; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - - this.map = source.map; - - this.alphaMap = source.alphaMap; - - this.rotation = source.rotation; - - this.sizeAttenuation = source.sizeAttenuation; - - return this; - - } - -} - -SpriteMaterial.prototype.isSpriteMaterial = true; - -let _geometry; - -const _intersectPoint = /*@__PURE__*/ new Vector3(); -const _worldScale = /*@__PURE__*/ new Vector3(); -const _mvPosition = /*@__PURE__*/ new Vector3(); - -const _alignedPosition = /*@__PURE__*/ new Vector2(); -const _rotatedPosition = /*@__PURE__*/ new Vector2(); -const _viewWorldMatrix = /*@__PURE__*/ new Matrix4(); - -const _vA = /*@__PURE__*/ new Vector3(); -const _vB = /*@__PURE__*/ new Vector3(); -const _vC = /*@__PURE__*/ new Vector3(); - -const _uvA = /*@__PURE__*/ new Vector2(); -const _uvB = /*@__PURE__*/ new Vector2(); -const _uvC = /*@__PURE__*/ new Vector2(); - -class Sprite extends Object3D { - - constructor( material ) { - - super(); - - this.type = 'Sprite'; - - if ( _geometry === undefined ) { - - _geometry = new BufferGeometry(); - - const float32Array = new Float32Array( [ - - 0.5, - 0.5, 0, 0, 0, - 0.5, - 0.5, 0, 1, 0, - 0.5, 0.5, 0, 1, 1, - - 0.5, 0.5, 0, 0, 1 - ] ); - - const interleavedBuffer = new InterleavedBuffer( float32Array, 5 ); - - _geometry.setIndex( [ 0, 1, 2, 0, 2, 3 ] ); - _geometry.setAttribute( 'position', new InterleavedBufferAttribute( interleavedBuffer, 3, 0, false ) ); - _geometry.setAttribute( 'uv', new InterleavedBufferAttribute( interleavedBuffer, 2, 3, false ) ); - - } - - this.geometry = _geometry; - this.material = ( material !== undefined ) ? material : new SpriteMaterial(); - - this.center = new Vector2( 0.5, 0.5 ); - - } - - raycast( raycaster, intersects ) { - - if ( raycaster.camera === null ) { - - console.error( 'THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.' ); - - } - - _worldScale.setFromMatrixScale( this.matrixWorld ); - - _viewWorldMatrix.copy( raycaster.camera.matrixWorld ); - this.modelViewMatrix.multiplyMatrices( raycaster.camera.matrixWorldInverse, this.matrixWorld ); - - _mvPosition.setFromMatrixPosition( this.modelViewMatrix ); - - if ( raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false ) { - - _worldScale.multiplyScalar( - _mvPosition.z ); - - } - - const rotation = this.material.rotation; - let sin, cos; - - if ( rotation !== 0 ) { - - cos = Math.cos( rotation ); - sin = Math.sin( rotation ); - - } - - const center = this.center; - - transformVertex( _vA.set( - 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); - transformVertex( _vB.set( 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); - transformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); - - _uvA.set( 0, 0 ); - _uvB.set( 1, 0 ); - _uvC.set( 1, 1 ); - - // check first triangle - let intersect = raycaster.ray.intersectTriangle( _vA, _vB, _vC, false, _intersectPoint ); - - if ( intersect === null ) { - - // check second triangle - transformVertex( _vB.set( - 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos ); - _uvB.set( 0, 1 ); - - intersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint ); - if ( intersect === null ) { - - return; - - } - - } - - const distance = raycaster.ray.origin.distanceTo( _intersectPoint ); - - if ( distance < raycaster.near || distance > raycaster.far ) return; - - intersects.push( { - - distance: distance, - point: _intersectPoint.clone(), - uv: Triangle.getUV( _intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() ), - face: null, - object: this - - } ); - - } - - copy( source ) { - - super.copy( source ); - - if ( source.center !== undefined ) this.center.copy( source.center ); - - this.material = source.material; - - return this; - - } - -} - -Sprite.prototype.isSprite = true; - -function transformVertex( vertexPosition, mvPosition, center, scale, sin, cos ) { - - // compute position in camera space - _alignedPosition.subVectors( vertexPosition, center ).addScalar( 0.5 ).multiply( scale ); - - // to check if rotation is not zero - if ( sin !== undefined ) { - - _rotatedPosition.x = ( cos * _alignedPosition.x ) - ( sin * _alignedPosition.y ); - _rotatedPosition.y = ( sin * _alignedPosition.x ) + ( cos * _alignedPosition.y ); - - } else { - - _rotatedPosition.copy( _alignedPosition ); - - } - - - vertexPosition.copy( mvPosition ); - vertexPosition.x += _rotatedPosition.x; - vertexPosition.y += _rotatedPosition.y; - - // transform to world space - vertexPosition.applyMatrix4( _viewWorldMatrix ); - -} - -const _v1$2 = /*@__PURE__*/ new Vector3(); -const _v2$1 = /*@__PURE__*/ new Vector3(); - -class LOD extends Object3D { - - constructor() { - - super(); - - this._currentLevel = 0; - - this.type = 'LOD'; - - Object.defineProperties( this, { - levels: { - enumerable: true, - value: [] - }, - isLOD: { - value: true, - } - } ); - - this.autoUpdate = true; - - } - - copy( source ) { - - super.copy( source, false ); - - const levels = source.levels; - - for ( let i = 0, l = levels.length; i < l; i ++ ) { - - const level = levels[ i ]; - - this.addLevel( level.object.clone(), level.distance ); - - } - - this.autoUpdate = source.autoUpdate; - - return this; - - } - - addLevel( object, distance = 0 ) { - - distance = Math.abs( distance ); - - const levels = this.levels; - - let l; - - for ( l = 0; l < levels.length; l ++ ) { - - if ( distance < levels[ l ].distance ) { - - break; - - } - - } - - levels.splice( l, 0, { distance: distance, object: object } ); - - this.add( object ); - - return this; - - } - - getCurrentLevel() { - - return this._currentLevel; - - } - - getObjectForDistance( distance ) { - - const levels = this.levels; - - if ( levels.length > 0 ) { - - let i, l; - - for ( i = 1, l = levels.length; i < l; i ++ ) { - - if ( distance < levels[ i ].distance ) { - - break; - - } - - } - - return levels[ i - 1 ].object; - - } - - return null; - - } - - raycast( raycaster, intersects ) { - - const levels = this.levels; - - if ( levels.length > 0 ) { - - _v1$2.setFromMatrixPosition( this.matrixWorld ); - - const distance = raycaster.ray.origin.distanceTo( _v1$2 ); - - this.getObjectForDistance( distance ).raycast( raycaster, intersects ); - - } - - } - - update( camera ) { - - const levels = this.levels; - - if ( levels.length > 1 ) { - - _v1$2.setFromMatrixPosition( camera.matrixWorld ); - _v2$1.setFromMatrixPosition( this.matrixWorld ); - - const distance = _v1$2.distanceTo( _v2$1 ) / camera.zoom; - - levels[ 0 ].object.visible = true; - - let i, l; - - for ( i = 1, l = levels.length; i < l; i ++ ) { - - if ( distance >= levels[ i ].distance ) { - - levels[ i - 1 ].object.visible = false; - levels[ i ].object.visible = true; - - } else { - - break; - - } - - } - - this._currentLevel = i - 1; - - for ( ; i < l; i ++ ) { - - levels[ i ].object.visible = false; - - } - - } - - } - - toJSON( meta ) { - - const data = super.toJSON( meta ); - - if ( this.autoUpdate === false ) data.object.autoUpdate = false; - - data.object.levels = []; - - const levels = this.levels; - - for ( let i = 0, l = levels.length; i < l; i ++ ) { - - const level = levels[ i ]; - - data.object.levels.push( { - object: level.object.uuid, - distance: level.distance - } ); - - } - - return data; - - } - -} - -const _basePosition = /*@__PURE__*/ new Vector3(); - -const _skinIndex = /*@__PURE__*/ new Vector4(); -const _skinWeight = /*@__PURE__*/ new Vector4(); - -const _vector$5 = /*@__PURE__*/ new Vector3(); -const _matrix = /*@__PURE__*/ new Matrix4(); - -class SkinnedMesh extends Mesh { - - constructor( geometry, material ) { - - super( geometry, material ); - - this.type = 'SkinnedMesh'; - - this.bindMode = 'attached'; - this.bindMatrix = new Matrix4(); - this.bindMatrixInverse = new Matrix4(); - - } - - copy( source ) { - - super.copy( source ); - - this.bindMode = source.bindMode; - this.bindMatrix.copy( source.bindMatrix ); - this.bindMatrixInverse.copy( source.bindMatrixInverse ); - - this.skeleton = source.skeleton; - - return this; - - } - - bind( skeleton, bindMatrix ) { - - this.skeleton = skeleton; - - if ( bindMatrix === undefined ) { - - this.updateMatrixWorld( true ); - - this.skeleton.calculateInverses(); - - bindMatrix = this.matrixWorld; - - } - - this.bindMatrix.copy( bindMatrix ); - this.bindMatrixInverse.copy( bindMatrix ).invert(); - - } - - pose() { - - this.skeleton.pose(); - - } - - normalizeSkinWeights() { - - const vector = new Vector4(); - - const skinWeight = this.geometry.attributes.skinWeight; - - for ( let i = 0, l = skinWeight.count; i < l; i ++ ) { - - vector.x = skinWeight.getX( i ); - vector.y = skinWeight.getY( i ); - vector.z = skinWeight.getZ( i ); - vector.w = skinWeight.getW( i ); - - const scale = 1.0 / vector.manhattanLength(); - - if ( scale !== Infinity ) { - - vector.multiplyScalar( scale ); - - } else { - - vector.set( 1, 0, 0, 0 ); // do something reasonable - - } - - skinWeight.setXYZW( i, vector.x, vector.y, vector.z, vector.w ); - - } - - } - - updateMatrixWorld( force ) { - - super.updateMatrixWorld( force ); - - if ( this.bindMode === 'attached' ) { - - this.bindMatrixInverse.copy( this.matrixWorld ).invert(); - - } else if ( this.bindMode === 'detached' ) { - - this.bindMatrixInverse.copy( this.bindMatrix ).invert(); - - } else { - - console.warn( 'THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode ); - - } - - } - - boneTransform( index, target ) { - - const skeleton = this.skeleton; - const geometry = this.geometry; - - _skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index ); - _skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index ); - - _basePosition.fromBufferAttribute( geometry.attributes.position, index ).applyMatrix4( this.bindMatrix ); - - target.set( 0, 0, 0 ); - - for ( let i = 0; i < 4; i ++ ) { - - const weight = _skinWeight.getComponent( i ); - - if ( weight !== 0 ) { - - const boneIndex = _skinIndex.getComponent( i ); - - _matrix.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] ); - - target.addScaledVector( _vector$5.copy( _basePosition ).applyMatrix4( _matrix ), weight ); - - } - - } - - return target.applyMatrix4( this.bindMatrixInverse ); - - } - -} - -SkinnedMesh.prototype.isSkinnedMesh = true; - -class Bone extends Object3D { - - constructor() { - - super(); - - this.type = 'Bone'; - - } - -} - -Bone.prototype.isBone = true; - -class DataTexture extends Texture { - - constructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, encoding ) { - - super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ); - - this.image = { data: data, width: width, height: height }; - - this.magFilter = magFilter; - this.minFilter = minFilter; - - this.generateMipmaps = false; - this.flipY = false; - this.unpackAlignment = 1; - - this.needsUpdate = true; - - } - -} - -DataTexture.prototype.isDataTexture = true; - -const _offsetMatrix = /*@__PURE__*/ new Matrix4(); -const _identityMatrix = /*@__PURE__*/ new Matrix4(); - -class Skeleton { - - constructor( bones = [], boneInverses = [] ) { - - this.uuid = generateUUID(); - - this.bones = bones.slice( 0 ); - this.boneInverses = boneInverses; - this.boneMatrices = null; - - this.boneTexture = null; - this.boneTextureSize = 0; - - this.frame = - 1; - - this.init(); - - } - - init() { - - const bones = this.bones; - const boneInverses = this.boneInverses; - - this.boneMatrices = new Float32Array( bones.length * 16 ); - - // calculate inverse bone matrices if necessary - - if ( boneInverses.length === 0 ) { - - this.calculateInverses(); - - } else { - - // handle special case - - if ( bones.length !== boneInverses.length ) { - - console.warn( 'THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.' ); - - this.boneInverses = []; - - for ( let i = 0, il = this.bones.length; i < il; i ++ ) { - - this.boneInverses.push( new Matrix4() ); - - } - - } - - } - - } - - calculateInverses() { - - this.boneInverses.length = 0; - - for ( let i = 0, il = this.bones.length; i < il; i ++ ) { - - const inverse = new Matrix4(); - - if ( this.bones[ i ] ) { - - inverse.copy( this.bones[ i ].matrixWorld ).invert(); - - } - - this.boneInverses.push( inverse ); - - } - - } - - pose() { - - // recover the bind-time world matrices - - for ( let i = 0, il = this.bones.length; i < il; i ++ ) { - - const bone = this.bones[ i ]; - - if ( bone ) { - - bone.matrixWorld.copy( this.boneInverses[ i ] ).invert(); - - } - - } - - // compute the local matrices, positions, rotations and scales - - for ( let i = 0, il = this.bones.length; i < il; i ++ ) { - - const bone = this.bones[ i ]; - - if ( bone ) { - - if ( bone.parent && bone.parent.isBone ) { - - bone.matrix.copy( bone.parent.matrixWorld ).invert(); - bone.matrix.multiply( bone.matrixWorld ); - - } else { - - bone.matrix.copy( bone.matrixWorld ); - - } - - bone.matrix.decompose( bone.position, bone.quaternion, bone.scale ); - - } - - } - - } - - update() { - - const bones = this.bones; - const boneInverses = this.boneInverses; - const boneMatrices = this.boneMatrices; - const boneTexture = this.boneTexture; - - // flatten bone matrices to array - - for ( let i = 0, il = bones.length; i < il; i ++ ) { - - // compute the offset between the current and the original transform - - const matrix = bones[ i ] ? bones[ i ].matrixWorld : _identityMatrix; - - _offsetMatrix.multiplyMatrices( matrix, boneInverses[ i ] ); - _offsetMatrix.toArray( boneMatrices, i * 16 ); - - } - - if ( boneTexture !== null ) { - - boneTexture.needsUpdate = true; - - } - - } - - clone() { - - return new Skeleton( this.bones, this.boneInverses ); - - } - - computeBoneTexture() { - - // layout (1 matrix = 4 pixels) - // RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4) - // with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8) - // 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16) - // 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32) - // 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64) - - let size = Math.sqrt( this.bones.length * 4 ); // 4 pixels needed for 1 matrix - size = ceilPowerOfTwo( size ); - size = Math.max( size, 4 ); - - const boneMatrices = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel - boneMatrices.set( this.boneMatrices ); // copy current values - - const boneTexture = new DataTexture( boneMatrices, size, size, RGBAFormat, FloatType ); - - this.boneMatrices = boneMatrices; - this.boneTexture = boneTexture; - this.boneTextureSize = size; - - return this; - - } - - getBoneByName( name ) { - - for ( let i = 0, il = this.bones.length; i < il; i ++ ) { - - const bone = this.bones[ i ]; - - if ( bone.name === name ) { - - return bone; - - } - - } - - return undefined; - - } - - dispose( ) { - - if ( this.boneTexture !== null ) { - - this.boneTexture.dispose(); - - this.boneTexture = null; - - } - - } - - fromJSON( json, bones ) { - - this.uuid = json.uuid; - - for ( let i = 0, l = json.bones.length; i < l; i ++ ) { - - const uuid = json.bones[ i ]; - let bone = bones[ uuid ]; - - if ( bone === undefined ) { - - console.warn( 'THREE.Skeleton: No bone found with UUID:', uuid ); - bone = new Bone(); - - } - - this.bones.push( bone ); - this.boneInverses.push( new Matrix4().fromArray( json.boneInverses[ i ] ) ); - - } - - this.init(); - - return this; - - } - - toJSON() { - - const data = { - metadata: { - version: 4.5, - type: 'Skeleton', - generator: 'Skeleton.toJSON' - }, - bones: [], - boneInverses: [] - }; - - data.uuid = this.uuid; - - const bones = this.bones; - const boneInverses = this.boneInverses; - - for ( let i = 0, l = bones.length; i < l; i ++ ) { - - const bone = bones[ i ]; - data.bones.push( bone.uuid ); - - const boneInverse = boneInverses[ i ]; - data.boneInverses.push( boneInverse.toArray() ); - - } - - return data; - - } - -} - -const _instanceLocalMatrix = /*@__PURE__*/ new Matrix4(); -const _instanceWorldMatrix = /*@__PURE__*/ new Matrix4(); - -const _instanceIntersects = []; - -const _mesh = /*@__PURE__*/ new Mesh(); - -class InstancedMesh extends Mesh { - - constructor( geometry, material, count ) { - - super( geometry, material ); - - this.instanceMatrix = new BufferAttribute( new Float32Array( count * 16 ), 16 ); - this.instanceColor = null; - - this.count = count; - - this.frustumCulled = false; - - } - - copy( source ) { - - super.copy( source ); - - this.instanceMatrix.copy( source.instanceMatrix ); - - if ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone(); - - this.count = source.count; - - return this; - - } - - getColorAt( index, color ) { - - color.fromArray( this.instanceColor.array, index * 3 ); - - } - - getMatrixAt( index, matrix ) { - - matrix.fromArray( this.instanceMatrix.array, index * 16 ); - - } - - raycast( raycaster, intersects ) { - - const matrixWorld = this.matrixWorld; - const raycastTimes = this.count; - - _mesh.geometry = this.geometry; - _mesh.material = this.material; - - if ( _mesh.material === undefined ) return; - - for ( let instanceId = 0; instanceId < raycastTimes; instanceId ++ ) { - - // calculate the world matrix for each instance - - this.getMatrixAt( instanceId, _instanceLocalMatrix ); - - _instanceWorldMatrix.multiplyMatrices( matrixWorld, _instanceLocalMatrix ); - - // the mesh represents this single instance - - _mesh.matrixWorld = _instanceWorldMatrix; - - _mesh.raycast( raycaster, _instanceIntersects ); - - // process the result of raycast - - for ( let i = 0, l = _instanceIntersects.length; i < l; i ++ ) { - - const intersect = _instanceIntersects[ i ]; - intersect.instanceId = instanceId; - intersect.object = this; - intersects.push( intersect ); - - } - - _instanceIntersects.length = 0; - - } - - } - - setColorAt( index, color ) { - - if ( this.instanceColor === null ) { - - this.instanceColor = new BufferAttribute( new Float32Array( this.count * 3 ), 3 ); - - } - - color.toArray( this.instanceColor.array, index * 3 ); - - } - - setMatrixAt( index, matrix ) { - - matrix.toArray( this.instanceMatrix.array, index * 16 ); - - } - - updateMorphTargets() { - - } - - dispose() { - - this.dispatchEvent( { type: 'dispose' } ); - - } - -} - -InstancedMesh.prototype.isInstancedMesh = true; - -/** - * parameters = { - * color: , - * opacity: , - * - * linewidth: , - * linecap: "round", - * linejoin: "round" - * } - */ - -class LineBasicMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'LineBasicMaterial'; - - this.color = new Color( 0xffffff ); - - this.linewidth = 1; - this.linecap = 'round'; - this.linejoin = 'round'; - - this.morphTargets = false; - - this.setValues( parameters ); - - } - - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - - this.linewidth = source.linewidth; - this.linecap = source.linecap; - this.linejoin = source.linejoin; - - this.morphTargets = source.morphTargets; - - return this; - - } - -} - -LineBasicMaterial.prototype.isLineBasicMaterial = true; - -const _start$1 = /*@__PURE__*/ new Vector3(); -const _end$1 = /*@__PURE__*/ new Vector3(); -const _inverseMatrix$1 = /*@__PURE__*/ new Matrix4(); -const _ray$1 = /*@__PURE__*/ new Ray(); -const _sphere$1 = /*@__PURE__*/ new Sphere(); - -class Line extends Object3D { - - constructor( geometry = new BufferGeometry(), material = new LineBasicMaterial() ) { - - super(); - - this.type = 'Line'; - - this.geometry = geometry; - this.material = material; - - this.updateMorphTargets(); - - } - - copy( source ) { - - super.copy( source ); - - this.material = source.material; - this.geometry = source.geometry; - - return this; - - } - - computeLineDistances() { - - const geometry = this.geometry; - - if ( geometry.isBufferGeometry ) { - - // we assume non-indexed geometry - - if ( geometry.index === null ) { - - const positionAttribute = geometry.attributes.position; - const lineDistances = [ 0 ]; - - for ( let i = 1, l = positionAttribute.count; i < l; i ++ ) { - - _start$1.fromBufferAttribute( positionAttribute, i - 1 ); - _end$1.fromBufferAttribute( positionAttribute, i ); - - lineDistances[ i ] = lineDistances[ i - 1 ]; - lineDistances[ i ] += _start$1.distanceTo( _end$1 ); - - } - - geometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) ); - - } else { - - console.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' ); - - } - - } else if ( geometry.isGeometry ) { - - console.error( 'THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' ); - - } - - return this; - - } - - raycast( raycaster, intersects ) { - - const geometry = this.geometry; - const matrixWorld = this.matrixWorld; - const threshold = raycaster.params.Line.threshold; - const drawRange = geometry.drawRange; - - // Checking boundingSphere distance to ray - - if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); - - _sphere$1.copy( geometry.boundingSphere ); - _sphere$1.applyMatrix4( matrixWorld ); - _sphere$1.radius += threshold; - - if ( raycaster.ray.intersectsSphere( _sphere$1 ) === false ) return; - - // - - _inverseMatrix$1.copy( matrixWorld ).invert(); - _ray$1.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$1 ); - - const localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ); - const localThresholdSq = localThreshold * localThreshold; - - const vStart = new Vector3(); - const vEnd = new Vector3(); - const interSegment = new Vector3(); - const interRay = new Vector3(); - const step = this.isLineSegments ? 2 : 1; - - if ( geometry.isBufferGeometry ) { - - const index = geometry.index; - const attributes = geometry.attributes; - const positionAttribute = attributes.position; - - if ( index !== null ) { - - const start = Math.max( 0, drawRange.start ); - const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); - - for ( let i = start, l = end - 1; i < l; i += step ) { - - const a = index.getX( i ); - const b = index.getX( i + 1 ); - - vStart.fromBufferAttribute( positionAttribute, a ); - vEnd.fromBufferAttribute( positionAttribute, b ); - - const distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment ); - - if ( distSq > localThresholdSq ) continue; - - interRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation - - const distance = raycaster.ray.origin.distanceTo( interRay ); - - if ( distance < raycaster.near || distance > raycaster.far ) continue; - - intersects.push( { - - distance: distance, - // What do we want? intersection point on the ray or on the segment?? - // point: raycaster.ray.at( distance ), - point: interSegment.clone().applyMatrix4( this.matrixWorld ), - index: i, - face: null, - faceIndex: null, - object: this - - } ); - - } - - } else { - - const start = Math.max( 0, drawRange.start ); - const end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) ); - - for ( let i = start, l = end - 1; i < l; i += step ) { - - vStart.fromBufferAttribute( positionAttribute, i ); - vEnd.fromBufferAttribute( positionAttribute, i + 1 ); - - const distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment ); - - if ( distSq > localThresholdSq ) continue; - - interRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation - - const distance = raycaster.ray.origin.distanceTo( interRay ); - - if ( distance < raycaster.near || distance > raycaster.far ) continue; - - intersects.push( { - - distance: distance, - // What do we want? intersection point on the ray or on the segment?? - // point: raycaster.ray.at( distance ), - point: interSegment.clone().applyMatrix4( this.matrixWorld ), - index: i, - face: null, - faceIndex: null, - object: this - - } ); - - } - - } - - } else if ( geometry.isGeometry ) { - - console.error( 'THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' ); - - } - - } - - updateMorphTargets() { - - const geometry = this.geometry; - - if ( geometry.isBufferGeometry ) { - - const morphAttributes = geometry.morphAttributes; - const keys = Object.keys( morphAttributes ); - - if ( keys.length > 0 ) { - - const morphAttribute = morphAttributes[ keys[ 0 ] ]; - - if ( morphAttribute !== undefined ) { - - this.morphTargetInfluences = []; - this.morphTargetDictionary = {}; - - for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { - - const name = morphAttribute[ m ].name || String( m ); - - this.morphTargetInfluences.push( 0 ); - this.morphTargetDictionary[ name ] = m; - - } - - } - - } - - } else { - - const morphTargets = geometry.morphTargets; - - if ( morphTargets !== undefined && morphTargets.length > 0 ) { - - console.error( 'THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' ); - - } - - } - - } - -} - -Line.prototype.isLine = true; - -const _start = /*@__PURE__*/ new Vector3(); -const _end = /*@__PURE__*/ new Vector3(); - -class LineSegments extends Line { - - constructor( geometry, material ) { - - super( geometry, material ); - - this.type = 'LineSegments'; - - } - - computeLineDistances() { - - const geometry = this.geometry; - - if ( geometry.isBufferGeometry ) { - - // we assume non-indexed geometry - - if ( geometry.index === null ) { - - const positionAttribute = geometry.attributes.position; - const lineDistances = []; - - for ( let i = 0, l = positionAttribute.count; i < l; i += 2 ) { - - _start.fromBufferAttribute( positionAttribute, i ); - _end.fromBufferAttribute( positionAttribute, i + 1 ); - - lineDistances[ i ] = ( i === 0 ) ? 0 : lineDistances[ i - 1 ]; - lineDistances[ i + 1 ] = lineDistances[ i ] + _start.distanceTo( _end ); - - } - - geometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) ); - - } else { - - console.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' ); - - } - - } else if ( geometry.isGeometry ) { - - console.error( 'THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' ); - - } - - return this; - - } - -} - -LineSegments.prototype.isLineSegments = true; - -class LineLoop extends Line { - - constructor( geometry, material ) { - - super( geometry, material ); - - this.type = 'LineLoop'; - - } - -} - -LineLoop.prototype.isLineLoop = true; - -/** - * parameters = { - * color: , - * opacity: , - * map: new THREE.Texture( ), - * alphaMap: new THREE.Texture( ), - * - * size: , - * sizeAttenuation: - * - * morphTargets: - * } - */ - -class PointsMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'PointsMaterial'; - - this.color = new Color( 0xffffff ); - - this.map = null; - - this.alphaMap = null; - - this.size = 1; - this.sizeAttenuation = true; - - this.morphTargets = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - - this.map = source.map; - - this.alphaMap = source.alphaMap; - - this.size = source.size; - this.sizeAttenuation = source.sizeAttenuation; - - this.morphTargets = source.morphTargets; - - return this; - - } - -} - -PointsMaterial.prototype.isPointsMaterial = true; - -const _inverseMatrix = /*@__PURE__*/ new Matrix4(); -const _ray = /*@__PURE__*/ new Ray(); -const _sphere = /*@__PURE__*/ new Sphere(); -const _position$2 = /*@__PURE__*/ new Vector3(); - -class Points extends Object3D { - - constructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) { - - super(); - - this.type = 'Points'; - - this.geometry = geometry; - this.material = material; - - this.updateMorphTargets(); - - } - - copy( source ) { - - super.copy( source ); - - this.material = source.material; - this.geometry = source.geometry; - - return this; - - } - - raycast( raycaster, intersects ) { - - const geometry = this.geometry; - const matrixWorld = this.matrixWorld; - const threshold = raycaster.params.Points.threshold; - const drawRange = geometry.drawRange; - - // Checking boundingSphere distance to ray - - if ( geometry.boundingSphere === null ) geometry.computeBoundingSphere(); - - _sphere.copy( geometry.boundingSphere ); - _sphere.applyMatrix4( matrixWorld ); - _sphere.radius += threshold; - - if ( raycaster.ray.intersectsSphere( _sphere ) === false ) return; - - // - - _inverseMatrix.copy( matrixWorld ).invert(); - _ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix ); - - const localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 ); - const localThresholdSq = localThreshold * localThreshold; - - if ( geometry.isBufferGeometry ) { - - const index = geometry.index; - const attributes = geometry.attributes; - const positionAttribute = attributes.position; - - if ( index !== null ) { - - const start = Math.max( 0, drawRange.start ); - const end = Math.min( index.count, ( drawRange.start + drawRange.count ) ); - - for ( let i = start, il = end; i < il; i ++ ) { - - const a = index.getX( i ); - - _position$2.fromBufferAttribute( positionAttribute, a ); - - testPoint( _position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this ); - - } - - } else { - - const start = Math.max( 0, drawRange.start ); - const end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) ); - - for ( let i = start, l = end; i < l; i ++ ) { - - _position$2.fromBufferAttribute( positionAttribute, i ); - - testPoint( _position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this ); - - } - - } - - } else { - - console.error( 'THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' ); - - } - - } - - updateMorphTargets() { - - const geometry = this.geometry; - - if ( geometry.isBufferGeometry ) { - - const morphAttributes = geometry.morphAttributes; - const keys = Object.keys( morphAttributes ); - - if ( keys.length > 0 ) { - - const morphAttribute = morphAttributes[ keys[ 0 ] ]; - - if ( morphAttribute !== undefined ) { - - this.morphTargetInfluences = []; - this.morphTargetDictionary = {}; - - for ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) { - - const name = morphAttribute[ m ].name || String( m ); - - this.morphTargetInfluences.push( 0 ); - this.morphTargetDictionary[ name ] = m; - - } - - } - - } - - } else { - - const morphTargets = geometry.morphTargets; - - if ( morphTargets !== undefined && morphTargets.length > 0 ) { - - console.error( 'THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' ); - - } - - } - - } - -} - -Points.prototype.isPoints = true; - -function testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) { - - const rayPointDistanceSq = _ray.distanceSqToPoint( point ); - - if ( rayPointDistanceSq < localThresholdSq ) { - - const intersectPoint = new Vector3(); - - _ray.closestPointToPoint( point, intersectPoint ); - intersectPoint.applyMatrix4( matrixWorld ); - - const distance = raycaster.ray.origin.distanceTo( intersectPoint ); - - if ( distance < raycaster.near || distance > raycaster.far ) return; - - intersects.push( { - - distance: distance, - distanceToRay: Math.sqrt( rayPointDistanceSq ), - point: intersectPoint, - index: index, - face: null, - object: object - - } ); - - } - -} - -class VideoTexture extends Texture { - - constructor( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) { - - super( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); - - this.format = format !== undefined ? format : RGBFormat; - - this.minFilter = minFilter !== undefined ? minFilter : LinearFilter; - this.magFilter = magFilter !== undefined ? magFilter : LinearFilter; - - this.generateMipmaps = false; - - const scope = this; - - function updateVideo() { - - scope.needsUpdate = true; - video.requestVideoFrameCallback( updateVideo ); - - } - - if ( 'requestVideoFrameCallback' in video ) { - - video.requestVideoFrameCallback( updateVideo ); - - } - - } - - clone() { - - return new this.constructor( this.image ).copy( this ); - - } - - update() { - - const video = this.image; - const hasVideoFrameCallback = 'requestVideoFrameCallback' in video; - - if ( hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA ) { - - this.needsUpdate = true; - - } - - } - -} - -VideoTexture.prototype.isVideoTexture = true; - -class CompressedTexture extends Texture { - - constructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) { - - super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ); - - this.image = { width: width, height: height }; - this.mipmaps = mipmaps; - - // no flipping for cube textures - // (also flipping doesn't work for compressed textures ) - - this.flipY = false; - - // can't generate mipmaps for compressed textures - // mips must be embedded in DDS files - - this.generateMipmaps = false; - - } - -} - -CompressedTexture.prototype.isCompressedTexture = true; - -class CanvasTexture extends Texture { - - constructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) { - - super( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); - - this.needsUpdate = true; - - } - -} - -CanvasTexture.prototype.isCanvasTexture = true; - -class DepthTexture extends Texture { - - constructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) { - - format = format !== undefined ? format : DepthFormat; - - if ( format !== DepthFormat && format !== DepthStencilFormat ) { - - throw new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' ); - - } - - if ( type === undefined && format === DepthFormat ) type = UnsignedShortType; - if ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type; - - super( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ); - - this.image = { width: width, height: height }; - - this.magFilter = magFilter !== undefined ? magFilter : NearestFilter; - this.minFilter = minFilter !== undefined ? minFilter : NearestFilter; - - this.flipY = false; - this.generateMipmaps = false; - - } - - -} - -DepthTexture.prototype.isDepthTexture = true; - -class CircleGeometry extends BufferGeometry { - - constructor( radius = 1, segments = 8, thetaStart = 0, thetaLength = Math.PI * 2 ) { - - super(); - - this.type = 'CircleGeometry'; - - this.parameters = { - radius: radius, - segments: segments, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - - segments = Math.max( 3, segments ); - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - // helper variables - - const vertex = new Vector3(); - const uv = new Vector2(); - - // center point - - vertices.push( 0, 0, 0 ); - normals.push( 0, 0, 1 ); - uvs.push( 0.5, 0.5 ); - - for ( let s = 0, i = 3; s <= segments; s ++, i += 3 ) { - - const segment = thetaStart + s / segments * thetaLength; - - // vertex - - vertex.x = radius * Math.cos( segment ); - vertex.y = radius * Math.sin( segment ); - - vertices.push( vertex.x, vertex.y, vertex.z ); - - // normal - - normals.push( 0, 0, 1 ); - - // uvs - - uv.x = ( vertices[ i ] / radius + 1 ) / 2; - uv.y = ( vertices[ i + 1 ] / radius + 1 ) / 2; - - uvs.push( uv.x, uv.y ); - - } - - // indices - - for ( let i = 1; i <= segments; i ++ ) { - - indices.push( i, i + 1, 0 ); - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - } - - static fromJSON( data ) { - - return new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength ); - - } - -} - -class CylinderGeometry extends BufferGeometry { - - constructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) { - - super(); - this.type = 'CylinderGeometry'; - - this.parameters = { - radiusTop: radiusTop, - radiusBottom: radiusBottom, - height: height, - radialSegments: radialSegments, - heightSegments: heightSegments, - openEnded: openEnded, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - - const scope = this; - - radialSegments = Math.floor( radialSegments ); - heightSegments = Math.floor( heightSegments ); - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - // helper variables - - let index = 0; - const indexArray = []; - const halfHeight = height / 2; - let groupStart = 0; - - // generate geometry - - generateTorso(); - - if ( openEnded === false ) { - - if ( radiusTop > 0 ) generateCap( true ); - if ( radiusBottom > 0 ) generateCap( false ); - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - function generateTorso() { - - const normal = new Vector3(); - const vertex = new Vector3(); - - let groupCount = 0; - - // this will be used to calculate the normal - const slope = ( radiusBottom - radiusTop ) / height; - - // generate vertices, normals and uvs - - for ( let y = 0; y <= heightSegments; y ++ ) { - - const indexRow = []; - - const v = y / heightSegments; - - // calculate the radius of the current row - - const radius = v * ( radiusBottom - radiusTop ) + radiusTop; - - for ( let x = 0; x <= radialSegments; x ++ ) { - - const u = x / radialSegments; - - const theta = u * thetaLength + thetaStart; - - const sinTheta = Math.sin( theta ); - const cosTheta = Math.cos( theta ); - - // vertex - - vertex.x = radius * sinTheta; - vertex.y = - v * height + halfHeight; - vertex.z = radius * cosTheta; - vertices.push( vertex.x, vertex.y, vertex.z ); - - // normal - - normal.set( sinTheta, slope, cosTheta ).normalize(); - normals.push( normal.x, normal.y, normal.z ); - - // uv - - uvs.push( u, 1 - v ); - - // save index of vertex in respective row - - indexRow.push( index ++ ); - - } - - // now save vertices of the row in our index array - - indexArray.push( indexRow ); - - } - - // generate indices - - for ( let x = 0; x < radialSegments; x ++ ) { - - for ( let y = 0; y < heightSegments; y ++ ) { - - // we use the index array to access the correct indices - - const a = indexArray[ y ][ x ]; - const b = indexArray[ y + 1 ][ x ]; - const c = indexArray[ y + 1 ][ x + 1 ]; - const d = indexArray[ y ][ x + 1 ]; - - // faces - - indices.push( a, b, d ); - indices.push( b, c, d ); - - // update group counter - - groupCount += 6; - - } - - } - - // add a group to the geometry. this will ensure multi material support - - scope.addGroup( groupStart, groupCount, 0 ); - - // calculate new start value for groups - - groupStart += groupCount; - - } - - function generateCap( top ) { - - // save the index of the first center vertex - const centerIndexStart = index; - - const uv = new Vector2(); - const vertex = new Vector3(); - - let groupCount = 0; - - const radius = ( top === true ) ? radiusTop : radiusBottom; - const sign = ( top === true ) ? 1 : - 1; - - // first we generate the center vertex data of the cap. - // because the geometry needs one set of uvs per face, - // we must generate a center vertex per face/segment - - for ( let x = 1; x <= radialSegments; x ++ ) { - - // vertex - - vertices.push( 0, halfHeight * sign, 0 ); - - // normal - - normals.push( 0, sign, 0 ); - - // uv - - uvs.push( 0.5, 0.5 ); - - // increase index - - index ++; - - } - - // save the index of the last center vertex - const centerIndexEnd = index; - - // now we generate the surrounding vertices, normals and uvs - - for ( let x = 0; x <= radialSegments; x ++ ) { - - const u = x / radialSegments; - const theta = u * thetaLength + thetaStart; - - const cosTheta = Math.cos( theta ); - const sinTheta = Math.sin( theta ); - - // vertex - - vertex.x = radius * sinTheta; - vertex.y = halfHeight * sign; - vertex.z = radius * cosTheta; - vertices.push( vertex.x, vertex.y, vertex.z ); - - // normal - - normals.push( 0, sign, 0 ); - - // uv - - uv.x = ( cosTheta * 0.5 ) + 0.5; - uv.y = ( sinTheta * 0.5 * sign ) + 0.5; - uvs.push( uv.x, uv.y ); - - // increase index - - index ++; - - } - - // generate indices - - for ( let x = 0; x < radialSegments; x ++ ) { - - const c = centerIndexStart + x; - const i = centerIndexEnd + x; - - if ( top === true ) { - - // face top - - indices.push( i, i + 1, c ); - - } else { - - // face bottom - - indices.push( i + 1, i, c ); - - } - - groupCount += 3; - - } - - // add a group to the geometry. this will ensure multi material support - - scope.addGroup( groupStart, groupCount, top === true ? 1 : 2 ); - - // calculate new start value for groups - - groupStart += groupCount; - - } - - } - - static fromJSON( data ) { - - return new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength ); - - } - -} - -class ConeGeometry extends CylinderGeometry { - - constructor( radius = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) { - - super( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ); - - this.type = 'ConeGeometry'; - - this.parameters = { - radius: radius, - height: height, - radialSegments: radialSegments, - heightSegments: heightSegments, - openEnded: openEnded, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - - } - - static fromJSON( data ) { - - return new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength ); - - } - -} - -class PolyhedronGeometry extends BufferGeometry { - - constructor( vertices, indices, radius = 1, detail = 0 ) { - - super(); - - this.type = 'PolyhedronGeometry'; - - this.parameters = { - vertices: vertices, - indices: indices, - radius: radius, - detail: detail - }; - - // default buffer data - - const vertexBuffer = []; - const uvBuffer = []; - - // the subdivision creates the vertex buffer data - - subdivide( detail ); - - // all vertices should lie on a conceptual sphere with a given radius - - applyRadius( radius ); - - // finally, create the uv data - - generateUVs(); - - // build non-indexed geometry - - this.setAttribute( 'position', new Float32BufferAttribute( vertexBuffer, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( vertexBuffer.slice(), 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvBuffer, 2 ) ); - - if ( detail === 0 ) { - - this.computeVertexNormals(); // flat normals - - } else { - - this.normalizeNormals(); // smooth normals - - } - - // helper functions - - function subdivide( detail ) { - - const a = new Vector3(); - const b = new Vector3(); - const c = new Vector3(); - - // iterate over all faces and apply a subdivison with the given detail value - - for ( let i = 0; i < indices.length; i += 3 ) { - - // get the vertices of the face - - getVertexByIndex( indices[ i + 0 ], a ); - getVertexByIndex( indices[ i + 1 ], b ); - getVertexByIndex( indices[ i + 2 ], c ); - - // perform subdivision - - subdivideFace( a, b, c, detail ); - - } - - } - - function subdivideFace( a, b, c, detail ) { - - const cols = detail + 1; - - // we use this multidimensional array as a data structure for creating the subdivision - - const v = []; - - // construct all of the vertices for this subdivision - - for ( let i = 0; i <= cols; i ++ ) { - - v[ i ] = []; - - const aj = a.clone().lerp( c, i / cols ); - const bj = b.clone().lerp( c, i / cols ); - - const rows = cols - i; - - for ( let j = 0; j <= rows; j ++ ) { - - if ( j === 0 && i === cols ) { - - v[ i ][ j ] = aj; - - } else { - - v[ i ][ j ] = aj.clone().lerp( bj, j / rows ); - - } - - } - - } - - // construct all of the faces - - for ( let i = 0; i < cols; i ++ ) { - - for ( let j = 0; j < 2 * ( cols - i ) - 1; j ++ ) { - - const k = Math.floor( j / 2 ); - - if ( j % 2 === 0 ) { - - pushVertex( v[ i ][ k + 1 ] ); - pushVertex( v[ i + 1 ][ k ] ); - pushVertex( v[ i ][ k ] ); - - } else { - - pushVertex( v[ i ][ k + 1 ] ); - pushVertex( v[ i + 1 ][ k + 1 ] ); - pushVertex( v[ i + 1 ][ k ] ); - - } - - } - - } - - } - - function applyRadius( radius ) { - - const vertex = new Vector3(); - - // iterate over the entire buffer and apply the radius to each vertex - - for ( let i = 0; i < vertexBuffer.length; i += 3 ) { - - vertex.x = vertexBuffer[ i + 0 ]; - vertex.y = vertexBuffer[ i + 1 ]; - vertex.z = vertexBuffer[ i + 2 ]; - - vertex.normalize().multiplyScalar( radius ); - - vertexBuffer[ i + 0 ] = vertex.x; - vertexBuffer[ i + 1 ] = vertex.y; - vertexBuffer[ i + 2 ] = vertex.z; - - } - - } - - function generateUVs() { - - const vertex = new Vector3(); - - for ( let i = 0; i < vertexBuffer.length; i += 3 ) { - - vertex.x = vertexBuffer[ i + 0 ]; - vertex.y = vertexBuffer[ i + 1 ]; - vertex.z = vertexBuffer[ i + 2 ]; - - const u = azimuth( vertex ) / 2 / Math.PI + 0.5; - const v = inclination( vertex ) / Math.PI + 0.5; - uvBuffer.push( u, 1 - v ); - - } - - correctUVs(); - - correctSeam(); - - } - - function correctSeam() { - - // handle case when face straddles the seam, see #3269 - - for ( let i = 0; i < uvBuffer.length; i += 6 ) { - - // uv data of a single face - - const x0 = uvBuffer[ i + 0 ]; - const x1 = uvBuffer[ i + 2 ]; - const x2 = uvBuffer[ i + 4 ]; - - const max = Math.max( x0, x1, x2 ); - const min = Math.min( x0, x1, x2 ); - - // 0.9 is somewhat arbitrary - - if ( max > 0.9 && min < 0.1 ) { - - if ( x0 < 0.2 ) uvBuffer[ i + 0 ] += 1; - if ( x1 < 0.2 ) uvBuffer[ i + 2 ] += 1; - if ( x2 < 0.2 ) uvBuffer[ i + 4 ] += 1; - - } - - } - - } - - function pushVertex( vertex ) { - - vertexBuffer.push( vertex.x, vertex.y, vertex.z ); - - } - - function getVertexByIndex( index, vertex ) { - - const stride = index * 3; - - vertex.x = vertices[ stride + 0 ]; - vertex.y = vertices[ stride + 1 ]; - vertex.z = vertices[ stride + 2 ]; - - } - - function correctUVs() { - - const a = new Vector3(); - const b = new Vector3(); - const c = new Vector3(); - - const centroid = new Vector3(); - - const uvA = new Vector2(); - const uvB = new Vector2(); - const uvC = new Vector2(); - - for ( let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6 ) { - - a.set( vertexBuffer[ i + 0 ], vertexBuffer[ i + 1 ], vertexBuffer[ i + 2 ] ); - b.set( vertexBuffer[ i + 3 ], vertexBuffer[ i + 4 ], vertexBuffer[ i + 5 ] ); - c.set( vertexBuffer[ i + 6 ], vertexBuffer[ i + 7 ], vertexBuffer[ i + 8 ] ); - - uvA.set( uvBuffer[ j + 0 ], uvBuffer[ j + 1 ] ); - uvB.set( uvBuffer[ j + 2 ], uvBuffer[ j + 3 ] ); - uvC.set( uvBuffer[ j + 4 ], uvBuffer[ j + 5 ] ); - - centroid.copy( a ).add( b ).add( c ).divideScalar( 3 ); - - const azi = azimuth( centroid ); - - correctUV( uvA, j + 0, a, azi ); - correctUV( uvB, j + 2, b, azi ); - correctUV( uvC, j + 4, c, azi ); - - } - - } - - function correctUV( uv, stride, vector, azimuth ) { - - if ( ( azimuth < 0 ) && ( uv.x === 1 ) ) { - - uvBuffer[ stride ] = uv.x - 1; - - } - - if ( ( vector.x === 0 ) && ( vector.z === 0 ) ) { - - uvBuffer[ stride ] = azimuth / 2 / Math.PI + 0.5; - - } - - } - - // Angle around the Y axis, counter-clockwise when looking from above. - - function azimuth( vector ) { - - return Math.atan2( vector.z, - vector.x ); - - } - - - // Angle above the XZ plane. - - function inclination( vector ) { - - return Math.atan2( - vector.y, Math.sqrt( ( vector.x * vector.x ) + ( vector.z * vector.z ) ) ); - - } - - } - - static fromJSON( data ) { - - return new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details ); - - } - -} - -class DodecahedronGeometry extends PolyhedronGeometry { - - constructor( radius = 1, detail = 0 ) { - - const t = ( 1 + Math.sqrt( 5 ) ) / 2; - const r = 1 / t; - - const vertices = [ - - // (±1, ±1, ±1) - - 1, - 1, - 1, - 1, - 1, 1, - - 1, 1, - 1, - 1, 1, 1, - 1, - 1, - 1, 1, - 1, 1, - 1, 1, - 1, 1, 1, 1, - - // (0, ±1/φ, ±φ) - 0, - r, - t, 0, - r, t, - 0, r, - t, 0, r, t, - - // (±1/φ, ±φ, 0) - - r, - t, 0, - r, t, 0, - r, - t, 0, r, t, 0, - - // (±φ, 0, ±1/φ) - - t, 0, - r, t, 0, - r, - - t, 0, r, t, 0, r - ]; - - const indices = [ - 3, 11, 7, 3, 7, 15, 3, 15, 13, - 7, 19, 17, 7, 17, 6, 7, 6, 15, - 17, 4, 8, 17, 8, 10, 17, 10, 6, - 8, 0, 16, 8, 16, 2, 8, 2, 10, - 0, 12, 1, 0, 1, 18, 0, 18, 16, - 6, 10, 2, 6, 2, 13, 6, 13, 15, - 2, 16, 18, 2, 18, 3, 2, 3, 13, - 18, 1, 9, 18, 9, 11, 18, 11, 3, - 4, 14, 12, 4, 12, 0, 4, 0, 8, - 11, 9, 5, 11, 5, 19, 11, 19, 7, - 19, 5, 14, 19, 14, 4, 19, 4, 17, - 1, 12, 14, 1, 14, 5, 1, 5, 9 - ]; - - super( vertices, indices, radius, detail ); - - this.type = 'DodecahedronGeometry'; - - this.parameters = { - radius: radius, - detail: detail - }; - - } - - static fromJSON( data ) { - - return new DodecahedronGeometry( data.radius, data.detail ); - - } - -} - -const _v0 = new Vector3(); -const _v1$1 = new Vector3(); -const _normal = new Vector3(); -const _triangle = new Triangle(); - -class EdgesGeometry extends BufferGeometry { - - constructor( geometry, thresholdAngle ) { - - super(); - - this.type = 'EdgesGeometry'; - - this.parameters = { - thresholdAngle: thresholdAngle - }; - - thresholdAngle = ( thresholdAngle !== undefined ) ? thresholdAngle : 1; - - if ( geometry.isGeometry === true ) { - - console.error( 'THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' ); - return; - - } - - const precisionPoints = 4; - const precision = Math.pow( 10, precisionPoints ); - const thresholdDot = Math.cos( DEG2RAD * thresholdAngle ); - - const indexAttr = geometry.getIndex(); - const positionAttr = geometry.getAttribute( 'position' ); - const indexCount = indexAttr ? indexAttr.count : positionAttr.count; - - const indexArr = [ 0, 0, 0 ]; - const vertKeys = [ 'a', 'b', 'c' ]; - const hashes = new Array( 3 ); - - const edgeData = {}; - const vertices = []; - for ( let i = 0; i < indexCount; i += 3 ) { - - if ( indexAttr ) { - - indexArr[ 0 ] = indexAttr.getX( i ); - indexArr[ 1 ] = indexAttr.getX( i + 1 ); - indexArr[ 2 ] = indexAttr.getX( i + 2 ); - - } else { - - indexArr[ 0 ] = i; - indexArr[ 1 ] = i + 1; - indexArr[ 2 ] = i + 2; - - } - - const { a, b, c } = _triangle; - a.fromBufferAttribute( positionAttr, indexArr[ 0 ] ); - b.fromBufferAttribute( positionAttr, indexArr[ 1 ] ); - c.fromBufferAttribute( positionAttr, indexArr[ 2 ] ); - _triangle.getNormal( _normal ); - - // create hashes for the edge from the vertices - hashes[ 0 ] = `${ Math.round( a.x * precision ) },${ Math.round( a.y * precision ) },${ Math.round( a.z * precision ) }`; - hashes[ 1 ] = `${ Math.round( b.x * precision ) },${ Math.round( b.y * precision ) },${ Math.round( b.z * precision ) }`; - hashes[ 2 ] = `${ Math.round( c.x * precision ) },${ Math.round( c.y * precision ) },${ Math.round( c.z * precision ) }`; - - // skip degenerate triangles - if ( hashes[ 0 ] === hashes[ 1 ] || hashes[ 1 ] === hashes[ 2 ] || hashes[ 2 ] === hashes[ 0 ] ) { - - continue; - - } - - // iterate over every edge - for ( let j = 0; j < 3; j ++ ) { - - // get the first and next vertex making up the edge - const jNext = ( j + 1 ) % 3; - const vecHash0 = hashes[ j ]; - const vecHash1 = hashes[ jNext ]; - const v0 = _triangle[ vertKeys[ j ] ]; - const v1 = _triangle[ vertKeys[ jNext ] ]; - - const hash = `${ vecHash0 }_${ vecHash1 }`; - const reverseHash = `${ vecHash1 }_${ vecHash0 }`; - - if ( reverseHash in edgeData && edgeData[ reverseHash ] ) { - - // if we found a sibling edge add it into the vertex array if - // it meets the angle threshold and delete the edge from the map. - if ( _normal.dot( edgeData[ reverseHash ].normal ) <= thresholdDot ) { - - vertices.push( v0.x, v0.y, v0.z ); - vertices.push( v1.x, v1.y, v1.z ); - - } - - edgeData[ reverseHash ] = null; - - } else if ( ! ( hash in edgeData ) ) { - - // if we've already got an edge here then skip adding a new one - edgeData[ hash ] = { - - index0: indexArr[ j ], - index1: indexArr[ jNext ], - normal: _normal.clone(), - - }; - - } - - } - - } - - // iterate over all remaining, unmatched edges and add them to the vertex array - for ( const key in edgeData ) { - - if ( edgeData[ key ] ) { - - const { index0, index1 } = edgeData[ key ]; - _v0.fromBufferAttribute( positionAttr, index0 ); - _v1$1.fromBufferAttribute( positionAttr, index1 ); - - vertices.push( _v0.x, _v0.y, _v0.z ); - vertices.push( _v1$1.x, _v1$1.y, _v1$1.z ); - - } - - } - - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - - } - -} - -/** - * Extensible curve object. - * - * Some common of curve methods: - * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget ) - * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget ) - * .getPoints(), .getSpacedPoints() - * .getLength() - * .updateArcLengths() - * - * This following curves inherit from THREE.Curve: - * - * -- 2D curves -- - * THREE.ArcCurve - * THREE.CubicBezierCurve - * THREE.EllipseCurve - * THREE.LineCurve - * THREE.QuadraticBezierCurve - * THREE.SplineCurve - * - * -- 3D curves -- - * THREE.CatmullRomCurve3 - * THREE.CubicBezierCurve3 - * THREE.LineCurve3 - * THREE.QuadraticBezierCurve3 - * - * A series of curves can be represented as a THREE.CurvePath. - * - **/ - -class Curve { - - constructor() { - - this.type = 'Curve'; - - this.arcLengthDivisions = 200; - - } - - // Virtual base class method to overwrite and implement in subclasses - // - t [0 .. 1] - - getPoint( /* t, optionalTarget */ ) { - - console.warn( 'THREE.Curve: .getPoint() not implemented.' ); - return null; - - } - - // Get point at relative position in curve according to arc length - // - u [0 .. 1] - - getPointAt( u, optionalTarget ) { - - const t = this.getUtoTmapping( u ); - return this.getPoint( t, optionalTarget ); - - } - - // Get sequence of points using getPoint( t ) - - getPoints( divisions = 5 ) { - - const points = []; - - for ( let d = 0; d <= divisions; d ++ ) { - - points.push( this.getPoint( d / divisions ) ); - - } - - return points; - - } - - // Get sequence of points using getPointAt( u ) - - getSpacedPoints( divisions = 5 ) { - - const points = []; - - for ( let d = 0; d <= divisions; d ++ ) { - - points.push( this.getPointAt( d / divisions ) ); - - } - - return points; - - } - - // Get total curve arc length - - getLength() { - - const lengths = this.getLengths(); - return lengths[ lengths.length - 1 ]; - - } - - // Get list of cumulative segment lengths - - getLengths( divisions = this.arcLengthDivisions ) { - - if ( this.cacheArcLengths && - ( this.cacheArcLengths.length === divisions + 1 ) && - ! this.needsUpdate ) { - - return this.cacheArcLengths; - - } - - this.needsUpdate = false; - - const cache = []; - let current, last = this.getPoint( 0 ); - let sum = 0; - - cache.push( 0 ); - - for ( let p = 1; p <= divisions; p ++ ) { - - current = this.getPoint( p / divisions ); - sum += current.distanceTo( last ); - cache.push( sum ); - last = current; - - } - - this.cacheArcLengths = cache; - - return cache; // { sums: cache, sum: sum }; Sum is in the last element. - - } - - updateArcLengths() { - - this.needsUpdate = true; - this.getLengths(); - - } - - // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant - - getUtoTmapping( u, distance ) { - - const arcLengths = this.getLengths(); - - let i = 0; - const il = arcLengths.length; - - let targetArcLength; // The targeted u distance value to get - - if ( distance ) { - - targetArcLength = distance; - - } else { - - targetArcLength = u * arcLengths[ il - 1 ]; - - } - - // binary search for the index with largest value smaller than target u distance - - let low = 0, high = il - 1, comparison; - - while ( low <= high ) { - - i = Math.floor( low + ( high - low ) / 2 ); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats - - comparison = arcLengths[ i ] - targetArcLength; - - if ( comparison < 0 ) { - - low = i + 1; - - } else if ( comparison > 0 ) { - - high = i - 1; - - } else { - - high = i; - break; - - // DONE - - } - - } - - i = high; - - if ( arcLengths[ i ] === targetArcLength ) { - - return i / ( il - 1 ); - - } - - // we could get finer grain at lengths, or use simple interpolation between two points - - const lengthBefore = arcLengths[ i ]; - const lengthAfter = arcLengths[ i + 1 ]; - - const segmentLength = lengthAfter - lengthBefore; - - // determine where we are between the 'before' and 'after' points - - const segmentFraction = ( targetArcLength - lengthBefore ) / segmentLength; - - // add that fractional amount to t - - const t = ( i + segmentFraction ) / ( il - 1 ); - - return t; - - } - - // Returns a unit vector tangent at t - // In case any sub curve does not implement its tangent derivation, - // 2 points a small delta apart will be used to find its gradient - // which seems to give a reasonable approximation - - getTangent( t, optionalTarget ) { - - const delta = 0.0001; - let t1 = t - delta; - let t2 = t + delta; - - // Capping in case of danger - - if ( t1 < 0 ) t1 = 0; - if ( t2 > 1 ) t2 = 1; - - const pt1 = this.getPoint( t1 ); - const pt2 = this.getPoint( t2 ); - - const tangent = optionalTarget || ( ( pt1.isVector2 ) ? new Vector2() : new Vector3() ); - - tangent.copy( pt2 ).sub( pt1 ).normalize(); - - return tangent; - - } - - getTangentAt( u, optionalTarget ) { - - const t = this.getUtoTmapping( u ); - return this.getTangent( t, optionalTarget ); - - } - - computeFrenetFrames( segments, closed ) { - - // see http://www.cs.indiana.edu/pub/techreports/TR425.pdf - - const normal = new Vector3(); - - const tangents = []; - const normals = []; - const binormals = []; - - const vec = new Vector3(); - const mat = new Matrix4(); - - // compute the tangent vectors for each segment on the curve - - for ( let i = 0; i <= segments; i ++ ) { - - const u = i / segments; - - tangents[ i ] = this.getTangentAt( u, new Vector3() ); - tangents[ i ].normalize(); - - } - - // select an initial normal vector perpendicular to the first tangent vector, - // and in the direction of the minimum tangent xyz component - - normals[ 0 ] = new Vector3(); - binormals[ 0 ] = new Vector3(); - let min = Number.MAX_VALUE; - const tx = Math.abs( tangents[ 0 ].x ); - const ty = Math.abs( tangents[ 0 ].y ); - const tz = Math.abs( tangents[ 0 ].z ); - - if ( tx <= min ) { - - min = tx; - normal.set( 1, 0, 0 ); - - } - - if ( ty <= min ) { - - min = ty; - normal.set( 0, 1, 0 ); - - } - - if ( tz <= min ) { - - normal.set( 0, 0, 1 ); - - } - - vec.crossVectors( tangents[ 0 ], normal ).normalize(); - - normals[ 0 ].crossVectors( tangents[ 0 ], vec ); - binormals[ 0 ].crossVectors( tangents[ 0 ], normals[ 0 ] ); - - - // compute the slowly-varying normal and binormal vectors for each segment on the curve - - for ( let i = 1; i <= segments; i ++ ) { - - normals[ i ] = normals[ i - 1 ].clone(); - - binormals[ i ] = binormals[ i - 1 ].clone(); - - vec.crossVectors( tangents[ i - 1 ], tangents[ i ] ); - - if ( vec.length() > Number.EPSILON ) { - - vec.normalize(); - - const theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), - 1, 1 ) ); // clamp for floating pt errors - - normals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) ); - - } - - binormals[ i ].crossVectors( tangents[ i ], normals[ i ] ); - - } - - // if the curve is closed, postprocess the vectors so the first and last normal vectors are the same - - if ( closed === true ) { - - let theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), - 1, 1 ) ); - theta /= segments; - - if ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) { - - theta = - theta; - - } - - for ( let i = 1; i <= segments; i ++ ) { - - // twist a little... - normals[ i ].applyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) ); - binormals[ i ].crossVectors( tangents[ i ], normals[ i ] ); - - } - - } - - return { - tangents: tangents, - normals: normals, - binormals: binormals - }; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - copy( source ) { - - this.arcLengthDivisions = source.arcLengthDivisions; - - return this; - - } - - toJSON() { - - const data = { - metadata: { - version: 4.5, - type: 'Curve', - generator: 'Curve.toJSON' - } - }; - - data.arcLengthDivisions = this.arcLengthDivisions; - data.type = this.type; - - return data; - - } - - fromJSON( json ) { - - this.arcLengthDivisions = json.arcLengthDivisions; - - return this; - - } - -} - -class EllipseCurve extends Curve { - - constructor( aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0 ) { - - super(); - - this.type = 'EllipseCurve'; - - this.aX = aX; - this.aY = aY; - - this.xRadius = xRadius; - this.yRadius = yRadius; - - this.aStartAngle = aStartAngle; - this.aEndAngle = aEndAngle; - - this.aClockwise = aClockwise; - - this.aRotation = aRotation; - - } - - getPoint( t, optionalTarget ) { - - const point = optionalTarget || new Vector2(); - - const twoPi = Math.PI * 2; - let deltaAngle = this.aEndAngle - this.aStartAngle; - const samePoints = Math.abs( deltaAngle ) < Number.EPSILON; - - // ensures that deltaAngle is 0 .. 2 PI - while ( deltaAngle < 0 ) deltaAngle += twoPi; - while ( deltaAngle > twoPi ) deltaAngle -= twoPi; - - if ( deltaAngle < Number.EPSILON ) { - - if ( samePoints ) { - - deltaAngle = 0; - - } else { - - deltaAngle = twoPi; - - } - - } - - if ( this.aClockwise === true && ! samePoints ) { - - if ( deltaAngle === twoPi ) { - - deltaAngle = - twoPi; - - } else { - - deltaAngle = deltaAngle - twoPi; - - } - - } - - const angle = this.aStartAngle + t * deltaAngle; - let x = this.aX + this.xRadius * Math.cos( angle ); - let y = this.aY + this.yRadius * Math.sin( angle ); - - if ( this.aRotation !== 0 ) { - - const cos = Math.cos( this.aRotation ); - const sin = Math.sin( this.aRotation ); - - const tx = x - this.aX; - const ty = y - this.aY; - - // Rotate the point about the center of the ellipse. - x = tx * cos - ty * sin + this.aX; - y = tx * sin + ty * cos + this.aY; - - } - - return point.set( x, y ); - - } - - copy( source ) { - - super.copy( source ); - - this.aX = source.aX; - this.aY = source.aY; - - this.xRadius = source.xRadius; - this.yRadius = source.yRadius; - - this.aStartAngle = source.aStartAngle; - this.aEndAngle = source.aEndAngle; - - this.aClockwise = source.aClockwise; - - this.aRotation = source.aRotation; - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.aX = this.aX; - data.aY = this.aY; - - data.xRadius = this.xRadius; - data.yRadius = this.yRadius; - - data.aStartAngle = this.aStartAngle; - data.aEndAngle = this.aEndAngle; - - data.aClockwise = this.aClockwise; - - data.aRotation = this.aRotation; - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.aX = json.aX; - this.aY = json.aY; - - this.xRadius = json.xRadius; - this.yRadius = json.yRadius; - - this.aStartAngle = json.aStartAngle; - this.aEndAngle = json.aEndAngle; - - this.aClockwise = json.aClockwise; - - this.aRotation = json.aRotation; - - return this; - - } - -} - -EllipseCurve.prototype.isEllipseCurve = true; - -class ArcCurve extends EllipseCurve { - - constructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { - - super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise ); - - this.type = 'ArcCurve'; - - } - -} - -ArcCurve.prototype.isArcCurve = true; - -/** - * Centripetal CatmullRom Curve - which is useful for avoiding - * cusps and self-intersections in non-uniform catmull rom curves. - * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf - * - * curve.type accepts centripetal(default), chordal and catmullrom - * curve.tension is used for catmullrom which defaults to 0.5 - */ - - -/* -Based on an optimized c++ solution in - - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/ - - http://ideone.com/NoEbVM - -This CubicPoly class could be used for reusing some variables and calculations, -but for three.js curve use, it could be possible inlined and flatten into a single function call -which can be placed in CurveUtils. -*/ - -function CubicPoly() { - - let c0 = 0, c1 = 0, c2 = 0, c3 = 0; - - /* - * Compute coefficients for a cubic polynomial - * p(s) = c0 + c1*s + c2*s^2 + c3*s^3 - * such that - * p(0) = x0, p(1) = x1 - * and - * p'(0) = t0, p'(1) = t1. - */ - function init( x0, x1, t0, t1 ) { - - c0 = x0; - c1 = t0; - c2 = - 3 * x0 + 3 * x1 - 2 * t0 - t1; - c3 = 2 * x0 - 2 * x1 + t0 + t1; - - } - - return { - - initCatmullRom: function ( x0, x1, x2, x3, tension ) { - - init( x1, x2, tension * ( x2 - x0 ), tension * ( x3 - x1 ) ); - - }, - - initNonuniformCatmullRom: function ( x0, x1, x2, x3, dt0, dt1, dt2 ) { - - // compute tangents when parameterized in [t1,t2] - let t1 = ( x1 - x0 ) / dt0 - ( x2 - x0 ) / ( dt0 + dt1 ) + ( x2 - x1 ) / dt1; - let t2 = ( x2 - x1 ) / dt1 - ( x3 - x1 ) / ( dt1 + dt2 ) + ( x3 - x2 ) / dt2; - - // rescale tangents for parametrization in [0,1] - t1 *= dt1; - t2 *= dt1; - - init( x1, x2, t1, t2 ); - - }, - - calc: function ( t ) { - - const t2 = t * t; - const t3 = t2 * t; - return c0 + c1 * t + c2 * t2 + c3 * t3; - - } - - }; - -} - -// - -const tmp = new Vector3(); -const px = new CubicPoly(), py = new CubicPoly(), pz = new CubicPoly(); - -class CatmullRomCurve3 extends Curve { - - constructor( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) { - - super(); - - this.type = 'CatmullRomCurve3'; - - this.points = points; - this.closed = closed; - this.curveType = curveType; - this.tension = tension; - - } - - getPoint( t, optionalTarget = new Vector3() ) { - - const point = optionalTarget; - - const points = this.points; - const l = points.length; - - const p = ( l - ( this.closed ? 0 : 1 ) ) * t; - let intPoint = Math.floor( p ); - let weight = p - intPoint; - - if ( this.closed ) { - - intPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l; - - } else if ( weight === 0 && intPoint === l - 1 ) { - - intPoint = l - 2; - weight = 1; - - } - - let p0, p3; // 4 points (p1 & p2 defined below) - - if ( this.closed || intPoint > 0 ) { - - p0 = points[ ( intPoint - 1 ) % l ]; - - } else { - - // extrapolate first point - tmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] ); - p0 = tmp; - - } - - const p1 = points[ intPoint % l ]; - const p2 = points[ ( intPoint + 1 ) % l ]; - - if ( this.closed || intPoint + 2 < l ) { - - p3 = points[ ( intPoint + 2 ) % l ]; - - } else { - - // extrapolate last point - tmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] ); - p3 = tmp; - - } - - if ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) { - - // init Centripetal / Chordal Catmull-Rom - const pow = this.curveType === 'chordal' ? 0.5 : 0.25; - let dt0 = Math.pow( p0.distanceToSquared( p1 ), pow ); - let dt1 = Math.pow( p1.distanceToSquared( p2 ), pow ); - let dt2 = Math.pow( p2.distanceToSquared( p3 ), pow ); - - // safety check for repeated points - if ( dt1 < 1e-4 ) dt1 = 1.0; - if ( dt0 < 1e-4 ) dt0 = dt1; - if ( dt2 < 1e-4 ) dt2 = dt1; - - px.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 ); - py.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 ); - pz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 ); - - } else if ( this.curveType === 'catmullrom' ) { - - px.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension ); - py.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension ); - pz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension ); - - } - - point.set( - px.calc( weight ), - py.calc( weight ), - pz.calc( weight ) - ); - - return point; - - } - - copy( source ) { - - super.copy( source ); - - this.points = []; - - for ( let i = 0, l = source.points.length; i < l; i ++ ) { - - const point = source.points[ i ]; - - this.points.push( point.clone() ); - - } - - this.closed = source.closed; - this.curveType = source.curveType; - this.tension = source.tension; - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.points = []; - - for ( let i = 0, l = this.points.length; i < l; i ++ ) { - - const point = this.points[ i ]; - data.points.push( point.toArray() ); - - } - - data.closed = this.closed; - data.curveType = this.curveType; - data.tension = this.tension; - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.points = []; - - for ( let i = 0, l = json.points.length; i < l; i ++ ) { - - const point = json.points[ i ]; - this.points.push( new Vector3().fromArray( point ) ); - - } - - this.closed = json.closed; - this.curveType = json.curveType; - this.tension = json.tension; - - return this; - - } - -} - -CatmullRomCurve3.prototype.isCatmullRomCurve3 = true; - -/** - * Bezier Curves formulas obtained from - * http://en.wikipedia.org/wiki/Bézier_curve - */ - -function CatmullRom( t, p0, p1, p2, p3 ) { - - const v0 = ( p2 - p0 ) * 0.5; - const v1 = ( p3 - p1 ) * 0.5; - const t2 = t * t; - const t3 = t * t2; - return ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1; - -} - -// - -function QuadraticBezierP0( t, p ) { - - const k = 1 - t; - return k * k * p; - -} - -function QuadraticBezierP1( t, p ) { - - return 2 * ( 1 - t ) * t * p; - -} - -function QuadraticBezierP2( t, p ) { - - return t * t * p; - -} - -function QuadraticBezier( t, p0, p1, p2 ) { - - return QuadraticBezierP0( t, p0 ) + QuadraticBezierP1( t, p1 ) + - QuadraticBezierP2( t, p2 ); - -} - -// - -function CubicBezierP0( t, p ) { - - const k = 1 - t; - return k * k * k * p; - -} - -function CubicBezierP1( t, p ) { - - const k = 1 - t; - return 3 * k * k * t * p; - -} - -function CubicBezierP2( t, p ) { - - return 3 * ( 1 - t ) * t * t * p; - -} - -function CubicBezierP3( t, p ) { - - return t * t * t * p; - -} - -function CubicBezier( t, p0, p1, p2, p3 ) { - - return CubicBezierP0( t, p0 ) + CubicBezierP1( t, p1 ) + CubicBezierP2( t, p2 ) + - CubicBezierP3( t, p3 ); - -} - -class CubicBezierCurve extends Curve { - - constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) { - - super(); - - this.type = 'CubicBezierCurve'; - - this.v0 = v0; - this.v1 = v1; - this.v2 = v2; - this.v3 = v3; - - } - - getPoint( t, optionalTarget = new Vector2() ) { - - const point = optionalTarget; - - const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3; - - point.set( - CubicBezier( t, v0.x, v1.x, v2.x, v3.x ), - CubicBezier( t, v0.y, v1.y, v2.y, v3.y ) - ); - - return point; - - } - - copy( source ) { - - super.copy( source ); - - this.v0.copy( source.v0 ); - this.v1.copy( source.v1 ); - this.v2.copy( source.v2 ); - this.v3.copy( source.v3 ); - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.v0 = this.v0.toArray(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - data.v3 = this.v3.toArray(); - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.v0.fromArray( json.v0 ); - this.v1.fromArray( json.v1 ); - this.v2.fromArray( json.v2 ); - this.v3.fromArray( json.v3 ); - - return this; - - } - -} - -CubicBezierCurve.prototype.isCubicBezierCurve = true; - -class CubicBezierCurve3 extends Curve { - - constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) { - - super(); - - this.type = 'CubicBezierCurve3'; - - this.v0 = v0; - this.v1 = v1; - this.v2 = v2; - this.v3 = v3; - - } - - getPoint( t, optionalTarget = new Vector3() ) { - - const point = optionalTarget; - - const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3; - - point.set( - CubicBezier( t, v0.x, v1.x, v2.x, v3.x ), - CubicBezier( t, v0.y, v1.y, v2.y, v3.y ), - CubicBezier( t, v0.z, v1.z, v2.z, v3.z ) - ); - - return point; - - } - - copy( source ) { - - super.copy( source ); - - this.v0.copy( source.v0 ); - this.v1.copy( source.v1 ); - this.v2.copy( source.v2 ); - this.v3.copy( source.v3 ); - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.v0 = this.v0.toArray(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - data.v3 = this.v3.toArray(); - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.v0.fromArray( json.v0 ); - this.v1.fromArray( json.v1 ); - this.v2.fromArray( json.v2 ); - this.v3.fromArray( json.v3 ); - - return this; - - } - -} - -CubicBezierCurve3.prototype.isCubicBezierCurve3 = true; - -class LineCurve extends Curve { - - constructor( v1 = new Vector2(), v2 = new Vector2() ) { - - super(); - - this.type = 'LineCurve'; - - this.v1 = v1; - this.v2 = v2; - - } - - getPoint( t, optionalTarget = new Vector2() ) { - - const point = optionalTarget; - - if ( t === 1 ) { - - point.copy( this.v2 ); - - } else { - - point.copy( this.v2 ).sub( this.v1 ); - point.multiplyScalar( t ).add( this.v1 ); - - } - - return point; - - } - - // Line curve is linear, so we can overwrite default getPointAt - getPointAt( u, optionalTarget ) { - - return this.getPoint( u, optionalTarget ); - - } - - getTangent( t, optionalTarget ) { - - const tangent = optionalTarget || new Vector2(); - - tangent.copy( this.v2 ).sub( this.v1 ).normalize(); - - return tangent; - - } - - copy( source ) { - - super.copy( source ); - - this.v1.copy( source.v1 ); - this.v2.copy( source.v2 ); - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.v1.fromArray( json.v1 ); - this.v2.fromArray( json.v2 ); - - return this; - - } - -} - -LineCurve.prototype.isLineCurve = true; - -class LineCurve3 extends Curve { - - constructor( v1 = new Vector3(), v2 = new Vector3() ) { - - super(); - - this.type = 'LineCurve3'; - this.isLineCurve3 = true; - - this.v1 = v1; - this.v2 = v2; - - } - getPoint( t, optionalTarget = new Vector3() ) { - - const point = optionalTarget; - - if ( t === 1 ) { - - point.copy( this.v2 ); - - } else { - - point.copy( this.v2 ).sub( this.v1 ); - point.multiplyScalar( t ).add( this.v1 ); - - } - - return point; - - } - // Line curve is linear, so we can overwrite default getPointAt - getPointAt( u, optionalTarget ) { - - return this.getPoint( u, optionalTarget ); - - } - copy( source ) { - - super.copy( source ); - - this.v1.copy( source.v1 ); - this.v2.copy( source.v2 ); - - return this; - - } - toJSON() { - - const data = super.toJSON(); - - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - - return data; - - } - fromJSON( json ) { - - super.fromJSON( json ); - - this.v1.fromArray( json.v1 ); - this.v2.fromArray( json.v2 ); - - return this; - - } - -} - -class QuadraticBezierCurve extends Curve { - - constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) { - - super(); - - this.type = 'QuadraticBezierCurve'; - - this.v0 = v0; - this.v1 = v1; - this.v2 = v2; - - } - - getPoint( t, optionalTarget = new Vector2() ) { - - const point = optionalTarget; - - const v0 = this.v0, v1 = this.v1, v2 = this.v2; - - point.set( - QuadraticBezier( t, v0.x, v1.x, v2.x ), - QuadraticBezier( t, v0.y, v1.y, v2.y ) - ); - - return point; - - } - - copy( source ) { - - super.copy( source ); - - this.v0.copy( source.v0 ); - this.v1.copy( source.v1 ); - this.v2.copy( source.v2 ); - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.v0 = this.v0.toArray(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.v0.fromArray( json.v0 ); - this.v1.fromArray( json.v1 ); - this.v2.fromArray( json.v2 ); - - return this; - - } - -} - -QuadraticBezierCurve.prototype.isQuadraticBezierCurve = true; - -class QuadraticBezierCurve3 extends Curve { - - constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) { - - super(); - - this.type = 'QuadraticBezierCurve3'; - - this.v0 = v0; - this.v1 = v1; - this.v2 = v2; - - } - - getPoint( t, optionalTarget = new Vector3() ) { - - const point = optionalTarget; - - const v0 = this.v0, v1 = this.v1, v2 = this.v2; - - point.set( - QuadraticBezier( t, v0.x, v1.x, v2.x ), - QuadraticBezier( t, v0.y, v1.y, v2.y ), - QuadraticBezier( t, v0.z, v1.z, v2.z ) - ); - - return point; - - } - - copy( source ) { - - super.copy( source ); - - this.v0.copy( source.v0 ); - this.v1.copy( source.v1 ); - this.v2.copy( source.v2 ); - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.v0 = this.v0.toArray(); - data.v1 = this.v1.toArray(); - data.v2 = this.v2.toArray(); - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.v0.fromArray( json.v0 ); - this.v1.fromArray( json.v1 ); - this.v2.fromArray( json.v2 ); - - return this; - - } - -} - -QuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true; - -class SplineCurve extends Curve { - - constructor( points = [] ) { - - super(); - - this.type = 'SplineCurve'; - - this.points = points; - - } - - getPoint( t, optionalTarget = new Vector2() ) { - - const point = optionalTarget; - - const points = this.points; - const p = ( points.length - 1 ) * t; - - const intPoint = Math.floor( p ); - const weight = p - intPoint; - - const p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ]; - const p1 = points[ intPoint ]; - const p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ]; - const p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ]; - - point.set( - CatmullRom( weight, p0.x, p1.x, p2.x, p3.x ), - CatmullRom( weight, p0.y, p1.y, p2.y, p3.y ) - ); - - return point; - - } - - copy( source ) { - - super.copy( source ); - - this.points = []; - - for ( let i = 0, l = source.points.length; i < l; i ++ ) { - - const point = source.points[ i ]; - - this.points.push( point.clone() ); - - } - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.points = []; - - for ( let i = 0, l = this.points.length; i < l; i ++ ) { - - const point = this.points[ i ]; - data.points.push( point.toArray() ); - - } - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.points = []; - - for ( let i = 0, l = json.points.length; i < l; i ++ ) { - - const point = json.points[ i ]; - this.points.push( new Vector2().fromArray( point ) ); - - } - - return this; - - } - -} - -SplineCurve.prototype.isSplineCurve = true; - -var Curves = /*#__PURE__*/Object.freeze({ - __proto__: null, - ArcCurve: ArcCurve, - CatmullRomCurve3: CatmullRomCurve3, - CubicBezierCurve: CubicBezierCurve, - CubicBezierCurve3: CubicBezierCurve3, - EllipseCurve: EllipseCurve, - LineCurve: LineCurve, - LineCurve3: LineCurve3, - QuadraticBezierCurve: QuadraticBezierCurve, - QuadraticBezierCurve3: QuadraticBezierCurve3, - SplineCurve: SplineCurve -}); - -/** - * Port from https://github.com/mapbox/earcut (v2.2.2) - */ - -const Earcut = { - - triangulate: function ( data, holeIndices, dim = 2 ) { - - const hasHoles = holeIndices && holeIndices.length; - const outerLen = hasHoles ? holeIndices[ 0 ] * dim : data.length; - let outerNode = linkedList( data, 0, outerLen, dim, true ); - const triangles = []; - - if ( ! outerNode || outerNode.next === outerNode.prev ) return triangles; - - let minX, minY, maxX, maxY, x, y, invSize; - - if ( hasHoles ) outerNode = eliminateHoles( data, holeIndices, outerNode, dim ); - - // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox - if ( data.length > 80 * dim ) { - - minX = maxX = data[ 0 ]; - minY = maxY = data[ 1 ]; - - for ( let i = dim; i < outerLen; i += dim ) { - - x = data[ i ]; - y = data[ i + 1 ]; - if ( x < minX ) minX = x; - if ( y < minY ) minY = y; - if ( x > maxX ) maxX = x; - if ( y > maxY ) maxY = y; - - } - - // minX, minY and invSize are later used to transform coords into integers for z-order calculation - invSize = Math.max( maxX - minX, maxY - minY ); - invSize = invSize !== 0 ? 1 / invSize : 0; - - } - - earcutLinked( outerNode, triangles, dim, minX, minY, invSize ); - - return triangles; - - } - -}; - -// create a circular doubly linked list from polygon points in the specified winding order -function linkedList( data, start, end, dim, clockwise ) { - - let i, last; - - if ( clockwise === ( signedArea( data, start, end, dim ) > 0 ) ) { - - for ( i = start; i < end; i += dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last ); - - } else { - - for ( i = end - dim; i >= start; i -= dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last ); - - } - - if ( last && equals( last, last.next ) ) { - - removeNode( last ); - last = last.next; - - } - - return last; - -} - -// eliminate colinear or duplicate points -function filterPoints( start, end ) { - - if ( ! start ) return start; - if ( ! end ) end = start; - - let p = start, - again; - do { - - again = false; - - if ( ! p.steiner && ( equals( p, p.next ) || area( p.prev, p, p.next ) === 0 ) ) { - - removeNode( p ); - p = end = p.prev; - if ( p === p.next ) break; - again = true; - - } else { - - p = p.next; - - } - - } while ( again || p !== end ); - - return end; - -} - -// main ear slicing loop which triangulates a polygon (given as a linked list) -function earcutLinked( ear, triangles, dim, minX, minY, invSize, pass ) { - - if ( ! ear ) return; - - // interlink polygon nodes in z-order - if ( ! pass && invSize ) indexCurve( ear, minX, minY, invSize ); - - let stop = ear, - prev, next; - - // iterate through ears, slicing them one by one - while ( ear.prev !== ear.next ) { - - prev = ear.prev; - next = ear.next; - - if ( invSize ? isEarHashed( ear, minX, minY, invSize ) : isEar( ear ) ) { - - // cut off the triangle - triangles.push( prev.i / dim ); - triangles.push( ear.i / dim ); - triangles.push( next.i / dim ); - - removeNode( ear ); - - // skipping the next vertex leads to less sliver triangles - ear = next.next; - stop = next.next; - - continue; - - } - - ear = next; - - // if we looped through the whole remaining polygon and can't find any more ears - if ( ear === stop ) { - - // try filtering points and slicing again - if ( ! pass ) { - - earcutLinked( filterPoints( ear ), triangles, dim, minX, minY, invSize, 1 ); - - // if this didn't work, try curing all small self-intersections locally - - } else if ( pass === 1 ) { - - ear = cureLocalIntersections( filterPoints( ear ), triangles, dim ); - earcutLinked( ear, triangles, dim, minX, minY, invSize, 2 ); - - // as a last resort, try splitting the remaining polygon into two - - } else if ( pass === 2 ) { - - splitEarcut( ear, triangles, dim, minX, minY, invSize ); - - } - - break; - - } - - } - -} - -// check whether a polygon node forms a valid ear with adjacent nodes -function isEar( ear ) { - - const a = ear.prev, - b = ear, - c = ear.next; - - if ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear - - // now make sure we don't have other points inside the potential ear - let p = ear.next.next; - - while ( p !== ear.prev ) { - - if ( pointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) && - area( p.prev, p, p.next ) >= 0 ) return false; - p = p.next; - - } - - return true; - -} - -function isEarHashed( ear, minX, minY, invSize ) { - - const a = ear.prev, - b = ear, - c = ear.next; - - if ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear - - // triangle bbox; min & max are calculated like this for speed - const minTX = a.x < b.x ? ( a.x < c.x ? a.x : c.x ) : ( b.x < c.x ? b.x : c.x ), - minTY = a.y < b.y ? ( a.y < c.y ? a.y : c.y ) : ( b.y < c.y ? b.y : c.y ), - maxTX = a.x > b.x ? ( a.x > c.x ? a.x : c.x ) : ( b.x > c.x ? b.x : c.x ), - maxTY = a.y > b.y ? ( a.y > c.y ? a.y : c.y ) : ( b.y > c.y ? b.y : c.y ); - - // z-order range for the current triangle bbox; - const minZ = zOrder( minTX, minTY, minX, minY, invSize ), - maxZ = zOrder( maxTX, maxTY, minX, minY, invSize ); - - let p = ear.prevZ, - n = ear.nextZ; - - // look for points inside the triangle in both directions - while ( p && p.z >= minZ && n && n.z <= maxZ ) { - - if ( p !== ear.prev && p !== ear.next && - pointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) && - area( p.prev, p, p.next ) >= 0 ) return false; - p = p.prevZ; - - if ( n !== ear.prev && n !== ear.next && - pointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y ) && - area( n.prev, n, n.next ) >= 0 ) return false; - n = n.nextZ; - - } - - // look for remaining points in decreasing z-order - while ( p && p.z >= minZ ) { - - if ( p !== ear.prev && p !== ear.next && - pointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) && - area( p.prev, p, p.next ) >= 0 ) return false; - p = p.prevZ; - - } - - // look for remaining points in increasing z-order - while ( n && n.z <= maxZ ) { - - if ( n !== ear.prev && n !== ear.next && - pointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y ) && - area( n.prev, n, n.next ) >= 0 ) return false; - n = n.nextZ; - - } - - return true; - -} - -// go through all polygon nodes and cure small local self-intersections -function cureLocalIntersections( start, triangles, dim ) { - - let p = start; - do { - - const a = p.prev, - b = p.next.next; - - if ( ! equals( a, b ) && intersects( a, p, p.next, b ) && locallyInside( a, b ) && locallyInside( b, a ) ) { - - triangles.push( a.i / dim ); - triangles.push( p.i / dim ); - triangles.push( b.i / dim ); - - // remove two nodes involved - removeNode( p ); - removeNode( p.next ); - - p = start = b; - - } - - p = p.next; - - } while ( p !== start ); - - return filterPoints( p ); - -} - -// try splitting polygon into two and triangulate them independently -function splitEarcut( start, triangles, dim, minX, minY, invSize ) { - - // look for a valid diagonal that divides the polygon into two - let a = start; - do { - - let b = a.next.next; - while ( b !== a.prev ) { - - if ( a.i !== b.i && isValidDiagonal( a, b ) ) { - - // split the polygon in two by the diagonal - let c = splitPolygon( a, b ); - - // filter colinear points around the cuts - a = filterPoints( a, a.next ); - c = filterPoints( c, c.next ); - - // run earcut on each half - earcutLinked( a, triangles, dim, minX, minY, invSize ); - earcutLinked( c, triangles, dim, minX, minY, invSize ); - return; - - } - - b = b.next; - - } - - a = a.next; - - } while ( a !== start ); - -} - -// link every hole into the outer loop, producing a single-ring polygon without holes -function eliminateHoles( data, holeIndices, outerNode, dim ) { - - const queue = []; - let i, len, start, end, list; - - for ( i = 0, len = holeIndices.length; i < len; i ++ ) { - - start = holeIndices[ i ] * dim; - end = i < len - 1 ? holeIndices[ i + 1 ] * dim : data.length; - list = linkedList( data, start, end, dim, false ); - if ( list === list.next ) list.steiner = true; - queue.push( getLeftmost( list ) ); - - } - - queue.sort( compareX ); - - // process holes from left to right - for ( i = 0; i < queue.length; i ++ ) { - - eliminateHole( queue[ i ], outerNode ); - outerNode = filterPoints( outerNode, outerNode.next ); - - } - - return outerNode; - -} - -function compareX( a, b ) { - - return a.x - b.x; - -} - -// find a bridge between vertices that connects hole with an outer ring and and link it -function eliminateHole( hole, outerNode ) { - - outerNode = findHoleBridge( hole, outerNode ); - if ( outerNode ) { - - const b = splitPolygon( outerNode, hole ); - - // filter collinear points around the cuts - filterPoints( outerNode, outerNode.next ); - filterPoints( b, b.next ); - - } - -} - -// David Eberly's algorithm for finding a bridge between hole and outer polygon -function findHoleBridge( hole, outerNode ) { - - let p = outerNode; - const hx = hole.x; - const hy = hole.y; - let qx = - Infinity, m; - - // find a segment intersected by a ray from the hole's leftmost point to the left; - // segment's endpoint with lesser x will be potential connection point - do { - - if ( hy <= p.y && hy >= p.next.y && p.next.y !== p.y ) { - - const x = p.x + ( hy - p.y ) * ( p.next.x - p.x ) / ( p.next.y - p.y ); - if ( x <= hx && x > qx ) { - - qx = x; - if ( x === hx ) { - - if ( hy === p.y ) return p; - if ( hy === p.next.y ) return p.next; - - } - - m = p.x < p.next.x ? p : p.next; - - } - - } - - p = p.next; - - } while ( p !== outerNode ); - - if ( ! m ) return null; - - if ( hx === qx ) return m; // hole touches outer segment; pick leftmost endpoint - - // look for points inside the triangle of hole point, segment intersection and endpoint; - // if there are no points found, we have a valid connection; - // otherwise choose the point of the minimum angle with the ray as connection point - - const stop = m, - mx = m.x, - my = m.y; - let tanMin = Infinity, tan; - - p = m; - - do { - - if ( hx >= p.x && p.x >= mx && hx !== p.x && - pointInTriangle( hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y ) ) { - - tan = Math.abs( hy - p.y ) / ( hx - p.x ); // tangential - - if ( locallyInside( p, hole ) && ( tan < tanMin || ( tan === tanMin && ( p.x > m.x || ( p.x === m.x && sectorContainsSector( m, p ) ) ) ) ) ) { - - m = p; - tanMin = tan; - - } - - } - - p = p.next; - - } while ( p !== stop ); - - return m; - -} - -// whether sector in vertex m contains sector in vertex p in the same coordinates -function sectorContainsSector( m, p ) { - - return area( m.prev, m, p.prev ) < 0 && area( p.next, m, m.next ) < 0; - -} - -// interlink polygon nodes in z-order -function indexCurve( start, minX, minY, invSize ) { - - let p = start; - do { - - if ( p.z === null ) p.z = zOrder( p.x, p.y, minX, minY, invSize ); - p.prevZ = p.prev; - p.nextZ = p.next; - p = p.next; - - } while ( p !== start ); - - p.prevZ.nextZ = null; - p.prevZ = null; - - sortLinked( p ); - -} - -// Simon Tatham's linked list merge sort algorithm -// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html -function sortLinked( list ) { - - let i, p, q, e, tail, numMerges, pSize, qSize, - inSize = 1; - - do { - - p = list; - list = null; - tail = null; - numMerges = 0; - - while ( p ) { - - numMerges ++; - q = p; - pSize = 0; - for ( i = 0; i < inSize; i ++ ) { - - pSize ++; - q = q.nextZ; - if ( ! q ) break; - - } - - qSize = inSize; - - while ( pSize > 0 || ( qSize > 0 && q ) ) { - - if ( pSize !== 0 && ( qSize === 0 || ! q || p.z <= q.z ) ) { - - e = p; - p = p.nextZ; - pSize --; - - } else { - - e = q; - q = q.nextZ; - qSize --; - - } - - if ( tail ) tail.nextZ = e; - else list = e; - - e.prevZ = tail; - tail = e; - - } - - p = q; - - } - - tail.nextZ = null; - inSize *= 2; - - } while ( numMerges > 1 ); - - return list; - -} - -// z-order of a point given coords and inverse of the longer side of data bbox -function zOrder( x, y, minX, minY, invSize ) { - - // coords are transformed into non-negative 15-bit integer range - x = 32767 * ( x - minX ) * invSize; - y = 32767 * ( y - minY ) * invSize; - - x = ( x | ( x << 8 ) ) & 0x00FF00FF; - x = ( x | ( x << 4 ) ) & 0x0F0F0F0F; - x = ( x | ( x << 2 ) ) & 0x33333333; - x = ( x | ( x << 1 ) ) & 0x55555555; - - y = ( y | ( y << 8 ) ) & 0x00FF00FF; - y = ( y | ( y << 4 ) ) & 0x0F0F0F0F; - y = ( y | ( y << 2 ) ) & 0x33333333; - y = ( y | ( y << 1 ) ) & 0x55555555; - - return x | ( y << 1 ); - -} - -// find the leftmost node of a polygon ring -function getLeftmost( start ) { - - let p = start, - leftmost = start; - do { - - if ( p.x < leftmost.x || ( p.x === leftmost.x && p.y < leftmost.y ) ) leftmost = p; - p = p.next; - - } while ( p !== start ); - - return leftmost; - -} - -// check if a point lies within a convex triangle -function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) { - - return ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 && - ( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 && - ( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0; - -} - -// check if a diagonal between two polygon nodes is valid (lies in polygon interior) -function isValidDiagonal( a, b ) { - - return a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges - ( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible - ( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors - equals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case - -} - -// signed area of a triangle -function area( p, q, r ) { - - return ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y ); - -} - -// check if two points are equal -function equals( p1, p2 ) { - - return p1.x === p2.x && p1.y === p2.y; - -} - -// check if two segments intersect -function intersects( p1, q1, p2, q2 ) { - - const o1 = sign( area( p1, q1, p2 ) ); - const o2 = sign( area( p1, q1, q2 ) ); - const o3 = sign( area( p2, q2, p1 ) ); - const o4 = sign( area( p2, q2, q1 ) ); - - if ( o1 !== o2 && o3 !== o4 ) return true; // general case - - if ( o1 === 0 && onSegment( p1, p2, q1 ) ) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1 - if ( o2 === 0 && onSegment( p1, q2, q1 ) ) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1 - if ( o3 === 0 && onSegment( p2, p1, q2 ) ) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2 - if ( o4 === 0 && onSegment( p2, q1, q2 ) ) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2 - - return false; - -} - -// for collinear points p, q, r, check if point q lies on segment pr -function onSegment( p, q, r ) { - - return q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y ); - -} - -function sign( num ) { - - return num > 0 ? 1 : num < 0 ? - 1 : 0; - -} - -// check if a polygon diagonal intersects any polygon segments -function intersectsPolygon( a, b ) { - - let p = a; - do { - - if ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && - intersects( p, p.next, a, b ) ) return true; - p = p.next; - - } while ( p !== a ); - - return false; - -} - -// check if a polygon diagonal is locally inside the polygon -function locallyInside( a, b ) { - - return area( a.prev, a, a.next ) < 0 ? - area( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 : - area( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0; - -} - -// check if the middle point of a polygon diagonal is inside the polygon -function middleInside( a, b ) { - - let p = a, - inside = false; - const px = ( a.x + b.x ) / 2, - py = ( a.y + b.y ) / 2; - do { - - if ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y && - ( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) ) - inside = ! inside; - p = p.next; - - } while ( p !== a ); - - return inside; - -} - -// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two; -// if one belongs to the outer ring and another to a hole, it merges it into a single ring -function splitPolygon( a, b ) { - - const a2 = new Node( a.i, a.x, a.y ), - b2 = new Node( b.i, b.x, b.y ), - an = a.next, - bp = b.prev; - - a.next = b; - b.prev = a; - - a2.next = an; - an.prev = a2; - - b2.next = a2; - a2.prev = b2; - - bp.next = b2; - b2.prev = bp; - - return b2; - -} - -// create a node and optionally link it with previous one (in a circular doubly linked list) -function insertNode( i, x, y, last ) { - - const p = new Node( i, x, y ); - - if ( ! last ) { - - p.prev = p; - p.next = p; - - } else { - - p.next = last.next; - p.prev = last; - last.next.prev = p; - last.next = p; - - } - - return p; - -} - -function removeNode( p ) { - - p.next.prev = p.prev; - p.prev.next = p.next; - - if ( p.prevZ ) p.prevZ.nextZ = p.nextZ; - if ( p.nextZ ) p.nextZ.prevZ = p.prevZ; - -} - -function Node( i, x, y ) { - - // vertex index in coordinates array - this.i = i; - - // vertex coordinates - this.x = x; - this.y = y; - - // previous and next vertex nodes in a polygon ring - this.prev = null; - this.next = null; - - // z-order curve value - this.z = null; - - // previous and next nodes in z-order - this.prevZ = null; - this.nextZ = null; - - // indicates whether this is a steiner point - this.steiner = false; - -} - -function signedArea( data, start, end, dim ) { - - let sum = 0; - for ( let i = start, j = end - dim; i < end; i += dim ) { - - sum += ( data[ j ] - data[ i ] ) * ( data[ i + 1 ] + data[ j + 1 ] ); - j = i; - - } - - return sum; - -} - -class ShapeUtils { - - // calculate area of the contour polygon - - static area( contour ) { - - const n = contour.length; - let a = 0.0; - - for ( let p = n - 1, q = 0; q < n; p = q ++ ) { - - a += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y; - - } - - return a * 0.5; - - } - - static isClockWise( pts ) { - - return ShapeUtils.area( pts ) < 0; - - } - - static triangulateShape( contour, holes ) { - - const vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ] - const holeIndices = []; // array of hole indices - const faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ] - - removeDupEndPts( contour ); - addContour( vertices, contour ); - - // - - let holeIndex = contour.length; - - holes.forEach( removeDupEndPts ); - - for ( let i = 0; i < holes.length; i ++ ) { - - holeIndices.push( holeIndex ); - holeIndex += holes[ i ].length; - addContour( vertices, holes[ i ] ); - - } - - // - - const triangles = Earcut.triangulate( vertices, holeIndices ); - - // - - for ( let i = 0; i < triangles.length; i += 3 ) { - - faces.push( triangles.slice( i, i + 3 ) ); - - } - - return faces; - - } - -} - -function removeDupEndPts( points ) { - - const l = points.length; - - if ( l > 2 && points[ l - 1 ].equals( points[ 0 ] ) ) { - - points.pop(); - - } - -} - -function addContour( vertices, contour ) { - - for ( let i = 0; i < contour.length; i ++ ) { - - vertices.push( contour[ i ].x ); - vertices.push( contour[ i ].y ); - - } - -} - -/** - * Creates extruded geometry from a path shape. - * - * parameters = { - * - * curveSegments: , // number of points on the curves - * steps: , // number of points for z-side extrusions / used for subdividing segments of extrude spline too - * depth: , // Depth to extrude the shape - * - * bevelEnabled: , // turn on bevel - * bevelThickness: , // how deep into the original shape bevel goes - * bevelSize: , // how far from shape outline (including bevelOffset) is bevel - * bevelOffset: , // how far from shape outline does bevel start - * bevelSegments: , // number of bevel layers - * - * extrudePath: // curve to extrude shape along - * - * UVGenerator: // object that provides UV generator functions - * - * } - */ - -class ExtrudeGeometry extends BufferGeometry { - - constructor( shapes, options ) { - - super(); - - this.type = 'ExtrudeGeometry'; - - this.parameters = { - shapes: shapes, - options: options - }; - - shapes = Array.isArray( shapes ) ? shapes : [ shapes ]; - - const scope = this; - - const verticesArray = []; - const uvArray = []; - - for ( let i = 0, l = shapes.length; i < l; i ++ ) { - - const shape = shapes[ i ]; - addShape( shape ); - - } - - // build geometry - - this.setAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvArray, 2 ) ); - - this.computeVertexNormals(); - - // functions - - function addShape( shape ) { - - const placeholder = []; - - // options - - const curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12; - const steps = options.steps !== undefined ? options.steps : 1; - let depth = options.depth !== undefined ? options.depth : 100; - - let bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true; - let bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 6; - let bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 2; - let bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0; - let bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3; - - const extrudePath = options.extrudePath; - - const uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator; - - // deprecated options - - if ( options.amount !== undefined ) { - - console.warn( 'THREE.ExtrudeBufferGeometry: amount has been renamed to depth.' ); - depth = options.amount; - - } - - // - - let extrudePts, extrudeByPath = false; - let splineTube, binormal, normal, position2; - - if ( extrudePath ) { - - extrudePts = extrudePath.getSpacedPoints( steps ); - - extrudeByPath = true; - bevelEnabled = false; // bevels not supported for path extrusion - - // SETUP TNB variables - - // TODO1 - have a .isClosed in spline? - - splineTube = extrudePath.computeFrenetFrames( steps, false ); - - // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length); - - binormal = new Vector3(); - normal = new Vector3(); - position2 = new Vector3(); - - } - - // Safeguards if bevels are not enabled - - if ( ! bevelEnabled ) { - - bevelSegments = 0; - bevelThickness = 0; - bevelSize = 0; - bevelOffset = 0; - - } - - // Variables initialization - - const shapePoints = shape.extractPoints( curveSegments ); - - let vertices = shapePoints.shape; - const holes = shapePoints.holes; - - const reverse = ! ShapeUtils.isClockWise( vertices ); - - if ( reverse ) { - - vertices = vertices.reverse(); - - // Maybe we should also check if holes are in the opposite direction, just to be safe ... - - for ( let h = 0, hl = holes.length; h < hl; h ++ ) { - - const ahole = holes[ h ]; - - if ( ShapeUtils.isClockWise( ahole ) ) { - - holes[ h ] = ahole.reverse(); - - } - - } - - } - - - const faces = ShapeUtils.triangulateShape( vertices, holes ); - - /* Vertices */ - - const contour = vertices; // vertices has all points but contour has only points of circumference - - for ( let h = 0, hl = holes.length; h < hl; h ++ ) { - - const ahole = holes[ h ]; - - vertices = vertices.concat( ahole ); - - } - - - function scalePt2( pt, vec, size ) { - - if ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' ); - - return vec.clone().multiplyScalar( size ).add( pt ); - - } - - const vlen = vertices.length, flen = faces.length; - - - // Find directions for point movement - - - function getBevelVec( inPt, inPrev, inNext ) { - - // computes for inPt the corresponding point inPt' on a new contour - // shifted by 1 unit (length of normalized vector) to the left - // if we walk along contour clockwise, this new contour is outside the old one - // - // inPt' is the intersection of the two lines parallel to the two - // adjacent edges of inPt at a distance of 1 unit on the left side. - - let v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt - - // good reading for geometry algorithms (here: line-line intersection) - // http://geomalgorithms.com/a05-_intersect-1.html - - const v_prev_x = inPt.x - inPrev.x, - v_prev_y = inPt.y - inPrev.y; - const v_next_x = inNext.x - inPt.x, - v_next_y = inNext.y - inPt.y; - - const v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y ); - - // check for collinear edges - const collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x ); - - if ( Math.abs( collinear0 ) > Number.EPSILON ) { - - // not collinear - - // length of vectors for normalizing - - const v_prev_len = Math.sqrt( v_prev_lensq ); - const v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y ); - - // shift adjacent points by unit vectors to the left - - const ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len ); - const ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len ); - - const ptNextShift_x = ( inNext.x - v_next_y / v_next_len ); - const ptNextShift_y = ( inNext.y + v_next_x / v_next_len ); - - // scaling factor for v_prev to intersection point - - const sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y - - ( ptNextShift_y - ptPrevShift_y ) * v_next_x ) / - ( v_prev_x * v_next_y - v_prev_y * v_next_x ); - - // vector from inPt to intersection point - - v_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x ); - v_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y ); - - // Don't normalize!, otherwise sharp corners become ugly - // but prevent crazy spikes - const v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y ); - if ( v_trans_lensq <= 2 ) { - - return new Vector2( v_trans_x, v_trans_y ); - - } else { - - shrink_by = Math.sqrt( v_trans_lensq / 2 ); - - } - - } else { - - // handle special case of collinear edges - - let direction_eq = false; // assumes: opposite - - if ( v_prev_x > Number.EPSILON ) { - - if ( v_next_x > Number.EPSILON ) { - - direction_eq = true; - - } - - } else { - - if ( v_prev_x < - Number.EPSILON ) { - - if ( v_next_x < - Number.EPSILON ) { - - direction_eq = true; - - } - - } else { - - if ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) { - - direction_eq = true; - - } - - } - - } - - if ( direction_eq ) { - - // console.log("Warning: lines are a straight sequence"); - v_trans_x = - v_prev_y; - v_trans_y = v_prev_x; - shrink_by = Math.sqrt( v_prev_lensq ); - - } else { - - // console.log("Warning: lines are a straight spike"); - v_trans_x = v_prev_x; - v_trans_y = v_prev_y; - shrink_by = Math.sqrt( v_prev_lensq / 2 ); - - } - - } - - return new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by ); - - } - - - const contourMovements = []; - - for ( let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) { - - if ( j === il ) j = 0; - if ( k === il ) k = 0; - - // (j)---(i)---(k) - // console.log('i,j,k', i, j , k) - - contourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] ); - - } - - const holesMovements = []; - let oneHoleMovements, verticesMovements = contourMovements.concat(); - - for ( let h = 0, hl = holes.length; h < hl; h ++ ) { - - const ahole = holes[ h ]; - - oneHoleMovements = []; - - for ( let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) { - - if ( j === il ) j = 0; - if ( k === il ) k = 0; - - // (j)---(i)---(k) - oneHoleMovements[ i ] = getBevelVec( ahole[ i ], ahole[ j ], ahole[ k ] ); - - } - - holesMovements.push( oneHoleMovements ); - verticesMovements = verticesMovements.concat( oneHoleMovements ); - - } - - - // Loop bevelSegments, 1 for the front, 1 for the back - - for ( let b = 0; b < bevelSegments; b ++ ) { - - //for ( b = bevelSegments; b > 0; b -- ) { - - const t = b / bevelSegments; - const z = bevelThickness * Math.cos( t * Math.PI / 2 ); - const bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset; - - // contract shape - - for ( let i = 0, il = contour.length; i < il; i ++ ) { - - const vert = scalePt2( contour[ i ], contourMovements[ i ], bs ); - - v( vert.x, vert.y, - z ); - - } - - // expand holes - - for ( let h = 0, hl = holes.length; h < hl; h ++ ) { - - const ahole = holes[ h ]; - oneHoleMovements = holesMovements[ h ]; - - for ( let i = 0, il = ahole.length; i < il; i ++ ) { - - const vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs ); - - v( vert.x, vert.y, - z ); - - } - - } - - } - - const bs = bevelSize + bevelOffset; - - // Back facing vertices - - for ( let i = 0; i < vlen; i ++ ) { - - const vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ]; - - if ( ! extrudeByPath ) { - - v( vert.x, vert.y, 0 ); - - } else { - - // v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x ); - - normal.copy( splineTube.normals[ 0 ] ).multiplyScalar( vert.x ); - binormal.copy( splineTube.binormals[ 0 ] ).multiplyScalar( vert.y ); - - position2.copy( extrudePts[ 0 ] ).add( normal ).add( binormal ); - - v( position2.x, position2.y, position2.z ); - - } - - } - - // Add stepped vertices... - // Including front facing vertices - - for ( let s = 1; s <= steps; s ++ ) { - - for ( let i = 0; i < vlen; i ++ ) { - - const vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ]; - - if ( ! extrudeByPath ) { - - v( vert.x, vert.y, depth / steps * s ); - - } else { - - // v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x ); - - normal.copy( splineTube.normals[ s ] ).multiplyScalar( vert.x ); - binormal.copy( splineTube.binormals[ s ] ).multiplyScalar( vert.y ); - - position2.copy( extrudePts[ s ] ).add( normal ).add( binormal ); - - v( position2.x, position2.y, position2.z ); - - } - - } - - } - - - // Add bevel segments planes - - //for ( b = 1; b <= bevelSegments; b ++ ) { - for ( let b = bevelSegments - 1; b >= 0; b -- ) { - - const t = b / bevelSegments; - const z = bevelThickness * Math.cos( t * Math.PI / 2 ); - const bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset; - - // contract shape - - for ( let i = 0, il = contour.length; i < il; i ++ ) { - - const vert = scalePt2( contour[ i ], contourMovements[ i ], bs ); - v( vert.x, vert.y, depth + z ); - - } - - // expand holes - - for ( let h = 0, hl = holes.length; h < hl; h ++ ) { - - const ahole = holes[ h ]; - oneHoleMovements = holesMovements[ h ]; - - for ( let i = 0, il = ahole.length; i < il; i ++ ) { - - const vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs ); - - if ( ! extrudeByPath ) { - - v( vert.x, vert.y, depth + z ); - - } else { - - v( vert.x, vert.y + extrudePts[ steps - 1 ].y, extrudePts[ steps - 1 ].x + z ); - - } - - } - - } - - } - - /* Faces */ - - // Top and bottom faces - - buildLidFaces(); - - // Sides faces - - buildSideFaces(); - - - ///// Internal functions - - function buildLidFaces() { - - const start = verticesArray.length / 3; - - if ( bevelEnabled ) { - - let layer = 0; // steps + 1 - let offset = vlen * layer; - - // Bottom faces - - for ( let i = 0; i < flen; i ++ ) { - - const face = faces[ i ]; - f3( face[ 2 ] + offset, face[ 1 ] + offset, face[ 0 ] + offset ); - - } - - layer = steps + bevelSegments * 2; - offset = vlen * layer; - - // Top faces - - for ( let i = 0; i < flen; i ++ ) { - - const face = faces[ i ]; - f3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset ); - - } - - } else { - - // Bottom faces - - for ( let i = 0; i < flen; i ++ ) { - - const face = faces[ i ]; - f3( face[ 2 ], face[ 1 ], face[ 0 ] ); - - } - - // Top faces - - for ( let i = 0; i < flen; i ++ ) { - - const face = faces[ i ]; - f3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps ); - - } - - } - - scope.addGroup( start, verticesArray.length / 3 - start, 0 ); - - } - - // Create faces for the z-sides of the shape - - function buildSideFaces() { - - const start = verticesArray.length / 3; - let layeroffset = 0; - sidewalls( contour, layeroffset ); - layeroffset += contour.length; - - for ( let h = 0, hl = holes.length; h < hl; h ++ ) { - - const ahole = holes[ h ]; - sidewalls( ahole, layeroffset ); - - //, true - layeroffset += ahole.length; - - } - - - scope.addGroup( start, verticesArray.length / 3 - start, 1 ); - - - } - - function sidewalls( contour, layeroffset ) { - - let i = contour.length; - - while ( -- i >= 0 ) { - - const j = i; - let k = i - 1; - if ( k < 0 ) k = contour.length - 1; - - //console.log('b', i,j, i-1, k,vertices.length); - - for ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) { - - const slen1 = vlen * s; - const slen2 = vlen * ( s + 1 ); - - const a = layeroffset + j + slen1, - b = layeroffset + k + slen1, - c = layeroffset + k + slen2, - d = layeroffset + j + slen2; - - f4( a, b, c, d ); - - } - - } - - } - - function v( x, y, z ) { - - placeholder.push( x ); - placeholder.push( y ); - placeholder.push( z ); - - } - - - function f3( a, b, c ) { - - addVertex( a ); - addVertex( b ); - addVertex( c ); - - const nextIndex = verticesArray.length / 3; - const uvs = uvgen.generateTopUV( scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1 ); - - addUV( uvs[ 0 ] ); - addUV( uvs[ 1 ] ); - addUV( uvs[ 2 ] ); - - } - - function f4( a, b, c, d ) { - - addVertex( a ); - addVertex( b ); - addVertex( d ); - - addVertex( b ); - addVertex( c ); - addVertex( d ); - - - const nextIndex = verticesArray.length / 3; - const uvs = uvgen.generateSideWallUV( scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1 ); - - addUV( uvs[ 0 ] ); - addUV( uvs[ 1 ] ); - addUV( uvs[ 3 ] ); - - addUV( uvs[ 1 ] ); - addUV( uvs[ 2 ] ); - addUV( uvs[ 3 ] ); - - } - - function addVertex( index ) { - - verticesArray.push( placeholder[ index * 3 + 0 ] ); - verticesArray.push( placeholder[ index * 3 + 1 ] ); - verticesArray.push( placeholder[ index * 3 + 2 ] ); - - } - - - function addUV( vector2 ) { - - uvArray.push( vector2.x ); - uvArray.push( vector2.y ); - - } - - } - - } - - toJSON() { - - const data = super.toJSON(); - - const shapes = this.parameters.shapes; - const options = this.parameters.options; - - return toJSON$1( shapes, options, data ); - - } - - static fromJSON( data, shapes ) { - - const geometryShapes = []; - - for ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) { - - const shape = shapes[ data.shapes[ j ] ]; - - geometryShapes.push( shape ); - - } - - const extrudePath = data.options.extrudePath; - - if ( extrudePath !== undefined ) { - - data.options.extrudePath = new Curves[ extrudePath.type ]().fromJSON( extrudePath ); - - } - - return new ExtrudeGeometry( geometryShapes, data.options ); - - } - -} - -const WorldUVGenerator = { - - generateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) { - - const a_x = vertices[ indexA * 3 ]; - const a_y = vertices[ indexA * 3 + 1 ]; - const b_x = vertices[ indexB * 3 ]; - const b_y = vertices[ indexB * 3 + 1 ]; - const c_x = vertices[ indexC * 3 ]; - const c_y = vertices[ indexC * 3 + 1 ]; - - return [ - new Vector2( a_x, a_y ), - new Vector2( b_x, b_y ), - new Vector2( c_x, c_y ) - ]; - - }, - - generateSideWallUV: function ( geometry, vertices, indexA, indexB, indexC, indexD ) { - - const a_x = vertices[ indexA * 3 ]; - const a_y = vertices[ indexA * 3 + 1 ]; - const a_z = vertices[ indexA * 3 + 2 ]; - const b_x = vertices[ indexB * 3 ]; - const b_y = vertices[ indexB * 3 + 1 ]; - const b_z = vertices[ indexB * 3 + 2 ]; - const c_x = vertices[ indexC * 3 ]; - const c_y = vertices[ indexC * 3 + 1 ]; - const c_z = vertices[ indexC * 3 + 2 ]; - const d_x = vertices[ indexD * 3 ]; - const d_y = vertices[ indexD * 3 + 1 ]; - const d_z = vertices[ indexD * 3 + 2 ]; - - if ( Math.abs( a_y - b_y ) < Math.abs( a_x - b_x ) ) { - - return [ - new Vector2( a_x, 1 - a_z ), - new Vector2( b_x, 1 - b_z ), - new Vector2( c_x, 1 - c_z ), - new Vector2( d_x, 1 - d_z ) - ]; - - } else { - - return [ - new Vector2( a_y, 1 - a_z ), - new Vector2( b_y, 1 - b_z ), - new Vector2( c_y, 1 - c_z ), - new Vector2( d_y, 1 - d_z ) - ]; - - } - - } - -}; - -function toJSON$1( shapes, options, data ) { - - data.shapes = []; - - if ( Array.isArray( shapes ) ) { - - for ( let i = 0, l = shapes.length; i < l; i ++ ) { - - const shape = shapes[ i ]; - - data.shapes.push( shape.uuid ); - - } - - } else { - - data.shapes.push( shapes.uuid ); - - } - - if ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON(); - - return data; - -} - -class IcosahedronGeometry extends PolyhedronGeometry { - - constructor( radius = 1, detail = 0 ) { - - const t = ( 1 + Math.sqrt( 5 ) ) / 2; - - const vertices = [ - - 1, t, 0, 1, t, 0, - 1, - t, 0, 1, - t, 0, - 0, - 1, t, 0, 1, t, 0, - 1, - t, 0, 1, - t, - t, 0, - 1, t, 0, 1, - t, 0, - 1, - t, 0, 1 - ]; - - const indices = [ - 0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, - 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, - 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, - 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1 - ]; - - super( vertices, indices, radius, detail ); - - this.type = 'IcosahedronGeometry'; - - this.parameters = { - radius: radius, - detail: detail - }; - - } - - static fromJSON( data ) { - - return new IcosahedronGeometry( data.radius, data.detail ); - - } - -} - -class LatheGeometry extends BufferGeometry { - - constructor( points, segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) { - - super(); - - this.type = 'LatheGeometry'; - - this.parameters = { - points: points, - segments: segments, - phiStart: phiStart, - phiLength: phiLength - }; - - segments = Math.floor( segments ); - - // clamp phiLength so it's in range of [ 0, 2PI ] - - phiLength = clamp( phiLength, 0, Math.PI * 2 ); - - // buffers - - const indices = []; - const vertices = []; - const uvs = []; - - // helper variables - - const inverseSegments = 1.0 / segments; - const vertex = new Vector3(); - const uv = new Vector2(); - - // generate vertices and uvs - - for ( let i = 0; i <= segments; i ++ ) { - - const phi = phiStart + i * inverseSegments * phiLength; - - const sin = Math.sin( phi ); - const cos = Math.cos( phi ); - - for ( let j = 0; j <= ( points.length - 1 ); j ++ ) { - - // vertex - - vertex.x = points[ j ].x * sin; - vertex.y = points[ j ].y; - vertex.z = points[ j ].x * cos; - - vertices.push( vertex.x, vertex.y, vertex.z ); - - // uv - - uv.x = i / segments; - uv.y = j / ( points.length - 1 ); - - uvs.push( uv.x, uv.y ); - - - } - - } - - // indices - - for ( let i = 0; i < segments; i ++ ) { - - for ( let j = 0; j < ( points.length - 1 ); j ++ ) { - - const base = j + i * points.length; - - const a = base; - const b = base + points.length; - const c = base + points.length + 1; - const d = base + 1; - - // faces - - indices.push( a, b, d ); - indices.push( b, c, d ); - - } - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - // generate normals - - this.computeVertexNormals(); - - // if the geometry is closed, we need to average the normals along the seam. - // because the corresponding vertices are identical (but still have different UVs). - - if ( phiLength === Math.PI * 2 ) { - - const normals = this.attributes.normal.array; - const n1 = new Vector3(); - const n2 = new Vector3(); - const n = new Vector3(); - - // this is the buffer offset for the last line of vertices - - const base = segments * points.length * 3; - - for ( let i = 0, j = 0; i < points.length; i ++, j += 3 ) { - - // select the normal of the vertex in the first line - - n1.x = normals[ j + 0 ]; - n1.y = normals[ j + 1 ]; - n1.z = normals[ j + 2 ]; - - // select the normal of the vertex in the last line - - n2.x = normals[ base + j + 0 ]; - n2.y = normals[ base + j + 1 ]; - n2.z = normals[ base + j + 2 ]; - - // average normals - - n.addVectors( n1, n2 ).normalize(); - - // assign the new values to both normals - - normals[ j + 0 ] = normals[ base + j + 0 ] = n.x; - normals[ j + 1 ] = normals[ base + j + 1 ] = n.y; - normals[ j + 2 ] = normals[ base + j + 2 ] = n.z; - - } - - } - - } - - static fromJSON( data ) { - - return new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength ); - - } - -} - -class OctahedronGeometry extends PolyhedronGeometry { - - constructor( radius = 1, detail = 0 ) { - - const vertices = [ - 1, 0, 0, - 1, 0, 0, 0, 1, 0, - 0, - 1, 0, 0, 0, 1, 0, 0, - 1 - ]; - - const indices = [ - 0, 2, 4, 0, 4, 3, 0, 3, 5, - 0, 5, 2, 1, 2, 5, 1, 5, 3, - 1, 3, 4, 1, 4, 2 - ]; - - super( vertices, indices, radius, detail ); - - this.type = 'OctahedronGeometry'; - - this.parameters = { - radius: radius, - detail: detail - }; - - } - - static fromJSON( data ) { - - return new OctahedronGeometry( data.radius, data.detail ); - - } - -} - -/** - * Parametric Surfaces Geometry - * based on the brilliant article by @prideout https://prideout.net/blog/old/blog/index.html@p=44.html - */ - -class ParametricGeometry extends BufferGeometry { - - constructor( func, slices, stacks ) { - - super(); - - this.type = 'ParametricGeometry'; - - this.parameters = { - func: func, - slices: slices, - stacks: stacks - }; - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - const EPS = 0.00001; - - const normal = new Vector3(); - - const p0 = new Vector3(), p1 = new Vector3(); - const pu = new Vector3(), pv = new Vector3(); - - if ( func.length < 3 ) { - - console.error( 'THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.' ); - - } - - // generate vertices, normals and uvs - - const sliceCount = slices + 1; - - for ( let i = 0; i <= stacks; i ++ ) { - - const v = i / stacks; - - for ( let j = 0; j <= slices; j ++ ) { - - const u = j / slices; - - // vertex - - func( u, v, p0 ); - vertices.push( p0.x, p0.y, p0.z ); - - // normal - - // approximate tangent vectors via finite differences - - if ( u - EPS >= 0 ) { - - func( u - EPS, v, p1 ); - pu.subVectors( p0, p1 ); - - } else { - - func( u + EPS, v, p1 ); - pu.subVectors( p1, p0 ); - - } - - if ( v - EPS >= 0 ) { - - func( u, v - EPS, p1 ); - pv.subVectors( p0, p1 ); - - } else { - - func( u, v + EPS, p1 ); - pv.subVectors( p1, p0 ); - - } - - // cross product of tangent vectors returns surface normal - - normal.crossVectors( pu, pv ).normalize(); - normals.push( normal.x, normal.y, normal.z ); - - // uv - - uvs.push( u, v ); - - } - - } - - // generate indices - - for ( let i = 0; i < stacks; i ++ ) { - - for ( let j = 0; j < slices; j ++ ) { - - const a = i * sliceCount + j; - const b = i * sliceCount + j + 1; - const c = ( i + 1 ) * sliceCount + j + 1; - const d = ( i + 1 ) * sliceCount + j; - - // faces one and two - - indices.push( a, b, d ); - indices.push( b, c, d ); - - } - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - } - -} - -class RingGeometry extends BufferGeometry { - - constructor( innerRadius = 0.5, outerRadius = 1, thetaSegments = 8, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2 ) { - - super(); - - this.type = 'RingGeometry'; - - this.parameters = { - innerRadius: innerRadius, - outerRadius: outerRadius, - thetaSegments: thetaSegments, - phiSegments: phiSegments, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - - thetaSegments = Math.max( 3, thetaSegments ); - phiSegments = Math.max( 1, phiSegments ); - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - // some helper variables - - let radius = innerRadius; - const radiusStep = ( ( outerRadius - innerRadius ) / phiSegments ); - const vertex = new Vector3(); - const uv = new Vector2(); - - // generate vertices, normals and uvs - - for ( let j = 0; j <= phiSegments; j ++ ) { - - for ( let i = 0; i <= thetaSegments; i ++ ) { - - // values are generate from the inside of the ring to the outside - - const segment = thetaStart + i / thetaSegments * thetaLength; - - // vertex - - vertex.x = radius * Math.cos( segment ); - vertex.y = radius * Math.sin( segment ); - - vertices.push( vertex.x, vertex.y, vertex.z ); - - // normal - - normals.push( 0, 0, 1 ); - - // uv - - uv.x = ( vertex.x / outerRadius + 1 ) / 2; - uv.y = ( vertex.y / outerRadius + 1 ) / 2; - - uvs.push( uv.x, uv.y ); - - } - - // increase the radius for next row of vertices - - radius += radiusStep; - - } - - // indices - - for ( let j = 0; j < phiSegments; j ++ ) { - - const thetaSegmentLevel = j * ( thetaSegments + 1 ); - - for ( let i = 0; i < thetaSegments; i ++ ) { - - const segment = i + thetaSegmentLevel; - - const a = segment; - const b = segment + thetaSegments + 1; - const c = segment + thetaSegments + 2; - const d = segment + 1; - - // faces - - indices.push( a, b, d ); - indices.push( b, c, d ); - - } - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - } - - static fromJSON( data ) { - - return new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength ); - - } - -} - -class ShapeGeometry extends BufferGeometry { - - constructor( shapes, curveSegments = 12 ) { - - super(); - this.type = 'ShapeGeometry'; - - this.parameters = { - shapes: shapes, - curveSegments: curveSegments - }; - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - // helper variables - - let groupStart = 0; - let groupCount = 0; - - // allow single and array values for "shapes" parameter - - if ( Array.isArray( shapes ) === false ) { - - addShape( shapes ); - - } else { - - for ( let i = 0; i < shapes.length; i ++ ) { - - addShape( shapes[ i ] ); - - this.addGroup( groupStart, groupCount, i ); // enables MultiMaterial support - - groupStart += groupCount; - groupCount = 0; - - } - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - - // helper functions - - function addShape( shape ) { - - const indexOffset = vertices.length / 3; - const points = shape.extractPoints( curveSegments ); - - let shapeVertices = points.shape; - const shapeHoles = points.holes; - - // check direction of vertices - - if ( ShapeUtils.isClockWise( shapeVertices ) === false ) { - - shapeVertices = shapeVertices.reverse(); - - } - - for ( let i = 0, l = shapeHoles.length; i < l; i ++ ) { - - const shapeHole = shapeHoles[ i ]; - - if ( ShapeUtils.isClockWise( shapeHole ) === true ) { - - shapeHoles[ i ] = shapeHole.reverse(); - - } - - } - - const faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles ); - - // join vertices of inner and outer paths to a single array - - for ( let i = 0, l = shapeHoles.length; i < l; i ++ ) { - - const shapeHole = shapeHoles[ i ]; - shapeVertices = shapeVertices.concat( shapeHole ); - - } - - // vertices, normals, uvs - - for ( let i = 0, l = shapeVertices.length; i < l; i ++ ) { - - const vertex = shapeVertices[ i ]; - - vertices.push( vertex.x, vertex.y, 0 ); - normals.push( 0, 0, 1 ); - uvs.push( vertex.x, vertex.y ); // world uvs - - } - - // incides - - for ( let i = 0, l = faces.length; i < l; i ++ ) { - - const face = faces[ i ]; - - const a = face[ 0 ] + indexOffset; - const b = face[ 1 ] + indexOffset; - const c = face[ 2 ] + indexOffset; - - indices.push( a, b, c ); - groupCount += 3; - - } - - } - - } - - toJSON() { - - const data = super.toJSON(); - - const shapes = this.parameters.shapes; - - return toJSON( shapes, data ); - - } - - static fromJSON( data, shapes ) { - - const geometryShapes = []; - - for ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) { - - const shape = shapes[ data.shapes[ j ] ]; - - geometryShapes.push( shape ); - - } - - return new ShapeGeometry( geometryShapes, data.curveSegments ); - - } - -} - -function toJSON( shapes, data ) { - - data.shapes = []; - - if ( Array.isArray( shapes ) ) { - - for ( let i = 0, l = shapes.length; i < l; i ++ ) { - - const shape = shapes[ i ]; - - data.shapes.push( shape.uuid ); - - } - - } else { - - data.shapes.push( shapes.uuid ); - - } - - return data; - -} - -class SphereGeometry extends BufferGeometry { - - constructor( radius = 1, widthSegments = 8, heightSegments = 6, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) { - - super(); - this.type = 'SphereGeometry'; - - this.parameters = { - radius: radius, - widthSegments: widthSegments, - heightSegments: heightSegments, - phiStart: phiStart, - phiLength: phiLength, - thetaStart: thetaStart, - thetaLength: thetaLength - }; - - widthSegments = Math.max( 3, Math.floor( widthSegments ) ); - heightSegments = Math.max( 2, Math.floor( heightSegments ) ); - - const thetaEnd = Math.min( thetaStart + thetaLength, Math.PI ); - - let index = 0; - const grid = []; - - const vertex = new Vector3(); - const normal = new Vector3(); - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - // generate vertices, normals and uvs - - for ( let iy = 0; iy <= heightSegments; iy ++ ) { - - const verticesRow = []; - - const v = iy / heightSegments; - - // special case for the poles - - let uOffset = 0; - - if ( iy == 0 && thetaStart == 0 ) { - - uOffset = 0.5 / widthSegments; - - } else if ( iy == heightSegments && thetaEnd == Math.PI ) { - - uOffset = - 0.5 / widthSegments; - - } - - for ( let ix = 0; ix <= widthSegments; ix ++ ) { - - const u = ix / widthSegments; - - // vertex - - vertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength ); - vertex.y = radius * Math.cos( thetaStart + v * thetaLength ); - vertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength ); - - vertices.push( vertex.x, vertex.y, vertex.z ); - - // normal - - normal.copy( vertex ).normalize(); - normals.push( normal.x, normal.y, normal.z ); - - // uv - - uvs.push( u + uOffset, 1 - v ); - - verticesRow.push( index ++ ); - - } - - grid.push( verticesRow ); - - } - - // indices - - for ( let iy = 0; iy < heightSegments; iy ++ ) { - - for ( let ix = 0; ix < widthSegments; ix ++ ) { - - const a = grid[ iy ][ ix + 1 ]; - const b = grid[ iy ][ ix ]; - const c = grid[ iy + 1 ][ ix ]; - const d = grid[ iy + 1 ][ ix + 1 ]; - - if ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d ); - if ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d ); - - } - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - } - - static fromJSON( data ) { - - return new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength ); - - } - -} - -class TetrahedronGeometry extends PolyhedronGeometry { - - constructor( radius = 1, detail = 0 ) { - - const vertices = [ - 1, 1, 1, - 1, - 1, 1, - 1, 1, - 1, 1, - 1, - 1 - ]; - - const indices = [ - 2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1 - ]; - - super( vertices, indices, radius, detail ); - - this.type = 'TetrahedronGeometry'; - - this.parameters = { - radius: radius, - detail: detail - }; - - } - - static fromJSON( data ) { - - return new TetrahedronGeometry( data.radius, data.detail ); - - } - -} - -/** - * Text = 3D Text - * - * parameters = { - * font: , // font - * - * size: , // size of the text - * height: , // thickness to extrude text - * curveSegments: , // number of points on the curves - * - * bevelEnabled: , // turn on bevel - * bevelThickness: , // how deep into text bevel goes - * bevelSize: , // how far from text outline (including bevelOffset) is bevel - * bevelOffset: // how far from text outline does bevel start - * } - */ - -class TextGeometry extends ExtrudeGeometry { - - constructor( text, parameters = {} ) { - - const font = parameters.font; - - if ( ! ( font && font.isFont ) ) { - - console.error( 'THREE.TextGeometry: font parameter is not an instance of THREE.Font.' ); - return new BufferGeometry(); - - } - - const shapes = font.generateShapes( text, parameters.size ); - - // translate parameters to ExtrudeGeometry API - - parameters.depth = parameters.height !== undefined ? parameters.height : 50; - - // defaults - - if ( parameters.bevelThickness === undefined ) parameters.bevelThickness = 10; - if ( parameters.bevelSize === undefined ) parameters.bevelSize = 8; - if ( parameters.bevelEnabled === undefined ) parameters.bevelEnabled = false; - - super( shapes, parameters ); - - this.type = 'TextGeometry'; - - } - -} - -class TorusGeometry extends BufferGeometry { - - constructor( radius = 1, tube = 0.4, radialSegments = 8, tubularSegments = 6, arc = Math.PI * 2 ) { - - super(); - this.type = 'TorusGeometry'; - - this.parameters = { - radius: radius, - tube: tube, - radialSegments: radialSegments, - tubularSegments: tubularSegments, - arc: arc - }; - - radialSegments = Math.floor( radialSegments ); - tubularSegments = Math.floor( tubularSegments ); - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - // helper variables - - const center = new Vector3(); - const vertex = new Vector3(); - const normal = new Vector3(); - - // generate vertices, normals and uvs - - for ( let j = 0; j <= radialSegments; j ++ ) { - - for ( let i = 0; i <= tubularSegments; i ++ ) { - - const u = i / tubularSegments * arc; - const v = j / radialSegments * Math.PI * 2; - - // vertex - - vertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u ); - vertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u ); - vertex.z = tube * Math.sin( v ); - - vertices.push( vertex.x, vertex.y, vertex.z ); - - // normal - - center.x = radius * Math.cos( u ); - center.y = radius * Math.sin( u ); - normal.subVectors( vertex, center ).normalize(); - - normals.push( normal.x, normal.y, normal.z ); - - // uv - - uvs.push( i / tubularSegments ); - uvs.push( j / radialSegments ); - - } - - } - - // generate indices - - for ( let j = 1; j <= radialSegments; j ++ ) { - - for ( let i = 1; i <= tubularSegments; i ++ ) { - - // indices - - const a = ( tubularSegments + 1 ) * j + i - 1; - const b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1; - const c = ( tubularSegments + 1 ) * ( j - 1 ) + i; - const d = ( tubularSegments + 1 ) * j + i; - - // faces - - indices.push( a, b, d ); - indices.push( b, c, d ); - - } - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - } - - static fromJSON( data ) { - - return new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc ); - - } - -} - -class TorusKnotGeometry extends BufferGeometry { - - constructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) { - - super(); - this.type = 'TorusKnotGeometry'; - - this.parameters = { - radius: radius, - tube: tube, - tubularSegments: tubularSegments, - radialSegments: radialSegments, - p: p, - q: q - }; - - tubularSegments = Math.floor( tubularSegments ); - radialSegments = Math.floor( radialSegments ); - - // buffers - - const indices = []; - const vertices = []; - const normals = []; - const uvs = []; - - // helper variables - - const vertex = new Vector3(); - const normal = new Vector3(); - - const P1 = new Vector3(); - const P2 = new Vector3(); - - const B = new Vector3(); - const T = new Vector3(); - const N = new Vector3(); - - // generate vertices, normals and uvs - - for ( let i = 0; i <= tubularSegments; ++ i ) { - - // the radian "u" is used to calculate the position on the torus curve of the current tubular segement - - const u = i / tubularSegments * p * Math.PI * 2; - - // now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead. - // these points are used to create a special "coordinate space", which is necessary to calculate the correct vertex positions - - calculatePositionOnCurve( u, p, q, radius, P1 ); - calculatePositionOnCurve( u + 0.01, p, q, radius, P2 ); - - // calculate orthonormal basis - - T.subVectors( P2, P1 ); - N.addVectors( P2, P1 ); - B.crossVectors( T, N ); - N.crossVectors( B, T ); - - // normalize B, N. T can be ignored, we don't use it - - B.normalize(); - N.normalize(); - - for ( let j = 0; j <= radialSegments; ++ j ) { - - // now calculate the vertices. they are nothing more than an extrusion of the torus curve. - // because we extrude a shape in the xy-plane, there is no need to calculate a z-value. - - const v = j / radialSegments * Math.PI * 2; - const cx = - tube * Math.cos( v ); - const cy = tube * Math.sin( v ); - - // now calculate the final vertex position. - // first we orient the extrusion with our basis vectos, then we add it to the current position on the curve - - vertex.x = P1.x + ( cx * N.x + cy * B.x ); - vertex.y = P1.y + ( cx * N.y + cy * B.y ); - vertex.z = P1.z + ( cx * N.z + cy * B.z ); - - vertices.push( vertex.x, vertex.y, vertex.z ); - - // normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal) - - normal.subVectors( vertex, P1 ).normalize(); - - normals.push( normal.x, normal.y, normal.z ); - - // uv - - uvs.push( i / tubularSegments ); - uvs.push( j / radialSegments ); - - } - - } - - // generate indices - - for ( let j = 1; j <= tubularSegments; j ++ ) { - - for ( let i = 1; i <= radialSegments; i ++ ) { - - // indices - - const a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 ); - const b = ( radialSegments + 1 ) * j + ( i - 1 ); - const c = ( radialSegments + 1 ) * j + i; - const d = ( radialSegments + 1 ) * ( j - 1 ) + i; - - // faces - - indices.push( a, b, d ); - indices.push( b, c, d ); - - } - - } - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - // this function calculates the current position on the torus curve - - function calculatePositionOnCurve( u, p, q, radius, position ) { - - const cu = Math.cos( u ); - const su = Math.sin( u ); - const quOverP = q / p * u; - const cs = Math.cos( quOverP ); - - position.x = radius * ( 2 + cs ) * 0.5 * cu; - position.y = radius * ( 2 + cs ) * su * 0.5; - position.z = radius * Math.sin( quOverP ) * 0.5; - - } - - } - - static fromJSON( data ) { - - return new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q ); - - } - -} - -class TubeGeometry extends BufferGeometry { - - constructor( path, tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) { - - super(); - this.type = 'TubeGeometry'; - - this.parameters = { - path: path, - tubularSegments: tubularSegments, - radius: radius, - radialSegments: radialSegments, - closed: closed - }; - - const frames = path.computeFrenetFrames( tubularSegments, closed ); - - // expose internals - - this.tangents = frames.tangents; - this.normals = frames.normals; - this.binormals = frames.binormals; - - // helper variables - - const vertex = new Vector3(); - const normal = new Vector3(); - const uv = new Vector2(); - let P = new Vector3(); - - // buffer - - const vertices = []; - const normals = []; - const uvs = []; - const indices = []; - - // create buffer data - - generateBufferData(); - - // build geometry - - this.setIndex( indices ); - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - this.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) ); - this.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) ); - - // functions - - function generateBufferData() { - - for ( let i = 0; i < tubularSegments; i ++ ) { - - generateSegment( i ); - - } - - // if the geometry is not closed, generate the last row of vertices and normals - // at the regular position on the given path - // - // if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ) - - generateSegment( ( closed === false ) ? tubularSegments : 0 ); - - // uvs are generated in a separate function. - // this makes it easy compute correct values for closed geometries - - generateUVs(); - - // finally create faces - - generateIndices(); - - } - - function generateSegment( i ) { - - // we use getPointAt to sample evenly distributed points from the given path - - P = path.getPointAt( i / tubularSegments, P ); - - // retrieve corresponding normal and binormal - - const N = frames.normals[ i ]; - const B = frames.binormals[ i ]; - - // generate normals and vertices for the current segment - - for ( let j = 0; j <= radialSegments; j ++ ) { - - const v = j / radialSegments * Math.PI * 2; - - const sin = Math.sin( v ); - const cos = - Math.cos( v ); - - // normal - - normal.x = ( cos * N.x + sin * B.x ); - normal.y = ( cos * N.y + sin * B.y ); - normal.z = ( cos * N.z + sin * B.z ); - normal.normalize(); - - normals.push( normal.x, normal.y, normal.z ); - - // vertex - - vertex.x = P.x + radius * normal.x; - vertex.y = P.y + radius * normal.y; - vertex.z = P.z + radius * normal.z; - - vertices.push( vertex.x, vertex.y, vertex.z ); - - } - - } - - function generateIndices() { - - for ( let j = 1; j <= tubularSegments; j ++ ) { - - for ( let i = 1; i <= radialSegments; i ++ ) { - - const a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 ); - const b = ( radialSegments + 1 ) * j + ( i - 1 ); - const c = ( radialSegments + 1 ) * j + i; - const d = ( radialSegments + 1 ) * ( j - 1 ) + i; - - // faces - - indices.push( a, b, d ); - indices.push( b, c, d ); - - } - - } - - } - - function generateUVs() { - - for ( let i = 0; i <= tubularSegments; i ++ ) { - - for ( let j = 0; j <= radialSegments; j ++ ) { - - uv.x = i / tubularSegments; - uv.y = j / radialSegments; - - uvs.push( uv.x, uv.y ); - - } - - } - - } - - } - - toJSON() { - - const data = super.toJSON(); - - data.path = this.parameters.path.toJSON(); - - return data; - - } - - static fromJSON( data ) { - - // This only works for built-in curves (e.g. CatmullRomCurve3). - // User defined curves or instances of CurvePath will not be deserialized. - return new TubeGeometry( - new Curves[ data.path.type ]().fromJSON( data.path ), - data.tubularSegments, - data.radius, - data.radialSegments, - data.closed - ); - - } - -} - -class WireframeGeometry extends BufferGeometry { - - constructor( geometry ) { - - super(); - this.type = 'WireframeGeometry'; - - if ( geometry.isGeometry === true ) { - - console.error( 'THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' ); - return; - - } - - // buffer - - const vertices = []; - - // helper variables - - const edge = [ 0, 0 ], edges = {}; - - const vertex = new Vector3(); - - if ( geometry.index !== null ) { - - // indexed BufferGeometry - - const position = geometry.attributes.position; - const indices = geometry.index; - let groups = geometry.groups; - - if ( groups.length === 0 ) { - - groups = [ { start: 0, count: indices.count, materialIndex: 0 } ]; - - } - - // create a data structure that contains all eges without duplicates - - for ( let o = 0, ol = groups.length; o < ol; ++ o ) { - - const group = groups[ o ]; - - const start = group.start; - const count = group.count; - - for ( let i = start, l = ( start + count ); i < l; i += 3 ) { - - for ( let j = 0; j < 3; j ++ ) { - - const edge1 = indices.getX( i + j ); - const edge2 = indices.getX( i + ( j + 1 ) % 3 ); - edge[ 0 ] = Math.min( edge1, edge2 ); // sorting prevents duplicates - edge[ 1 ] = Math.max( edge1, edge2 ); - - const key = edge[ 0 ] + ',' + edge[ 1 ]; - - if ( edges[ key ] === undefined ) { - - edges[ key ] = { index1: edge[ 0 ], index2: edge[ 1 ] }; - - } - - } - - } - - } - - // generate vertices - - for ( const key in edges ) { - - const e = edges[ key ]; - - vertex.fromBufferAttribute( position, e.index1 ); - vertices.push( vertex.x, vertex.y, vertex.z ); - - vertex.fromBufferAttribute( position, e.index2 ); - vertices.push( vertex.x, vertex.y, vertex.z ); - - } - - } else { - - // non-indexed BufferGeometry - - const position = geometry.attributes.position; - - for ( let i = 0, l = ( position.count / 3 ); i < l; i ++ ) { - - for ( let j = 0; j < 3; j ++ ) { - - // three edges per triangle, an edge is represented as (index1, index2) - // e.g. the first triangle has the following edges: (0,1),(1,2),(2,0) - - const index1 = 3 * i + j; - vertex.fromBufferAttribute( position, index1 ); - vertices.push( vertex.x, vertex.y, vertex.z ); - - const index2 = 3 * i + ( ( j + 1 ) % 3 ); - vertex.fromBufferAttribute( position, index2 ); - vertices.push( vertex.x, vertex.y, vertex.z ); - - } - - } - - } - - // build geometry - - this.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - - } - -} - -var Geometries = /*#__PURE__*/Object.freeze({ - __proto__: null, - BoxGeometry: BoxGeometry, - BoxBufferGeometry: BoxGeometry, - CircleGeometry: CircleGeometry, - CircleBufferGeometry: CircleGeometry, - ConeGeometry: ConeGeometry, - ConeBufferGeometry: ConeGeometry, - CylinderGeometry: CylinderGeometry, - CylinderBufferGeometry: CylinderGeometry, - DodecahedronGeometry: DodecahedronGeometry, - DodecahedronBufferGeometry: DodecahedronGeometry, - EdgesGeometry: EdgesGeometry, - ExtrudeGeometry: ExtrudeGeometry, - ExtrudeBufferGeometry: ExtrudeGeometry, - IcosahedronGeometry: IcosahedronGeometry, - IcosahedronBufferGeometry: IcosahedronGeometry, - LatheGeometry: LatheGeometry, - LatheBufferGeometry: LatheGeometry, - OctahedronGeometry: OctahedronGeometry, - OctahedronBufferGeometry: OctahedronGeometry, - ParametricGeometry: ParametricGeometry, - ParametricBufferGeometry: ParametricGeometry, - PlaneGeometry: PlaneGeometry, - PlaneBufferGeometry: PlaneGeometry, - PolyhedronGeometry: PolyhedronGeometry, - PolyhedronBufferGeometry: PolyhedronGeometry, - RingGeometry: RingGeometry, - RingBufferGeometry: RingGeometry, - ShapeGeometry: ShapeGeometry, - ShapeBufferGeometry: ShapeGeometry, - SphereGeometry: SphereGeometry, - SphereBufferGeometry: SphereGeometry, - TetrahedronGeometry: TetrahedronGeometry, - TetrahedronBufferGeometry: TetrahedronGeometry, - TextGeometry: TextGeometry, - TextBufferGeometry: TextGeometry, - TorusGeometry: TorusGeometry, - TorusBufferGeometry: TorusGeometry, - TorusKnotGeometry: TorusKnotGeometry, - TorusKnotBufferGeometry: TorusKnotGeometry, - TubeGeometry: TubeGeometry, - TubeBufferGeometry: TubeGeometry, - WireframeGeometry: WireframeGeometry -}); - -/** - * parameters = { - * color: - * } - */ - -class ShadowMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'ShadowMaterial'; - - this.color = new Color( 0x000000 ); - this.transparent = true; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - - return this; - - } - -} - -ShadowMaterial.prototype.isShadowMaterial = true; - -class RawShaderMaterial extends ShaderMaterial { - - constructor( parameters ) { - - super( parameters ); - - this.type = 'RawShaderMaterial'; - - } - -} - -RawShaderMaterial.prototype.isRawShaderMaterial = true; - -/** - * parameters = { - * color: , - * roughness: , - * metalness: , - * opacity: , - * - * map: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * emissive: , - * emissiveIntensity: - * emissiveMap: new THREE.Texture( ), - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * roughnessMap: new THREE.Texture( ), - * - * metalnessMap: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ), - * envMapIntensity: - * - * refractionRatio: , - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: , - * morphNormals: , - * - * flatShading: - * } - */ - -class MeshStandardMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.defines = { 'STANDARD': '' }; - - this.type = 'MeshStandardMaterial'; - - this.color = new Color( 0xffffff ); // diffuse - this.roughness = 1.0; - this.metalness = 0.0; - - this.map = null; - - this.lightMap = null; - this.lightMapIntensity = 1.0; - - this.aoMap = null; - this.aoMapIntensity = 1.0; - - this.emissive = new Color( 0x000000 ); - this.emissiveIntensity = 1.0; - this.emissiveMap = null; - - this.bumpMap = null; - this.bumpScale = 1; - - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2( 1, 1 ); - - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - - this.roughnessMap = null; - - this.metalnessMap = null; - - this.alphaMap = null; - - this.envMap = null; - this.envMapIntensity = 1.0; - - this.refractionRatio = 0.98; - - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - - this.morphTargets = false; - this.morphNormals = false; - - this.flatShading = false; - - this.vertexTangents = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.defines = { 'STANDARD': '' }; - - this.color.copy( source.color ); - this.roughness = source.roughness; - this.metalness = source.metalness; - - this.map = source.map; - - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - - this.emissive.copy( source.emissive ); - this.emissiveMap = source.emissiveMap; - this.emissiveIntensity = source.emissiveIntensity; - - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy( source.normalScale ); - - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - - this.roughnessMap = source.roughnessMap; - - this.metalnessMap = source.metalnessMap; - - this.alphaMap = source.alphaMap; - - this.envMap = source.envMap; - this.envMapIntensity = source.envMapIntensity; - - this.refractionRatio = source.refractionRatio; - - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - - this.flatShading = source.flatShading; - - this.vertexTangents = source.vertexTangents; - - return this; - - } - -} - -MeshStandardMaterial.prototype.isMeshStandardMaterial = true; - -/** - * parameters = { - * clearcoat: , - * clearcoatMap: new THREE.Texture( ), - * clearcoatRoughness: , - * clearcoatRoughnessMap: new THREE.Texture( ), - * clearcoatNormalScale: , - * clearcoatNormalMap: new THREE.Texture( ), - * - * reflectivity: , - * ior: , - * - * sheen: , - * - * transmission: , - * transmissionMap: new THREE.Texture( ), - * - * thickness: , - * thicknessMap: new THREE.Texture( ), - * attenuationDistance: , - * attenuationColor: - * } - */ - -class MeshPhysicalMaterial extends MeshStandardMaterial { - - constructor( parameters ) { - - super(); - - this.defines = { - - 'STANDARD': '', - 'PHYSICAL': '' - - }; - - this.type = 'MeshPhysicalMaterial'; - - this.clearcoat = 0.0; - this.clearcoatMap = null; - this.clearcoatRoughness = 0.0; - this.clearcoatRoughnessMap = null; - this.clearcoatNormalScale = new Vector2( 1, 1 ); - this.clearcoatNormalMap = null; - - this.reflectivity = 0.5; // maps to F0 = 0.04 - - Object.defineProperty( this, 'ior', { - get: function () { - - return ( 1 + 0.4 * this.reflectivity ) / ( 1 - 0.4 * this.reflectivity ); - - }, - set: function ( ior ) { - - this.reflectivity = clamp( 2.5 * ( ior - 1 ) / ( ior + 1 ), 0, 1 ); - - } - } ); - - this.sheen = null; // null will disable sheen bsdf - - this.transmission = 0.0; - this.transmissionMap = null; - - this.thickness = 0.01; - this.thicknessMap = null; - this.attenuationDistance = 0.0; - this.attenuationColor = new Color( 1, 1, 1 ); - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.defines = { - - 'STANDARD': '', - 'PHYSICAL': '' - - }; - - this.clearcoat = source.clearcoat; - this.clearcoatMap = source.clearcoatMap; - this.clearcoatRoughness = source.clearcoatRoughness; - this.clearcoatRoughnessMap = source.clearcoatRoughnessMap; - this.clearcoatNormalMap = source.clearcoatNormalMap; - this.clearcoatNormalScale.copy( source.clearcoatNormalScale ); - - this.reflectivity = source.reflectivity; - - if ( source.sheen ) { - - this.sheen = ( this.sheen || new Color() ).copy( source.sheen ); - - } else { - - this.sheen = null; - - } - - this.transmission = source.transmission; - this.transmissionMap = source.transmissionMap; - - this.thickness = source.thickness; - this.thicknessMap = source.thicknessMap; - this.attenuationDistance = source.attenuationDistance; - this.attenuationColor.copy( source.attenuationColor ); - - return this; - - } - -} - -MeshPhysicalMaterial.prototype.isMeshPhysicalMaterial = true; - -/** - * parameters = { - * color: , - * specular: , - * shininess: , - * opacity: , - * - * map: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * emissive: , - * emissiveIntensity: - * emissiveMap: new THREE.Texture( ), - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * specularMap: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ), - * combine: THREE.MultiplyOperation, - * reflectivity: , - * refractionRatio: , - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: , - * morphNormals: , - * - * flatShading: - * } - */ - -class MeshPhongMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'MeshPhongMaterial'; - - this.color = new Color( 0xffffff ); // diffuse - this.specular = new Color( 0x111111 ); - this.shininess = 30; - - this.map = null; - - this.lightMap = null; - this.lightMapIntensity = 1.0; - - this.aoMap = null; - this.aoMapIntensity = 1.0; - - this.emissive = new Color( 0x000000 ); - this.emissiveIntensity = 1.0; - this.emissiveMap = null; - - this.bumpMap = null; - this.bumpScale = 1; - - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2( 1, 1 ); - - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - - this.specularMap = null; - - this.alphaMap = null; - - this.envMap = null; - this.combine = MultiplyOperation; - this.reflectivity = 1; - this.refractionRatio = 0.98; - - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - - this.morphTargets = false; - this.morphNormals = false; - - this.flatShading = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - this.specular.copy( source.specular ); - this.shininess = source.shininess; - - this.map = source.map; - - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - - this.emissive.copy( source.emissive ); - this.emissiveMap = source.emissiveMap; - this.emissiveIntensity = source.emissiveIntensity; - - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy( source.normalScale ); - - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - - this.specularMap = source.specularMap; - - this.alphaMap = source.alphaMap; - - this.envMap = source.envMap; - this.combine = source.combine; - this.reflectivity = source.reflectivity; - this.refractionRatio = source.refractionRatio; - - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - - this.flatShading = source.flatShading; - - return this; - - } - -} - -MeshPhongMaterial.prototype.isMeshPhongMaterial = true; - -/** - * parameters = { - * color: , - * - * map: new THREE.Texture( ), - * gradientMap: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * emissive: , - * emissiveIntensity: - * emissiveMap: new THREE.Texture( ), - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * alphaMap: new THREE.Texture( ), - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: , - * morphNormals: - * } - */ - -class MeshToonMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.defines = { 'TOON': '' }; - - this.type = 'MeshToonMaterial'; - - this.color = new Color( 0xffffff ); - - this.map = null; - this.gradientMap = null; - - this.lightMap = null; - this.lightMapIntensity = 1.0; - - this.aoMap = null; - this.aoMapIntensity = 1.0; - - this.emissive = new Color( 0x000000 ); - this.emissiveIntensity = 1.0; - this.emissiveMap = null; - - this.bumpMap = null; - this.bumpScale = 1; - - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2( 1, 1 ); - - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - - this.alphaMap = null; - - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - - this.morphTargets = false; - this.morphNormals = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - - this.map = source.map; - this.gradientMap = source.gradientMap; - - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - - this.emissive.copy( source.emissive ); - this.emissiveMap = source.emissiveMap; - this.emissiveIntensity = source.emissiveIntensity; - - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy( source.normalScale ); - - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - - this.alphaMap = source.alphaMap; - - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - - return this; - - } - -} - -MeshToonMaterial.prototype.isMeshToonMaterial = true; - -/** - * parameters = { - * opacity: , - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * wireframe: , - * wireframeLinewidth: - * - * morphTargets: , - * morphNormals: , - * - * flatShading: - * } - */ - -class MeshNormalMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'MeshNormalMaterial'; - - this.bumpMap = null; - this.bumpScale = 1; - - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2( 1, 1 ); - - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - - this.wireframe = false; - this.wireframeLinewidth = 1; - - this.fog = false; - - this.morphTargets = false; - this.morphNormals = false; - - this.flatShading = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy( source.normalScale ); - - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - - this.flatShading = source.flatShading; - - return this; - - } - -} - -MeshNormalMaterial.prototype.isMeshNormalMaterial = true; - -/** - * parameters = { - * color: , - * opacity: , - * - * map: new THREE.Texture( ), - * - * lightMap: new THREE.Texture( ), - * lightMapIntensity: - * - * aoMap: new THREE.Texture( ), - * aoMapIntensity: - * - * emissive: , - * emissiveIntensity: - * emissiveMap: new THREE.Texture( ), - * - * specularMap: new THREE.Texture( ), - * - * alphaMap: new THREE.Texture( ), - * - * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ), - * combine: THREE.Multiply, - * reflectivity: , - * refractionRatio: , - * - * wireframe: , - * wireframeLinewidth: , - * - * morphTargets: , - * morphNormals: - * } - */ - -class MeshLambertMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.type = 'MeshLambertMaterial'; - - this.color = new Color( 0xffffff ); // diffuse - - this.map = null; - - this.lightMap = null; - this.lightMapIntensity = 1.0; - - this.aoMap = null; - this.aoMapIntensity = 1.0; - - this.emissive = new Color( 0x000000 ); - this.emissiveIntensity = 1.0; - this.emissiveMap = null; - - this.specularMap = null; - - this.alphaMap = null; - - this.envMap = null; - this.combine = MultiplyOperation; - this.reflectivity = 1; - this.refractionRatio = 0.98; - - this.wireframe = false; - this.wireframeLinewidth = 1; - this.wireframeLinecap = 'round'; - this.wireframeLinejoin = 'round'; - - this.morphTargets = false; - this.morphNormals = false; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - - this.map = source.map; - - this.lightMap = source.lightMap; - this.lightMapIntensity = source.lightMapIntensity; - - this.aoMap = source.aoMap; - this.aoMapIntensity = source.aoMapIntensity; - - this.emissive.copy( source.emissive ); - this.emissiveMap = source.emissiveMap; - this.emissiveIntensity = source.emissiveIntensity; - - this.specularMap = source.specularMap; - - this.alphaMap = source.alphaMap; - - this.envMap = source.envMap; - this.combine = source.combine; - this.reflectivity = source.reflectivity; - this.refractionRatio = source.refractionRatio; - - this.wireframe = source.wireframe; - this.wireframeLinewidth = source.wireframeLinewidth; - this.wireframeLinecap = source.wireframeLinecap; - this.wireframeLinejoin = source.wireframeLinejoin; - - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - - return this; - - } - -} - -MeshLambertMaterial.prototype.isMeshLambertMaterial = true; - -/** - * parameters = { - * color: , - * opacity: , - * - * matcap: new THREE.Texture( ), - * - * map: new THREE.Texture( ), - * - * bumpMap: new THREE.Texture( ), - * bumpScale: , - * - * normalMap: new THREE.Texture( ), - * normalMapType: THREE.TangentSpaceNormalMap, - * normalScale: , - * - * displacementMap: new THREE.Texture( ), - * displacementScale: , - * displacementBias: , - * - * alphaMap: new THREE.Texture( ), - * - * morphTargets: , - * morphNormals: - * - * flatShading: - * } - */ - -class MeshMatcapMaterial extends Material { - - constructor( parameters ) { - - super(); - - this.defines = { 'MATCAP': '' }; - - this.type = 'MeshMatcapMaterial'; - - this.color = new Color( 0xffffff ); // diffuse - - this.matcap = null; - - this.map = null; - - this.bumpMap = null; - this.bumpScale = 1; - - this.normalMap = null; - this.normalMapType = TangentSpaceNormalMap; - this.normalScale = new Vector2( 1, 1 ); - - this.displacementMap = null; - this.displacementScale = 1; - this.displacementBias = 0; - - this.alphaMap = null; - - this.morphTargets = false; - this.morphNormals = false; - - this.flatShading = false; - - this.setValues( parameters ); - - } - - - copy( source ) { - - super.copy( source ); - - this.defines = { 'MATCAP': '' }; - - this.color.copy( source.color ); - - this.matcap = source.matcap; - - this.map = source.map; - - this.bumpMap = source.bumpMap; - this.bumpScale = source.bumpScale; - - this.normalMap = source.normalMap; - this.normalMapType = source.normalMapType; - this.normalScale.copy( source.normalScale ); - - this.displacementMap = source.displacementMap; - this.displacementScale = source.displacementScale; - this.displacementBias = source.displacementBias; - - this.alphaMap = source.alphaMap; - - this.morphTargets = source.morphTargets; - this.morphNormals = source.morphNormals; - - this.flatShading = source.flatShading; - - return this; - - } - -} - -MeshMatcapMaterial.prototype.isMeshMatcapMaterial = true; - -/** - * parameters = { - * color: , - * opacity: , - * - * linewidth: , - * - * scale: , - * dashSize: , - * gapSize: - * } - */ - -class LineDashedMaterial extends LineBasicMaterial { - - constructor( parameters ) { - - super(); - - this.type = 'LineDashedMaterial'; - - this.scale = 1; - this.dashSize = 3; - this.gapSize = 1; - - this.setValues( parameters ); - - } - - copy( source ) { - - super.copy( source ); - - this.scale = source.scale; - this.dashSize = source.dashSize; - this.gapSize = source.gapSize; - - return this; - - } - -} - -LineDashedMaterial.prototype.isLineDashedMaterial = true; - -var Materials = /*#__PURE__*/Object.freeze({ - __proto__: null, - ShadowMaterial: ShadowMaterial, - SpriteMaterial: SpriteMaterial, - RawShaderMaterial: RawShaderMaterial, - ShaderMaterial: ShaderMaterial, - PointsMaterial: PointsMaterial, - MeshPhysicalMaterial: MeshPhysicalMaterial, - MeshStandardMaterial: MeshStandardMaterial, - MeshPhongMaterial: MeshPhongMaterial, - MeshToonMaterial: MeshToonMaterial, - MeshNormalMaterial: MeshNormalMaterial, - MeshLambertMaterial: MeshLambertMaterial, - MeshDepthMaterial: MeshDepthMaterial, - MeshDistanceMaterial: MeshDistanceMaterial, - MeshBasicMaterial: MeshBasicMaterial, - MeshMatcapMaterial: MeshMatcapMaterial, - LineDashedMaterial: LineDashedMaterial, - LineBasicMaterial: LineBasicMaterial, - Material: Material -}); - -const AnimationUtils = { - - // same as Array.prototype.slice, but also works on typed arrays - arraySlice: function ( array, from, to ) { - - if ( AnimationUtils.isTypedArray( array ) ) { - - // in ios9 array.subarray(from, undefined) will return empty array - // but array.subarray(from) or array.subarray(from, len) is correct - return new array.constructor( array.subarray( from, to !== undefined ? to : array.length ) ); - - } - - return array.slice( from, to ); - - }, - - // converts an array to a specific type - convertArray: function ( array, type, forceClone ) { - - if ( ! array || // let 'undefined' and 'null' pass - ! forceClone && array.constructor === type ) return array; - - if ( typeof type.BYTES_PER_ELEMENT === 'number' ) { - - return new type( array ); // create typed array - - } - - return Array.prototype.slice.call( array ); // create Array - - }, - - isTypedArray: function ( object ) { - - return ArrayBuffer.isView( object ) && - ! ( object instanceof DataView ); - - }, - - // returns an array by which times and values can be sorted - getKeyframeOrder: function ( times ) { - - function compareTime( i, j ) { - - return times[ i ] - times[ j ]; - - } - - const n = times.length; - const result = new Array( n ); - for ( let i = 0; i !== n; ++ i ) result[ i ] = i; - - result.sort( compareTime ); - - return result; - - }, - - // uses the array previously returned by 'getKeyframeOrder' to sort data - sortedArray: function ( values, stride, order ) { - - const nValues = values.length; - const result = new values.constructor( nValues ); - - for ( let i = 0, dstOffset = 0; dstOffset !== nValues; ++ i ) { - - const srcOffset = order[ i ] * stride; - - for ( let j = 0; j !== stride; ++ j ) { - - result[ dstOffset ++ ] = values[ srcOffset + j ]; - - } - - } - - return result; - - }, - - // function for parsing AOS keyframe formats - flattenJSON: function ( jsonKeys, times, values, valuePropertyName ) { - - let i = 1, key = jsonKeys[ 0 ]; - - while ( key !== undefined && key[ valuePropertyName ] === undefined ) { - - key = jsonKeys[ i ++ ]; - - } - - if ( key === undefined ) return; // no data - - let value = key[ valuePropertyName ]; - if ( value === undefined ) return; // no data - - if ( Array.isArray( value ) ) { - - do { - - value = key[ valuePropertyName ]; - - if ( value !== undefined ) { - - times.push( key.time ); - values.push.apply( values, value ); // push all elements - - } - - key = jsonKeys[ i ++ ]; - - } while ( key !== undefined ); - - } else if ( value.toArray !== undefined ) { - - // ...assume THREE.Math-ish - - do { - - value = key[ valuePropertyName ]; - - if ( value !== undefined ) { - - times.push( key.time ); - value.toArray( values, values.length ); - - } - - key = jsonKeys[ i ++ ]; - - } while ( key !== undefined ); - - } else { - - // otherwise push as-is - - do { - - value = key[ valuePropertyName ]; - - if ( value !== undefined ) { - - times.push( key.time ); - values.push( value ); - - } - - key = jsonKeys[ i ++ ]; - - } while ( key !== undefined ); - - } - - }, - - subclip: function ( sourceClip, name, startFrame, endFrame, fps = 30 ) { - - const clip = sourceClip.clone(); - - clip.name = name; - - const tracks = []; - - for ( let i = 0; i < clip.tracks.length; ++ i ) { - - const track = clip.tracks[ i ]; - const valueSize = track.getValueSize(); - - const times = []; - const values = []; - - for ( let j = 0; j < track.times.length; ++ j ) { - - const frame = track.times[ j ] * fps; - - if ( frame < startFrame || frame >= endFrame ) continue; - - times.push( track.times[ j ] ); - - for ( let k = 0; k < valueSize; ++ k ) { - - values.push( track.values[ j * valueSize + k ] ); - - } - - } - - if ( times.length === 0 ) continue; - - track.times = AnimationUtils.convertArray( times, track.times.constructor ); - track.values = AnimationUtils.convertArray( values, track.values.constructor ); - - tracks.push( track ); - - } - - clip.tracks = tracks; - - // find minimum .times value across all tracks in the trimmed clip - - let minStartTime = Infinity; - - for ( let i = 0; i < clip.tracks.length; ++ i ) { - - if ( minStartTime > clip.tracks[ i ].times[ 0 ] ) { - - minStartTime = clip.tracks[ i ].times[ 0 ]; - - } - - } - - // shift all tracks such that clip begins at t=0 - - for ( let i = 0; i < clip.tracks.length; ++ i ) { - - clip.tracks[ i ].shift( - 1 * minStartTime ); - - } - - clip.resetDuration(); - - return clip; - - }, - - makeClipAdditive: function ( targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30 ) { - - if ( fps <= 0 ) fps = 30; - - const numTracks = referenceClip.tracks.length; - const referenceTime = referenceFrame / fps; - - // Make each track's values relative to the values at the reference frame - for ( let i = 0; i < numTracks; ++ i ) { - - const referenceTrack = referenceClip.tracks[ i ]; - const referenceTrackType = referenceTrack.ValueTypeName; - - // Skip this track if it's non-numeric - if ( referenceTrackType === 'bool' || referenceTrackType === 'string' ) continue; - - // Find the track in the target clip whose name and type matches the reference track - const targetTrack = targetClip.tracks.find( function ( track ) { - - return track.name === referenceTrack.name - && track.ValueTypeName === referenceTrackType; - - } ); - - if ( targetTrack === undefined ) continue; - - let referenceOffset = 0; - const referenceValueSize = referenceTrack.getValueSize(); - - if ( referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) { - - referenceOffset = referenceValueSize / 3; - - } - - let targetOffset = 0; - const targetValueSize = targetTrack.getValueSize(); - - if ( targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) { - - targetOffset = targetValueSize / 3; - - } - - const lastIndex = referenceTrack.times.length - 1; - let referenceValue; - - // Find the value to subtract out of the track - if ( referenceTime <= referenceTrack.times[ 0 ] ) { - - // Reference frame is earlier than the first keyframe, so just use the first keyframe - const startIndex = referenceOffset; - const endIndex = referenceValueSize - referenceOffset; - referenceValue = AnimationUtils.arraySlice( referenceTrack.values, startIndex, endIndex ); - - } else if ( referenceTime >= referenceTrack.times[ lastIndex ] ) { - - // Reference frame is after the last keyframe, so just use the last keyframe - const startIndex = lastIndex * referenceValueSize + referenceOffset; - const endIndex = startIndex + referenceValueSize - referenceOffset; - referenceValue = AnimationUtils.arraySlice( referenceTrack.values, startIndex, endIndex ); - - } else { - - // Interpolate to the reference value - const interpolant = referenceTrack.createInterpolant(); - const startIndex = referenceOffset; - const endIndex = referenceValueSize - referenceOffset; - interpolant.evaluate( referenceTime ); - referenceValue = AnimationUtils.arraySlice( interpolant.resultBuffer, startIndex, endIndex ); - - } - - // Conjugate the quaternion - if ( referenceTrackType === 'quaternion' ) { - - const referenceQuat = new Quaternion().fromArray( referenceValue ).normalize().conjugate(); - referenceQuat.toArray( referenceValue ); - - } - - // Subtract the reference value from all of the track values - - const numTimes = targetTrack.times.length; - for ( let j = 0; j < numTimes; ++ j ) { - - const valueStart = j * targetValueSize + targetOffset; - - if ( referenceTrackType === 'quaternion' ) { - - // Multiply the conjugate for quaternion track types - Quaternion.multiplyQuaternionsFlat( - targetTrack.values, - valueStart, - referenceValue, - 0, - targetTrack.values, - valueStart - ); - - } else { - - const valueEnd = targetValueSize - targetOffset * 2; - - // Subtract each value for all other numeric track types - for ( let k = 0; k < valueEnd; ++ k ) { - - targetTrack.values[ valueStart + k ] -= referenceValue[ k ]; - - } - - } - - } - - } - - targetClip.blendMode = AdditiveAnimationBlendMode; - - return targetClip; - - } - -}; - -/** - * Abstract base class of interpolants over parametric samples. - * - * The parameter domain is one dimensional, typically the time or a path - * along a curve defined by the data. - * - * The sample values can have any dimensionality and derived classes may - * apply special interpretations to the data. - * - * This class provides the interval seek in a Template Method, deferring - * the actual interpolation to derived classes. - * - * Time complexity is O(1) for linear access crossing at most two points - * and O(log N) for random access, where N is the number of positions. - * - * References: - * - * http://www.oodesign.com/template-method-pattern.html - * - */ - -class Interpolant { - - constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { - - this.parameterPositions = parameterPositions; - this._cachedIndex = 0; - - this.resultBuffer = resultBuffer !== undefined ? - resultBuffer : new sampleValues.constructor( sampleSize ); - this.sampleValues = sampleValues; - this.valueSize = sampleSize; - - this.settings = null; - this.DefaultSettings_ = {}; - - } - - evaluate( t ) { - - const pp = this.parameterPositions; - let i1 = this._cachedIndex, - t1 = pp[ i1 ], - t0 = pp[ i1 - 1 ]; - - validate_interval: { - - seek: { - - let right; - - linear_scan: { - - //- See http://jsperf.com/comparison-to-undefined/3 - //- slower code: - //- - //- if ( t >= t1 || t1 === undefined ) { - forward_scan: if ( ! ( t < t1 ) ) { - - for ( let giveUpAt = i1 + 2; ; ) { - - if ( t1 === undefined ) { - - if ( t < t0 ) break forward_scan; - - // after end - - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_( i1 - 1, t, t0 ); - - } - - if ( i1 === giveUpAt ) break; // this loop - - t0 = t1; - t1 = pp[ ++ i1 ]; - - if ( t < t1 ) { - - // we have arrived at the sought interval - break seek; - - } - - } - - // prepare binary search on the right side of the index - right = pp.length; - break linear_scan; - - } - - //- slower code: - //- if ( t < t0 || t0 === undefined ) { - if ( ! ( t >= t0 ) ) { - - // looping? - - const t1global = pp[ 1 ]; - - if ( t < t1global ) { - - i1 = 2; // + 1, using the scan for the details - t0 = t1global; - - } - - // linear reverse scan - - for ( let giveUpAt = i1 - 2; ; ) { - - if ( t0 === undefined ) { - - // before start - - this._cachedIndex = 0; - return this.beforeStart_( 0, t, t1 ); - - } - - if ( i1 === giveUpAt ) break; // this loop - - t1 = t0; - t0 = pp[ -- i1 - 1 ]; - - if ( t >= t0 ) { - - // we have arrived at the sought interval - break seek; - - } - - } - - // prepare binary search on the left side of the index - right = i1; - i1 = 0; - break linear_scan; - - } - - // the interval is valid - - break validate_interval; - - } // linear scan - - // binary search - - while ( i1 < right ) { - - const mid = ( i1 + right ) >>> 1; - - if ( t < pp[ mid ] ) { - - right = mid; - - } else { - - i1 = mid + 1; - - } - - } - - t1 = pp[ i1 ]; - t0 = pp[ i1 - 1 ]; - - // check boundary cases, again - - if ( t0 === undefined ) { - - this._cachedIndex = 0; - return this.beforeStart_( 0, t, t1 ); - - } - - if ( t1 === undefined ) { - - i1 = pp.length; - this._cachedIndex = i1; - return this.afterEnd_( i1 - 1, t0, t ); - - } - - } // seek - - this._cachedIndex = i1; - - this.intervalChanged_( i1, t0, t1 ); - - } // validate_interval - - return this.interpolate_( i1, t0, t, t1 ); - - } - - getSettings_() { - - return this.settings || this.DefaultSettings_; - - } - - copySampleValue_( index ) { - - // copies a sample value to the result buffer - - const result = this.resultBuffer, - values = this.sampleValues, - stride = this.valueSize, - offset = index * stride; - - for ( let i = 0; i !== stride; ++ i ) { - - result[ i ] = values[ offset + i ]; - - } - - return result; - - } - - // Template methods for derived classes: - - interpolate_( /* i1, t0, t, t1 */ ) { - - throw new Error( 'call to abstract method' ); - // implementations shall return this.resultBuffer - - } - - intervalChanged_( /* i1, t0, t1 */ ) { - - // empty - - } - -} - -// ALIAS DEFINITIONS - -Interpolant.prototype.beforeStart_ = Interpolant.prototype.copySampleValue_; -Interpolant.prototype.afterEnd_ = Interpolant.prototype.copySampleValue_; - -/** - * Fast and simple cubic spline interpolant. - * - * It was derived from a Hermitian construction setting the first derivative - * at each sample position to the linear slope between neighboring positions - * over their parameter interval. - */ - -class CubicInterpolant extends Interpolant { - - constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { - - super( parameterPositions, sampleValues, sampleSize, resultBuffer ); - - this._weightPrev = - 0; - this._offsetPrev = - 0; - this._weightNext = - 0; - this._offsetNext = - 0; - - this.DefaultSettings_ = { - - endingStart: ZeroCurvatureEnding, - endingEnd: ZeroCurvatureEnding - - }; - - } - - intervalChanged_( i1, t0, t1 ) { - - const pp = this.parameterPositions; - let iPrev = i1 - 2, - iNext = i1 + 1, - - tPrev = pp[ iPrev ], - tNext = pp[ iNext ]; - - if ( tPrev === undefined ) { - - switch ( this.getSettings_().endingStart ) { - - case ZeroSlopeEnding: - - // f'(t0) = 0 - iPrev = i1; - tPrev = 2 * t0 - t1; - - break; - - case WrapAroundEnding: - - // use the other end of the curve - iPrev = pp.length - 2; - tPrev = t0 + pp[ iPrev ] - pp[ iPrev + 1 ]; - - break; - - default: // ZeroCurvatureEnding - - // f''(t0) = 0 a.k.a. Natural Spline - iPrev = i1; - tPrev = t1; - - } - - } - - if ( tNext === undefined ) { - - switch ( this.getSettings_().endingEnd ) { - - case ZeroSlopeEnding: - - // f'(tN) = 0 - iNext = i1; - tNext = 2 * t1 - t0; - - break; - - case WrapAroundEnding: - - // use the other end of the curve - iNext = 1; - tNext = t1 + pp[ 1 ] - pp[ 0 ]; - - break; - - default: // ZeroCurvatureEnding - - // f''(tN) = 0, a.k.a. Natural Spline - iNext = i1 - 1; - tNext = t0; - - } - - } - - const halfDt = ( t1 - t0 ) * 0.5, - stride = this.valueSize; - - this._weightPrev = halfDt / ( t0 - tPrev ); - this._weightNext = halfDt / ( tNext - t1 ); - this._offsetPrev = iPrev * stride; - this._offsetNext = iNext * stride; - - } - - interpolate_( i1, t0, t, t1 ) { - - const result = this.resultBuffer, - values = this.sampleValues, - stride = this.valueSize, - - o1 = i1 * stride, o0 = o1 - stride, - oP = this._offsetPrev, oN = this._offsetNext, - wP = this._weightPrev, wN = this._weightNext, - - p = ( t - t0 ) / ( t1 - t0 ), - pp = p * p, - ppp = pp * p; - - // evaluate polynomials - - const sP = - wP * ppp + 2 * wP * pp - wP * p; - const s0 = ( 1 + wP ) * ppp + ( - 1.5 - 2 * wP ) * pp + ( - 0.5 + wP ) * p + 1; - const s1 = ( - 1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p; - const sN = wN * ppp - wN * pp; - - // combine data linearly - - for ( let i = 0; i !== stride; ++ i ) { - - result[ i ] = - sP * values[ oP + i ] + - s0 * values[ o0 + i ] + - s1 * values[ o1 + i ] + - sN * values[ oN + i ]; - - } - - return result; - - } - -} - -class LinearInterpolant extends Interpolant { - - constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { - - super( parameterPositions, sampleValues, sampleSize, resultBuffer ); - - } - - interpolate_( i1, t0, t, t1 ) { - - const result = this.resultBuffer, - values = this.sampleValues, - stride = this.valueSize, - - offset1 = i1 * stride, - offset0 = offset1 - stride, - - weight1 = ( t - t0 ) / ( t1 - t0 ), - weight0 = 1 - weight1; - - for ( let i = 0; i !== stride; ++ i ) { - - result[ i ] = - values[ offset0 + i ] * weight0 + - values[ offset1 + i ] * weight1; - - } - - return result; - - } - -} - -/** - * - * Interpolant that evaluates to the sample value at the position preceeding - * the parameter. - */ - -class DiscreteInterpolant extends Interpolant { - - constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { - - super( parameterPositions, sampleValues, sampleSize, resultBuffer ); - - } - - interpolate_( i1 /*, t0, t, t1 */ ) { - - return this.copySampleValue_( i1 - 1 ); - - } - -} - -class KeyframeTrack { - - constructor( name, times, values, interpolation ) { - - if ( name === undefined ) throw new Error( 'THREE.KeyframeTrack: track name is undefined' ); - if ( times === undefined || times.length === 0 ) throw new Error( 'THREE.KeyframeTrack: no keyframes in track named ' + name ); - - this.name = name; - - this.times = AnimationUtils.convertArray( times, this.TimeBufferType ); - this.values = AnimationUtils.convertArray( values, this.ValueBufferType ); - - this.setInterpolation( interpolation || this.DefaultInterpolation ); - - } - - // Serialization (in static context, because of constructor invocation - // and automatic invocation of .toJSON): - - static toJSON( track ) { - - const trackType = track.constructor; - - let json; - - // derived classes can define a static toJSON method - if ( trackType.toJSON !== this.toJSON ) { - - json = trackType.toJSON( track ); - - } else { - - // by default, we assume the data can be serialized as-is - json = { - - 'name': track.name, - 'times': AnimationUtils.convertArray( track.times, Array ), - 'values': AnimationUtils.convertArray( track.values, Array ) - - }; - - const interpolation = track.getInterpolation(); - - if ( interpolation !== track.DefaultInterpolation ) { - - json.interpolation = interpolation; - - } - - } - - json.type = track.ValueTypeName; // mandatory - - return json; - - } - - InterpolantFactoryMethodDiscrete( result ) { - - return new DiscreteInterpolant( this.times, this.values, this.getValueSize(), result ); - - } - - InterpolantFactoryMethodLinear( result ) { - - return new LinearInterpolant( this.times, this.values, this.getValueSize(), result ); - - } - - InterpolantFactoryMethodSmooth( result ) { - - return new CubicInterpolant( this.times, this.values, this.getValueSize(), result ); - - } - - setInterpolation( interpolation ) { - - let factoryMethod; - - switch ( interpolation ) { - - case InterpolateDiscrete: - - factoryMethod = this.InterpolantFactoryMethodDiscrete; - - break; - - case InterpolateLinear: - - factoryMethod = this.InterpolantFactoryMethodLinear; - - break; - - case InterpolateSmooth: - - factoryMethod = this.InterpolantFactoryMethodSmooth; - - break; - - } - - if ( factoryMethod === undefined ) { - - const message = 'unsupported interpolation for ' + - this.ValueTypeName + ' keyframe track named ' + this.name; - - if ( this.createInterpolant === undefined ) { - - // fall back to default, unless the default itself is messed up - if ( interpolation !== this.DefaultInterpolation ) { - - this.setInterpolation( this.DefaultInterpolation ); - - } else { - - throw new Error( message ); // fatal, in this case - - } - - } - - console.warn( 'THREE.KeyframeTrack:', message ); - return this; - - } - - this.createInterpolant = factoryMethod; - - return this; - - } - - getInterpolation() { - - switch ( this.createInterpolant ) { - - case this.InterpolantFactoryMethodDiscrete: - - return InterpolateDiscrete; - - case this.InterpolantFactoryMethodLinear: - - return InterpolateLinear; - - case this.InterpolantFactoryMethodSmooth: - - return InterpolateSmooth; - - } - - } - - getValueSize() { - - return this.values.length / this.times.length; - - } - - // move all keyframes either forwards or backwards in time - shift( timeOffset ) { - - if ( timeOffset !== 0.0 ) { - - const times = this.times; - - for ( let i = 0, n = times.length; i !== n; ++ i ) { - - times[ i ] += timeOffset; - - } - - } - - return this; - - } - - // scale all keyframe times by a factor (useful for frame <-> seconds conversions) - scale( timeScale ) { - - if ( timeScale !== 1.0 ) { - - const times = this.times; - - for ( let i = 0, n = times.length; i !== n; ++ i ) { - - times[ i ] *= timeScale; - - } - - } - - return this; - - } - - // removes keyframes before and after animation without changing any values within the range [startTime, endTime]. - // IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values - trim( startTime, endTime ) { - - const times = this.times, - nKeys = times.length; - - let from = 0, - to = nKeys - 1; - - while ( from !== nKeys && times[ from ] < startTime ) { - - ++ from; - - } - - while ( to !== - 1 && times[ to ] > endTime ) { - - -- to; - - } - - ++ to; // inclusive -> exclusive bound - - if ( from !== 0 || to !== nKeys ) { - - // empty tracks are forbidden, so keep at least one keyframe - if ( from >= to ) { - - to = Math.max( to, 1 ); - from = to - 1; - - } - - const stride = this.getValueSize(); - this.times = AnimationUtils.arraySlice( times, from, to ); - this.values = AnimationUtils.arraySlice( this.values, from * stride, to * stride ); - - } - - return this; - - } - - // ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable - validate() { - - let valid = true; - - const valueSize = this.getValueSize(); - if ( valueSize - Math.floor( valueSize ) !== 0 ) { - - console.error( 'THREE.KeyframeTrack: Invalid value size in track.', this ); - valid = false; - - } - - const times = this.times, - values = this.values, - - nKeys = times.length; - - if ( nKeys === 0 ) { - - console.error( 'THREE.KeyframeTrack: Track is empty.', this ); - valid = false; - - } - - let prevTime = null; - - for ( let i = 0; i !== nKeys; i ++ ) { - - const currTime = times[ i ]; - - if ( typeof currTime === 'number' && isNaN( currTime ) ) { - - console.error( 'THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime ); - valid = false; - break; - - } - - if ( prevTime !== null && prevTime > currTime ) { - - console.error( 'THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime ); - valid = false; - break; - - } - - prevTime = currTime; - - } - - if ( values !== undefined ) { - - if ( AnimationUtils.isTypedArray( values ) ) { - - for ( let i = 0, n = values.length; i !== n; ++ i ) { - - const value = values[ i ]; - - if ( isNaN( value ) ) { - - console.error( 'THREE.KeyframeTrack: Value is not a valid number.', this, i, value ); - valid = false; - break; - - } - - } - - } - - } - - return valid; - - } - - // removes equivalent sequential keys as common in morph target sequences - // (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0) - optimize() { - - // times or values may be shared with other tracks, so overwriting is unsafe - const times = AnimationUtils.arraySlice( this.times ), - values = AnimationUtils.arraySlice( this.values ), - stride = this.getValueSize(), - - smoothInterpolation = this.getInterpolation() === InterpolateSmooth, - - lastIndex = times.length - 1; - - let writeIndex = 1; - - for ( let i = 1; i < lastIndex; ++ i ) { - - let keep = false; - - const time = times[ i ]; - const timeNext = times[ i + 1 ]; - - // remove adjacent keyframes scheduled at the same time - - if ( time !== timeNext && ( i !== 1 || time !== times[ 0 ] ) ) { - - if ( ! smoothInterpolation ) { - - // remove unnecessary keyframes same as their neighbors - - const offset = i * stride, - offsetP = offset - stride, - offsetN = offset + stride; - - for ( let j = 0; j !== stride; ++ j ) { - - const value = values[ offset + j ]; - - if ( value !== values[ offsetP + j ] || - value !== values[ offsetN + j ] ) { - - keep = true; - break; - - } - - } - - } else { - - keep = true; - - } - - } - - // in-place compaction - - if ( keep ) { - - if ( i !== writeIndex ) { - - times[ writeIndex ] = times[ i ]; - - const readOffset = i * stride, - writeOffset = writeIndex * stride; - - for ( let j = 0; j !== stride; ++ j ) { - - values[ writeOffset + j ] = values[ readOffset + j ]; - - } - - } - - ++ writeIndex; - - } - - } - - // flush last keyframe (compaction looks ahead) - - if ( lastIndex > 0 ) { - - times[ writeIndex ] = times[ lastIndex ]; - - for ( let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j ) { - - values[ writeOffset + j ] = values[ readOffset + j ]; - - } - - ++ writeIndex; - - } - - if ( writeIndex !== times.length ) { - - this.times = AnimationUtils.arraySlice( times, 0, writeIndex ); - this.values = AnimationUtils.arraySlice( values, 0, writeIndex * stride ); - - } else { - - this.times = times; - this.values = values; - - } - - return this; - - } - - clone() { - - const times = AnimationUtils.arraySlice( this.times, 0 ); - const values = AnimationUtils.arraySlice( this.values, 0 ); - - const TypedKeyframeTrack = this.constructor; - const track = new TypedKeyframeTrack( this.name, times, values ); - - // Interpolant argument to constructor is not saved, so copy the factory method directly. - track.createInterpolant = this.createInterpolant; - - return track; - - } - -} - -KeyframeTrack.prototype.TimeBufferType = Float32Array; -KeyframeTrack.prototype.ValueBufferType = Float32Array; -KeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear; - -/** - * A Track of Boolean keyframe values. - */ -class BooleanKeyframeTrack extends KeyframeTrack {} - -BooleanKeyframeTrack.prototype.ValueTypeName = 'bool'; -BooleanKeyframeTrack.prototype.ValueBufferType = Array; -BooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete; -BooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined; -BooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; - -/** - * A Track of keyframe values that represent color. - */ -class ColorKeyframeTrack extends KeyframeTrack {} - -ColorKeyframeTrack.prototype.ValueTypeName = 'color'; - -/** - * A Track of numeric keyframe values. - */ -class NumberKeyframeTrack extends KeyframeTrack {} - -NumberKeyframeTrack.prototype.ValueTypeName = 'number'; - -/** - * Spherical linear unit quaternion interpolant. - */ - -class QuaternionLinearInterpolant extends Interpolant { - - constructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) { - - super( parameterPositions, sampleValues, sampleSize, resultBuffer ); - - } - - interpolate_( i1, t0, t, t1 ) { - - const result = this.resultBuffer, - values = this.sampleValues, - stride = this.valueSize, - - alpha = ( t - t0 ) / ( t1 - t0 ); - - let offset = i1 * stride; - - for ( let end = offset + stride; offset !== end; offset += 4 ) { - - Quaternion.slerpFlat( result, 0, values, offset - stride, values, offset, alpha ); - - } - - return result; - - } - -} - -/** - * A Track of quaternion keyframe values. - */ -class QuaternionKeyframeTrack extends KeyframeTrack { - - InterpolantFactoryMethodLinear( result ) { - - return new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result ); - - } - -} - -QuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion'; -// ValueBufferType is inherited -QuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear; -QuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; - -/** - * A Track that interpolates Strings - */ -class StringKeyframeTrack extends KeyframeTrack {} - -StringKeyframeTrack.prototype.ValueTypeName = 'string'; -StringKeyframeTrack.prototype.ValueBufferType = Array; -StringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete; -StringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined; -StringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined; - -/** - * A Track of vectored keyframe values. - */ -class VectorKeyframeTrack extends KeyframeTrack {} - -VectorKeyframeTrack.prototype.ValueTypeName = 'vector'; - -class AnimationClip { - - constructor( name, duration = - 1, tracks, blendMode = NormalAnimationBlendMode ) { - - this.name = name; - this.tracks = tracks; - this.duration = duration; - this.blendMode = blendMode; - - this.uuid = generateUUID(); - - // this means it should figure out its duration by scanning the tracks - if ( this.duration < 0 ) { - - this.resetDuration(); - - } - - } - - - static parse( json ) { - - const tracks = [], - jsonTracks = json.tracks, - frameTime = 1.0 / ( json.fps || 1.0 ); - - for ( let i = 0, n = jsonTracks.length; i !== n; ++ i ) { - - tracks.push( parseKeyframeTrack( jsonTracks[ i ] ).scale( frameTime ) ); - - } - - const clip = new this( json.name, json.duration, tracks, json.blendMode ); - clip.uuid = json.uuid; - - return clip; - - } - - static toJSON( clip ) { - - const tracks = [], - clipTracks = clip.tracks; - - const json = { - - 'name': clip.name, - 'duration': clip.duration, - 'tracks': tracks, - 'uuid': clip.uuid, - 'blendMode': clip.blendMode - - }; - - for ( let i = 0, n = clipTracks.length; i !== n; ++ i ) { - - tracks.push( KeyframeTrack.toJSON( clipTracks[ i ] ) ); - - } - - return json; - - } - - static CreateFromMorphTargetSequence( name, morphTargetSequence, fps, noLoop ) { - - const numMorphTargets = morphTargetSequence.length; - const tracks = []; - - for ( let i = 0; i < numMorphTargets; i ++ ) { - - let times = []; - let values = []; - - times.push( - ( i + numMorphTargets - 1 ) % numMorphTargets, - i, - ( i + 1 ) % numMorphTargets ); - - values.push( 0, 1, 0 ); - - const order = AnimationUtils.getKeyframeOrder( times ); - times = AnimationUtils.sortedArray( times, 1, order ); - values = AnimationUtils.sortedArray( values, 1, order ); - - // if there is a key at the first frame, duplicate it as the - // last frame as well for perfect loop. - if ( ! noLoop && times[ 0 ] === 0 ) { - - times.push( numMorphTargets ); - values.push( values[ 0 ] ); - - } - - tracks.push( - new NumberKeyframeTrack( - '.morphTargetInfluences[' + morphTargetSequence[ i ].name + ']', - times, values - ).scale( 1.0 / fps ) ); - - } - - return new this( name, - 1, tracks ); - - } - - static findByName( objectOrClipArray, name ) { - - let clipArray = objectOrClipArray; - - if ( ! Array.isArray( objectOrClipArray ) ) { - - const o = objectOrClipArray; - clipArray = o.geometry && o.geometry.animations || o.animations; - - } - - for ( let i = 0; i < clipArray.length; i ++ ) { - - if ( clipArray[ i ].name === name ) { - - return clipArray[ i ]; - - } - - } - - return null; - - } - - static CreateClipsFromMorphTargetSequences( morphTargets, fps, noLoop ) { - - const animationToMorphTargets = {}; - - // tested with https://regex101.com/ on trick sequences - // such flamingo_flyA_003, flamingo_run1_003, crdeath0059 - const pattern = /^([\w-]*?)([\d]+)$/; - - // sort morph target names into animation groups based - // patterns like Walk_001, Walk_002, Run_001, Run_002 - for ( let i = 0, il = morphTargets.length; i < il; i ++ ) { - - const morphTarget = morphTargets[ i ]; - const parts = morphTarget.name.match( pattern ); - - if ( parts && parts.length > 1 ) { - - const name = parts[ 1 ]; - - let animationMorphTargets = animationToMorphTargets[ name ]; - - if ( ! animationMorphTargets ) { - - animationToMorphTargets[ name ] = animationMorphTargets = []; - - } - - animationMorphTargets.push( morphTarget ); - - } - - } - - const clips = []; - - for ( const name in animationToMorphTargets ) { - - clips.push( this.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps, noLoop ) ); - - } - - return clips; - - } - - // parse the animation.hierarchy format - static parseAnimation( animation, bones ) { - - if ( ! animation ) { - - console.error( 'THREE.AnimationClip: No animation in JSONLoader data.' ); - return null; - - } - - const addNonemptyTrack = function ( trackType, trackName, animationKeys, propertyName, destTracks ) { - - // only return track if there are actually keys. - if ( animationKeys.length !== 0 ) { - - const times = []; - const values = []; - - AnimationUtils.flattenJSON( animationKeys, times, values, propertyName ); - - // empty keys are filtered out, so check again - if ( times.length !== 0 ) { - - destTracks.push( new trackType( trackName, times, values ) ); - - } - - } - - }; - - const tracks = []; - - const clipName = animation.name || 'default'; - const fps = animation.fps || 30; - const blendMode = animation.blendMode; - - // automatic length determination in AnimationClip. - let duration = animation.length || - 1; - - const hierarchyTracks = animation.hierarchy || []; - - for ( let h = 0; h < hierarchyTracks.length; h ++ ) { - - const animationKeys = hierarchyTracks[ h ].keys; - - // skip empty tracks - if ( ! animationKeys || animationKeys.length === 0 ) continue; - - // process morph targets - if ( animationKeys[ 0 ].morphTargets ) { - - // figure out all morph targets used in this track - const morphTargetNames = {}; - - let k; - - for ( k = 0; k < animationKeys.length; k ++ ) { - - if ( animationKeys[ k ].morphTargets ) { - - for ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) { - - morphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = - 1; - - } - - } - - } - - // create a track for each morph target with all zero - // morphTargetInfluences except for the keys in which - // the morphTarget is named. - for ( const morphTargetName in morphTargetNames ) { - - const times = []; - const values = []; - - for ( let m = 0; m !== animationKeys[ k ].morphTargets.length; ++ m ) { - - const animationKey = animationKeys[ k ]; - - times.push( animationKey.time ); - values.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 ); - - } - - tracks.push( new NumberKeyframeTrack( '.morphTargetInfluence[' + morphTargetName + ']', times, values ) ); - - } - - duration = morphTargetNames.length * ( fps || 1.0 ); - - } else { - - // ...assume skeletal animation - - const boneName = '.bones[' + bones[ h ].name + ']'; - - addNonemptyTrack( - VectorKeyframeTrack, boneName + '.position', - animationKeys, 'pos', tracks ); - - addNonemptyTrack( - QuaternionKeyframeTrack, boneName + '.quaternion', - animationKeys, 'rot', tracks ); - - addNonemptyTrack( - VectorKeyframeTrack, boneName + '.scale', - animationKeys, 'scl', tracks ); - - } - - } - - if ( tracks.length === 0 ) { - - return null; - - } - - const clip = new this( clipName, duration, tracks, blendMode ); - - return clip; - - } - - resetDuration() { - - const tracks = this.tracks; - let duration = 0; - - for ( let i = 0, n = tracks.length; i !== n; ++ i ) { - - const track = this.tracks[ i ]; - - duration = Math.max( duration, track.times[ track.times.length - 1 ] ); - - } - - this.duration = duration; - - return this; - - } - - trim() { - - for ( let i = 0; i < this.tracks.length; i ++ ) { - - this.tracks[ i ].trim( 0, this.duration ); - - } - - return this; - - } - - validate() { - - let valid = true; - - for ( let i = 0; i < this.tracks.length; i ++ ) { - - valid = valid && this.tracks[ i ].validate(); - - } - - return valid; - - } - - optimize() { - - for ( let i = 0; i < this.tracks.length; i ++ ) { - - this.tracks[ i ].optimize(); - - } - - return this; - - } - - clone() { - - const tracks = []; - - for ( let i = 0; i < this.tracks.length; i ++ ) { - - tracks.push( this.tracks[ i ].clone() ); - - } - - return new this.constructor( this.name, this.duration, tracks, this.blendMode ); - - } - - toJSON() { - - return this.constructor.toJSON( this ); - - } - -} - -function getTrackTypeForValueTypeName( typeName ) { - - switch ( typeName.toLowerCase() ) { - - case 'scalar': - case 'double': - case 'float': - case 'number': - case 'integer': - - return NumberKeyframeTrack; - - case 'vector': - case 'vector2': - case 'vector3': - case 'vector4': - - return VectorKeyframeTrack; - - case 'color': - - return ColorKeyframeTrack; - - case 'quaternion': - - return QuaternionKeyframeTrack; - - case 'bool': - case 'boolean': - - return BooleanKeyframeTrack; - - case 'string': - - return StringKeyframeTrack; - - } - - throw new Error( 'THREE.KeyframeTrack: Unsupported typeName: ' + typeName ); - -} - -function parseKeyframeTrack( json ) { - - if ( json.type === undefined ) { - - throw new Error( 'THREE.KeyframeTrack: track type undefined, can not parse' ); - - } - - const trackType = getTrackTypeForValueTypeName( json.type ); - - if ( json.times === undefined ) { - - const times = [], values = []; - - AnimationUtils.flattenJSON( json.keys, times, values, 'value' ); - - json.times = times; - json.values = values; - - } - - // derived classes can define a static parse method - if ( trackType.parse !== undefined ) { - - return trackType.parse( json ); - - } else { - - // by default, we assume a constructor compatible with the base - return new trackType( json.name, json.times, json.values, json.interpolation ); - - } - -} - -const Cache = { - - enabled: false, - - files: {}, - - add: function ( key, file ) { - - if ( this.enabled === false ) return; - - // console.log( 'THREE.Cache', 'Adding key:', key ); - - this.files[ key ] = file; - - }, - - get: function ( key ) { - - if ( this.enabled === false ) return; - - // console.log( 'THREE.Cache', 'Checking key:', key ); - - return this.files[ key ]; - - }, - - remove: function ( key ) { - - delete this.files[ key ]; - - }, - - clear: function () { - - this.files = {}; - - } - -}; - -class LoadingManager { - - constructor( onLoad, onProgress, onError ) { - - const scope = this; - - let isLoading = false; - let itemsLoaded = 0; - let itemsTotal = 0; - let urlModifier = undefined; - const handlers = []; - - // Refer to #5689 for the reason why we don't set .onStart - // in the constructor - - this.onStart = undefined; - this.onLoad = onLoad; - this.onProgress = onProgress; - this.onError = onError; - - this.itemStart = function ( url ) { - - itemsTotal ++; - - if ( isLoading === false ) { - - if ( scope.onStart !== undefined ) { - - scope.onStart( url, itemsLoaded, itemsTotal ); - - } - - } - - isLoading = true; - - }; - - this.itemEnd = function ( url ) { - - itemsLoaded ++; - - if ( scope.onProgress !== undefined ) { - - scope.onProgress( url, itemsLoaded, itemsTotal ); - - } - - if ( itemsLoaded === itemsTotal ) { - - isLoading = false; - - if ( scope.onLoad !== undefined ) { - - scope.onLoad(); - - } - - } - - }; - - this.itemError = function ( url ) { - - if ( scope.onError !== undefined ) { - - scope.onError( url ); - - } - - }; - - this.resolveURL = function ( url ) { - - if ( urlModifier ) { - - return urlModifier( url ); - - } - - return url; - - }; - - this.setURLModifier = function ( transform ) { - - urlModifier = transform; - - return this; - - }; - - this.addHandler = function ( regex, loader ) { - - handlers.push( regex, loader ); - - return this; - - }; - - this.removeHandler = function ( regex ) { - - const index = handlers.indexOf( regex ); - - if ( index !== - 1 ) { - - handlers.splice( index, 2 ); - - } - - return this; - - }; - - this.getHandler = function ( file ) { - - for ( let i = 0, l = handlers.length; i < l; i += 2 ) { - - const regex = handlers[ i ]; - const loader = handlers[ i + 1 ]; - - if ( regex.global ) regex.lastIndex = 0; // see #17920 - - if ( regex.test( file ) ) { - - return loader; - - } - - } - - return null; - - }; - - } - -} - -const DefaultLoadingManager = new LoadingManager(); - -class Loader { - - constructor( manager ) { - - this.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager; - - this.crossOrigin = 'anonymous'; - this.withCredentials = false; - this.path = ''; - this.resourcePath = ''; - this.requestHeader = {}; - - } - - load( /* url, onLoad, onProgress, onError */ ) {} - - loadAsync( url, onProgress ) { - - const scope = this; - - return new Promise( function ( resolve, reject ) { - - scope.load( url, resolve, onProgress, reject ); - - } ); - - } - - parse( /* data */ ) {} - - setCrossOrigin( crossOrigin ) { - - this.crossOrigin = crossOrigin; - return this; - - } - - setWithCredentials( value ) { - - this.withCredentials = value; - return this; - - } - - setPath( path ) { - - this.path = path; - return this; - - } - - setResourcePath( resourcePath ) { - - this.resourcePath = resourcePath; - return this; - - } - - setRequestHeader( requestHeader ) { - - this.requestHeader = requestHeader; - return this; - - } - -} - -const loading = {}; - -class FileLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - if ( url === undefined ) url = ''; - - if ( this.path !== undefined ) url = this.path + url; - - url = this.manager.resolveURL( url ); - - const scope = this; - - const cached = Cache.get( url ); - - if ( cached !== undefined ) { - - scope.manager.itemStart( url ); - - setTimeout( function () { - - if ( onLoad ) onLoad( cached ); - - scope.manager.itemEnd( url ); - - }, 0 ); - - return cached; - - } - - // Check if request is duplicate - - if ( loading[ url ] !== undefined ) { - - loading[ url ].push( { - - onLoad: onLoad, - onProgress: onProgress, - onError: onError - - } ); - - return; - - } - - // Check for data: URI - const dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/; - const dataUriRegexResult = url.match( dataUriRegex ); - let request; - - // Safari can not handle Data URIs through XMLHttpRequest so process manually - if ( dataUriRegexResult ) { - - const mimeType = dataUriRegexResult[ 1 ]; - const isBase64 = !! dataUriRegexResult[ 2 ]; - - let data = dataUriRegexResult[ 3 ]; - data = decodeURIComponent( data ); - - if ( isBase64 ) data = atob( data ); - - try { - - let response; - const responseType = ( this.responseType || '' ).toLowerCase(); - - switch ( responseType ) { - - case 'arraybuffer': - case 'blob': - - const view = new Uint8Array( data.length ); - - for ( let i = 0; i < data.length; i ++ ) { - - view[ i ] = data.charCodeAt( i ); - - } - - if ( responseType === 'blob' ) { - - response = new Blob( [ view.buffer ], { type: mimeType } ); - - } else { - - response = view.buffer; - - } - - break; - - case 'document': - - const parser = new DOMParser(); - response = parser.parseFromString( data, mimeType ); - - break; - - case 'json': - - response = JSON.parse( data ); - - break; - - default: // 'text' or other - - response = data; - - break; - - } - - // Wait for next browser tick like standard XMLHttpRequest event dispatching does - setTimeout( function () { - - if ( onLoad ) onLoad( response ); - - scope.manager.itemEnd( url ); - - }, 0 ); - - } catch ( error ) { - - // Wait for next browser tick like standard XMLHttpRequest event dispatching does - setTimeout( function () { - - if ( onError ) onError( error ); - - scope.manager.itemError( url ); - scope.manager.itemEnd( url ); - - }, 0 ); - - } - - } else { - - // Initialise array for duplicate requests - - loading[ url ] = []; - - loading[ url ].push( { - - onLoad: onLoad, - onProgress: onProgress, - onError: onError - - } ); - - request = new XMLHttpRequest(); - - request.open( 'GET', url, true ); - - request.addEventListener( 'load', function ( event ) { - - const response = this.response; - - const callbacks = loading[ url ]; - - delete loading[ url ]; - - if ( this.status === 200 || this.status === 0 ) { - - // Some browsers return HTTP Status 0 when using non-http protocol - // e.g. 'file://' or 'data://'. Handle as success. - - if ( this.status === 0 ) console.warn( 'THREE.FileLoader: HTTP Status 0 received.' ); - - // Add to cache only on HTTP success, so that we do not cache - // error response bodies as proper responses to requests. - Cache.add( url, response ); - - for ( let i = 0, il = callbacks.length; i < il; i ++ ) { - - const callback = callbacks[ i ]; - if ( callback.onLoad ) callback.onLoad( response ); - - } - - scope.manager.itemEnd( url ); - - } else { - - for ( let i = 0, il = callbacks.length; i < il; i ++ ) { - - const callback = callbacks[ i ]; - if ( callback.onError ) callback.onError( event ); - - } - - scope.manager.itemError( url ); - scope.manager.itemEnd( url ); - - } - - }, false ); - - request.addEventListener( 'progress', function ( event ) { - - const callbacks = loading[ url ]; - - for ( let i = 0, il = callbacks.length; i < il; i ++ ) { - - const callback = callbacks[ i ]; - if ( callback.onProgress ) callback.onProgress( event ); - - } - - }, false ); - - request.addEventListener( 'error', function ( event ) { - - const callbacks = loading[ url ]; - - delete loading[ url ]; - - for ( let i = 0, il = callbacks.length; i < il; i ++ ) { - - const callback = callbacks[ i ]; - if ( callback.onError ) callback.onError( event ); - - } - - scope.manager.itemError( url ); - scope.manager.itemEnd( url ); - - }, false ); - - request.addEventListener( 'abort', function ( event ) { - - const callbacks = loading[ url ]; - - delete loading[ url ]; - - for ( let i = 0, il = callbacks.length; i < il; i ++ ) { - - const callback = callbacks[ i ]; - if ( callback.onError ) callback.onError( event ); - - } - - scope.manager.itemError( url ); - scope.manager.itemEnd( url ); - - }, false ); - - if ( this.responseType !== undefined ) request.responseType = this.responseType; - if ( this.withCredentials !== undefined ) request.withCredentials = this.withCredentials; - - if ( request.overrideMimeType ) request.overrideMimeType( this.mimeType !== undefined ? this.mimeType : 'text/plain' ); - - for ( const header in this.requestHeader ) { - - request.setRequestHeader( header, this.requestHeader[ header ] ); - - } - - request.send( null ); - - } - - scope.manager.itemStart( url ); - - return request; - - } - - setResponseType( value ) { - - this.responseType = value; - return this; - - } - - setMimeType( value ) { - - this.mimeType = value; - return this; - - } - -} - -class AnimationLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - const scope = this; - - const loader = new FileLoader( this.manager ); - loader.setPath( this.path ); - loader.setRequestHeader( this.requestHeader ); - loader.setWithCredentials( this.withCredentials ); - loader.load( url, function ( text ) { - - try { - - onLoad( scope.parse( JSON.parse( text ) ) ); - - } catch ( e ) { - - if ( onError ) { - - onError( e ); - - } else { - - console.error( e ); - - } - - scope.manager.itemError( url ); - - } - - }, onProgress, onError ); - - } - - parse( json ) { - - const animations = []; - - for ( let i = 0; i < json.length; i ++ ) { - - const clip = AnimationClip.parse( json[ i ] ); - - animations.push( clip ); - - } - - return animations; - - } - -} - -/** - * Abstract Base class to block based textures loader (dds, pvr, ...) - * - * Sub classes have to implement the parse() method which will be used in load(). - */ - -class CompressedTextureLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - const scope = this; - - const images = []; - - const texture = new CompressedTexture(); - - const loader = new FileLoader( this.manager ); - loader.setPath( this.path ); - loader.setResponseType( 'arraybuffer' ); - loader.setRequestHeader( this.requestHeader ); - loader.setWithCredentials( scope.withCredentials ); - - let loaded = 0; - - function loadTexture( i ) { - - loader.load( url[ i ], function ( buffer ) { - - const texDatas = scope.parse( buffer, true ); - - images[ i ] = { - width: texDatas.width, - height: texDatas.height, - format: texDatas.format, - mipmaps: texDatas.mipmaps - }; - - loaded += 1; - - if ( loaded === 6 ) { - - if ( texDatas.mipmapCount === 1 ) texture.minFilter = LinearFilter; - - texture.image = images; - texture.format = texDatas.format; - texture.needsUpdate = true; - - if ( onLoad ) onLoad( texture ); - - } - - }, onProgress, onError ); - - } - - if ( Array.isArray( url ) ) { - - for ( let i = 0, il = url.length; i < il; ++ i ) { - - loadTexture( i ); - - } - - } else { - - // compressed cubemap texture stored in a single DDS file - - loader.load( url, function ( buffer ) { - - const texDatas = scope.parse( buffer, true ); - - if ( texDatas.isCubemap ) { - - const faces = texDatas.mipmaps.length / texDatas.mipmapCount; - - for ( let f = 0; f < faces; f ++ ) { - - images[ f ] = { mipmaps: [] }; - - for ( let i = 0; i < texDatas.mipmapCount; i ++ ) { - - images[ f ].mipmaps.push( texDatas.mipmaps[ f * texDatas.mipmapCount + i ] ); - images[ f ].format = texDatas.format; - images[ f ].width = texDatas.width; - images[ f ].height = texDatas.height; - - } - - } - - texture.image = images; - - } else { - - texture.image.width = texDatas.width; - texture.image.height = texDatas.height; - texture.mipmaps = texDatas.mipmaps; - - } - - if ( texDatas.mipmapCount === 1 ) { - - texture.minFilter = LinearFilter; - - } - - texture.format = texDatas.format; - texture.needsUpdate = true; - - if ( onLoad ) onLoad( texture ); - - }, onProgress, onError ); - - } - - return texture; - - } - -} - -class ImageLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - if ( this.path !== undefined ) url = this.path + url; - - url = this.manager.resolveURL( url ); - - const scope = this; - - const cached = Cache.get( url ); - - if ( cached !== undefined ) { - - scope.manager.itemStart( url ); - - setTimeout( function () { - - if ( onLoad ) onLoad( cached ); - - scope.manager.itemEnd( url ); - - }, 0 ); - - return cached; - - } - - const image = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'img' ); - - function onImageLoad() { - - image.removeEventListener( 'load', onImageLoad, false ); - image.removeEventListener( 'error', onImageError, false ); - - Cache.add( url, this ); - - if ( onLoad ) onLoad( this ); - - scope.manager.itemEnd( url ); - - } - - function onImageError( event ) { - - image.removeEventListener( 'load', onImageLoad, false ); - image.removeEventListener( 'error', onImageError, false ); - - if ( onError ) onError( event ); - - scope.manager.itemError( url ); - scope.manager.itemEnd( url ); - - } - - image.addEventListener( 'load', onImageLoad, false ); - image.addEventListener( 'error', onImageError, false ); - - if ( url.substr( 0, 5 ) !== 'data:' ) { - - if ( this.crossOrigin !== undefined ) image.crossOrigin = this.crossOrigin; - - } - - scope.manager.itemStart( url ); - - image.src = url; - - return image; - - } - -} - -class CubeTextureLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( urls, onLoad, onProgress, onError ) { - - const texture = new CubeTexture(); - - const loader = new ImageLoader( this.manager ); - loader.setCrossOrigin( this.crossOrigin ); - loader.setPath( this.path ); - - let loaded = 0; - - function loadTexture( i ) { - - loader.load( urls[ i ], function ( image ) { - - texture.images[ i ] = image; - - loaded ++; - - if ( loaded === 6 ) { - - texture.needsUpdate = true; - - if ( onLoad ) onLoad( texture ); - - } - - }, undefined, onError ); - - } - - for ( let i = 0; i < urls.length; ++ i ) { - - loadTexture( i ); - - } - - return texture; - - } - -} - -/** - * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...) - * - * Sub classes have to implement the parse() method which will be used in load(). - */ - -class DataTextureLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - const scope = this; - - const texture = new DataTexture(); - - const loader = new FileLoader( this.manager ); - loader.setResponseType( 'arraybuffer' ); - loader.setRequestHeader( this.requestHeader ); - loader.setPath( this.path ); - loader.setWithCredentials( scope.withCredentials ); - loader.load( url, function ( buffer ) { - - const texData = scope.parse( buffer ); - - if ( ! texData ) return; - - if ( texData.image !== undefined ) { - - texture.image = texData.image; - - } else if ( texData.data !== undefined ) { - - texture.image.width = texData.width; - texture.image.height = texData.height; - texture.image.data = texData.data; - - } - - texture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping; - texture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping; - - texture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter; - texture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter; - - texture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1; - - if ( texData.encoding !== undefined ) { - - texture.encoding = texData.encoding; - - } - - if ( texData.flipY !== undefined ) { - - texture.flipY = texData.flipY; - - } - - if ( texData.format !== undefined ) { - - texture.format = texData.format; - - } - - if ( texData.type !== undefined ) { - - texture.type = texData.type; - - } - - if ( texData.mipmaps !== undefined ) { - - texture.mipmaps = texData.mipmaps; - texture.minFilter = LinearMipmapLinearFilter; // presumably... - - } - - if ( texData.mipmapCount === 1 ) { - - texture.minFilter = LinearFilter; - - } - - if ( texData.generateMipmaps !== undefined ) { - - texture.generateMipmaps = texData.generateMipmaps; - - } - - texture.needsUpdate = true; - - if ( onLoad ) onLoad( texture, texData ); - - }, onProgress, onError ); - - - return texture; - - } - -} - -class TextureLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - const texture = new Texture(); - - const loader = new ImageLoader( this.manager ); - loader.setCrossOrigin( this.crossOrigin ); - loader.setPath( this.path ); - - loader.load( url, function ( image ) { - - texture.image = image; - - // JPEGs can't have an alpha channel, so memory can be saved by storing them as RGB. - const isJPEG = url.search( /\.jpe?g($|\?)/i ) > 0 || url.search( /^data\:image\/jpeg/ ) === 0; - - texture.format = isJPEG ? RGBFormat : RGBAFormat; - texture.needsUpdate = true; - - if ( onLoad !== undefined ) { - - onLoad( texture ); - - } - - }, onProgress, onError ); - - return texture; - - } - -} - -/************************************************************** - * Curved Path - a curve path is simply a array of connected - * curves, but retains the api of a curve - **************************************************************/ - -class CurvePath extends Curve { - - constructor() { - - super(); - - this.type = 'CurvePath'; - - this.curves = []; - this.autoClose = false; // Automatically closes the path - - } - - add( curve ) { - - this.curves.push( curve ); - - } - - closePath() { - - // Add a line curve if start and end of lines are not connected - const startPoint = this.curves[ 0 ].getPoint( 0 ); - const endPoint = this.curves[ this.curves.length - 1 ].getPoint( 1 ); - - if ( ! startPoint.equals( endPoint ) ) { - - this.curves.push( new LineCurve( endPoint, startPoint ) ); - - } - - } - - // To get accurate point with reference to - // entire path distance at time t, - // following has to be done: - - // 1. Length of each sub path have to be known - // 2. Locate and identify type of curve - // 3. Get t for the curve - // 4. Return curve.getPointAt(t') - - getPoint( t ) { - - const d = t * this.getLength(); - const curveLengths = this.getCurveLengths(); - let i = 0; - - // To think about boundaries points. - - while ( i < curveLengths.length ) { - - if ( curveLengths[ i ] >= d ) { - - const diff = curveLengths[ i ] - d; - const curve = this.curves[ i ]; - - const segmentLength = curve.getLength(); - const u = segmentLength === 0 ? 0 : 1 - diff / segmentLength; - - return curve.getPointAt( u ); - - } - - i ++; - - } - - return null; - - // loop where sum != 0, sum > d , sum+1 1 && ! points[ points.length - 1 ].equals( points[ 0 ] ) ) { - - points.push( points[ 0 ] ); - - } - - return points; - - } - - copy( source ) { - - super.copy( source ); - - this.curves = []; - - for ( let i = 0, l = source.curves.length; i < l; i ++ ) { - - const curve = source.curves[ i ]; - - this.curves.push( curve.clone() ); - - } - - this.autoClose = source.autoClose; - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.autoClose = this.autoClose; - data.curves = []; - - for ( let i = 0, l = this.curves.length; i < l; i ++ ) { - - const curve = this.curves[ i ]; - data.curves.push( curve.toJSON() ); - - } - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.autoClose = json.autoClose; - this.curves = []; - - for ( let i = 0, l = json.curves.length; i < l; i ++ ) { - - const curve = json.curves[ i ]; - this.curves.push( new Curves[ curve.type ]().fromJSON( curve ) ); - - } - - return this; - - } - -} - -class Path extends CurvePath { - - constructor( points ) { - - super(); - this.type = 'Path'; - - this.currentPoint = new Vector2(); - - if ( points ) { - - this.setFromPoints( points ); - - } - - } - - setFromPoints( points ) { - - this.moveTo( points[ 0 ].x, points[ 0 ].y ); - - for ( let i = 1, l = points.length; i < l; i ++ ) { - - this.lineTo( points[ i ].x, points[ i ].y ); - - } - - return this; - - } - - moveTo( x, y ) { - - this.currentPoint.set( x, y ); // TODO consider referencing vectors instead of copying? - - return this; - - } - - lineTo( x, y ) { - - const curve = new LineCurve( this.currentPoint.clone(), new Vector2( x, y ) ); - this.curves.push( curve ); - - this.currentPoint.set( x, y ); - - return this; - - } - - quadraticCurveTo( aCPx, aCPy, aX, aY ) { - - const curve = new QuadraticBezierCurve( - this.currentPoint.clone(), - new Vector2( aCPx, aCPy ), - new Vector2( aX, aY ) - ); - - this.curves.push( curve ); - - this.currentPoint.set( aX, aY ); - - return this; - - } - - bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) { - - const curve = new CubicBezierCurve( - this.currentPoint.clone(), - new Vector2( aCP1x, aCP1y ), - new Vector2( aCP2x, aCP2y ), - new Vector2( aX, aY ) - ); - - this.curves.push( curve ); - - this.currentPoint.set( aX, aY ); - - return this; - - } - - splineThru( pts /*Array of Vector*/ ) { - - const npts = [ this.currentPoint.clone() ].concat( pts ); - - const curve = new SplineCurve( npts ); - this.curves.push( curve ); - - this.currentPoint.copy( pts[ pts.length - 1 ] ); - - return this; - - } - - arc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { - - const x0 = this.currentPoint.x; - const y0 = this.currentPoint.y; - - this.absarc( aX + x0, aY + y0, aRadius, - aStartAngle, aEndAngle, aClockwise ); - - return this; - - } - - absarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) { - - this.absellipse( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise ); - - return this; - - } - - ellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) { - - const x0 = this.currentPoint.x; - const y0 = this.currentPoint.y; - - this.absellipse( aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ); - - return this; - - } - - absellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) { - - const curve = new EllipseCurve( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ); - - if ( this.curves.length > 0 ) { - - // if a previous curve is present, attempt to join - const firstPoint = curve.getPoint( 0 ); - - if ( ! firstPoint.equals( this.currentPoint ) ) { - - this.lineTo( firstPoint.x, firstPoint.y ); - - } - - } - - this.curves.push( curve ); - - const lastPoint = curve.getPoint( 1 ); - this.currentPoint.copy( lastPoint ); - - return this; - - } - - copy( source ) { - - super.copy( source ); - - this.currentPoint.copy( source.currentPoint ); - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.currentPoint = this.currentPoint.toArray(); - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.currentPoint.fromArray( json.currentPoint ); - - return this; - - } - -} - -class Shape extends Path { - - constructor( points ) { - - super( points ); - - this.uuid = generateUUID(); - - this.type = 'Shape'; - - this.holes = []; - - } - - getPointsHoles( divisions ) { - - const holesPts = []; - - for ( let i = 0, l = this.holes.length; i < l; i ++ ) { - - holesPts[ i ] = this.holes[ i ].getPoints( divisions ); - - } - - return holesPts; - - } - - // get points of shape and holes (keypoints based on segments parameter) - - extractPoints( divisions ) { - - return { - - shape: this.getPoints( divisions ), - holes: this.getPointsHoles( divisions ) - - }; - - } - - copy( source ) { - - super.copy( source ); - - this.holes = []; - - for ( let i = 0, l = source.holes.length; i < l; i ++ ) { - - const hole = source.holes[ i ]; - - this.holes.push( hole.clone() ); - - } - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.uuid = this.uuid; - data.holes = []; - - for ( let i = 0, l = this.holes.length; i < l; i ++ ) { - - const hole = this.holes[ i ]; - data.holes.push( hole.toJSON() ); - - } - - return data; - - } - - fromJSON( json ) { - - super.fromJSON( json ); - - this.uuid = json.uuid; - this.holes = []; - - for ( let i = 0, l = json.holes.length; i < l; i ++ ) { - - const hole = json.holes[ i ]; - this.holes.push( new Path().fromJSON( hole ) ); - - } - - return this; - - } - -} - -class Light extends Object3D { - - constructor( color, intensity = 1 ) { - - super(); - - this.type = 'Light'; - - this.color = new Color( color ); - this.intensity = intensity; - - } - - dispose() { - - // Empty here in base class; some subclasses override. - - } - - copy( source ) { - - super.copy( source ); - - this.color.copy( source.color ); - this.intensity = source.intensity; - - return this; - - } - - toJSON( meta ) { - - const data = super.toJSON( meta ); - - data.object.color = this.color.getHex(); - data.object.intensity = this.intensity; - - if ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex(); - - if ( this.distance !== undefined ) data.object.distance = this.distance; - if ( this.angle !== undefined ) data.object.angle = this.angle; - if ( this.decay !== undefined ) data.object.decay = this.decay; - if ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra; - - if ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON(); - - return data; - - } - -} - -Light.prototype.isLight = true; - -class HemisphereLight extends Light { - - constructor( skyColor, groundColor, intensity ) { - - super( skyColor, intensity ); - - this.type = 'HemisphereLight'; - - this.position.copy( Object3D.DefaultUp ); - this.updateMatrix(); - - this.groundColor = new Color( groundColor ); - - } - - copy( source ) { - - Light.prototype.copy.call( this, source ); - - this.groundColor.copy( source.groundColor ); - - return this; - - } - -} - -HemisphereLight.prototype.isHemisphereLight = true; - -const _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4(); -const _lightPositionWorld$1 = /*@__PURE__*/ new Vector3(); -const _lookTarget$1 = /*@__PURE__*/ new Vector3(); - -class LightShadow { - - constructor( camera ) { - - this.camera = camera; - - this.bias = 0; - this.normalBias = 0; - this.radius = 1; - - this.mapSize = new Vector2( 512, 512 ); - - this.map = null; - this.mapPass = null; - this.matrix = new Matrix4(); - - this.autoUpdate = true; - this.needsUpdate = false; - - this._frustum = new Frustum(); - this._frameExtents = new Vector2( 1, 1 ); - - this._viewportCount = 1; - - this._viewports = [ - - new Vector4( 0, 0, 1, 1 ) - - ]; - - } - - getViewportCount() { - - return this._viewportCount; - - } - - getFrustum() { - - return this._frustum; - - } - - updateMatrices( light ) { - - const shadowCamera = this.camera; - const shadowMatrix = this.matrix; - - _lightPositionWorld$1.setFromMatrixPosition( light.matrixWorld ); - shadowCamera.position.copy( _lightPositionWorld$1 ); - - _lookTarget$1.setFromMatrixPosition( light.target.matrixWorld ); - shadowCamera.lookAt( _lookTarget$1 ); - shadowCamera.updateMatrixWorld(); - - _projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse ); - this._frustum.setFromProjectionMatrix( _projScreenMatrix$1 ); - - shadowMatrix.set( - 0.5, 0.0, 0.0, 0.5, - 0.0, 0.5, 0.0, 0.5, - 0.0, 0.0, 0.5, 0.5, - 0.0, 0.0, 0.0, 1.0 - ); - - shadowMatrix.multiply( shadowCamera.projectionMatrix ); - shadowMatrix.multiply( shadowCamera.matrixWorldInverse ); - - } - - getViewport( viewportIndex ) { - - return this._viewports[ viewportIndex ]; - - } - - getFrameExtents() { - - return this._frameExtents; - - } - - dispose() { - - if ( this.map ) { - - this.map.dispose(); - - } - - if ( this.mapPass ) { - - this.mapPass.dispose(); - - } - - } - - copy( source ) { - - this.camera = source.camera.clone(); - - this.bias = source.bias; - this.radius = source.radius; - - this.mapSize.copy( source.mapSize ); - - return this; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - toJSON() { - - const object = {}; - - if ( this.bias !== 0 ) object.bias = this.bias; - if ( this.normalBias !== 0 ) object.normalBias = this.normalBias; - if ( this.radius !== 1 ) object.radius = this.radius; - if ( this.mapSize.x !== 512 || this.mapSize.y !== 512 ) object.mapSize = this.mapSize.toArray(); - - object.camera = this.camera.toJSON( false ).object; - delete object.camera.matrix; - - return object; - - } - -} - -class SpotLightShadow extends LightShadow { - - constructor() { - - super( new PerspectiveCamera( 50, 1, 0.5, 500 ) ); - - this.focus = 1; - - } - - updateMatrices( light ) { - - const camera = this.camera; - - const fov = RAD2DEG * 2 * light.angle * this.focus; - const aspect = this.mapSize.width / this.mapSize.height; - const far = light.distance || camera.far; - - if ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) { - - camera.fov = fov; - camera.aspect = aspect; - camera.far = far; - camera.updateProjectionMatrix(); - - } - - super.updateMatrices( light ); - - } - - copy( source ) { - - super.copy( source ); - - this.focus = source.focus; - - return this; - - } - -} - -SpotLightShadow.prototype.isSpotLightShadow = true; - -class SpotLight extends Light { - - constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 1 ) { - - super( color, intensity ); - - this.type = 'SpotLight'; - - this.position.copy( Object3D.DefaultUp ); - this.updateMatrix(); - - this.target = new Object3D(); - - this.distance = distance; - this.angle = angle; - this.penumbra = penumbra; - this.decay = decay; // for physically correct lights, should be 2. - - this.shadow = new SpotLightShadow(); - - } - - get power() { - - // intensity = power per solid angle. - // ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf - return this.intensity * Math.PI; - - } - - set power( power ) { - - // intensity = power per solid angle. - // ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf - this.intensity = power / Math.PI; - - } - - dispose() { - - this.shadow.dispose(); - - } - - copy( source ) { - - super.copy( source ); - - this.distance = source.distance; - this.angle = source.angle; - this.penumbra = source.penumbra; - this.decay = source.decay; - - this.target = source.target.clone(); - - this.shadow = source.shadow.clone(); - - return this; - - } - -} - -SpotLight.prototype.isSpotLight = true; - -const _projScreenMatrix = /*@__PURE__*/ new Matrix4(); -const _lightPositionWorld = /*@__PURE__*/ new Vector3(); -const _lookTarget = /*@__PURE__*/ new Vector3(); - -class PointLightShadow extends LightShadow { - - constructor() { - - super( new PerspectiveCamera( 90, 1, 0.5, 500 ) ); - - this._frameExtents = new Vector2( 4, 2 ); - - this._viewportCount = 6; - - this._viewports = [ - // These viewports map a cube-map onto a 2D texture with the - // following orientation: - // - // xzXZ - // y Y - // - // X - Positive x direction - // x - Negative x direction - // Y - Positive y direction - // y - Negative y direction - // Z - Positive z direction - // z - Negative z direction - - // positive X - new Vector4( 2, 1, 1, 1 ), - // negative X - new Vector4( 0, 1, 1, 1 ), - // positive Z - new Vector4( 3, 1, 1, 1 ), - // negative Z - new Vector4( 1, 1, 1, 1 ), - // positive Y - new Vector4( 3, 0, 1, 1 ), - // negative Y - new Vector4( 1, 0, 1, 1 ) - ]; - - this._cubeDirections = [ - new Vector3( 1, 0, 0 ), new Vector3( - 1, 0, 0 ), new Vector3( 0, 0, 1 ), - new Vector3( 0, 0, - 1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, - 1, 0 ) - ]; - - this._cubeUps = [ - new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), - new Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ), new Vector3( 0, 0, - 1 ) - ]; - - } - - updateMatrices( light, viewportIndex = 0 ) { - - const camera = this.camera; - const shadowMatrix = this.matrix; - - const far = light.distance || camera.far; - - if ( far !== camera.far ) { - - camera.far = far; - camera.updateProjectionMatrix(); - - } - - _lightPositionWorld.setFromMatrixPosition( light.matrixWorld ); - camera.position.copy( _lightPositionWorld ); - - _lookTarget.copy( camera.position ); - _lookTarget.add( this._cubeDirections[ viewportIndex ] ); - camera.up.copy( this._cubeUps[ viewportIndex ] ); - camera.lookAt( _lookTarget ); - camera.updateMatrixWorld(); - - shadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z ); - - _projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse ); - this._frustum.setFromProjectionMatrix( _projScreenMatrix ); - - } - -} - -PointLightShadow.prototype.isPointLightShadow = true; - -class PointLight extends Light { - - constructor( color, intensity, distance = 0, decay = 1 ) { - - super( color, intensity ); - - this.type = 'PointLight'; - - this.distance = distance; - this.decay = decay; // for physically correct lights, should be 2. - - this.shadow = new PointLightShadow(); - - } - - get power() { - - // intensity = power per solid angle. - // ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf - return this.intensity * 4 * Math.PI; - - } - - set power( power ) { - - // intensity = power per solid angle. - // ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf - this.intensity = power / ( 4 * Math.PI ); - - } - - dispose() { - - this.shadow.dispose(); - - } - - copy( source ) { - - super.copy( source ); - - this.distance = source.distance; - this.decay = source.decay; - - this.shadow = source.shadow.clone(); - - return this; - - } - -} - -PointLight.prototype.isPointLight = true; - -class OrthographicCamera extends Camera { - - constructor( left = - 1, right = 1, top = 1, bottom = - 1, near = 0.1, far = 2000 ) { - - super(); - - this.type = 'OrthographicCamera'; - - this.zoom = 1; - this.view = null; - - this.left = left; - this.right = right; - this.top = top; - this.bottom = bottom; - - this.near = near; - this.far = far; - - this.updateProjectionMatrix(); - - } - - copy( source, recursive ) { - - super.copy( source, recursive ); - - this.left = source.left; - this.right = source.right; - this.top = source.top; - this.bottom = source.bottom; - this.near = source.near; - this.far = source.far; - - this.zoom = source.zoom; - this.view = source.view === null ? null : Object.assign( {}, source.view ); - - return this; - - } - - setViewOffset( fullWidth, fullHeight, x, y, width, height ) { - - if ( this.view === null ) { - - this.view = { - enabled: true, - fullWidth: 1, - fullHeight: 1, - offsetX: 0, - offsetY: 0, - width: 1, - height: 1 - }; - - } - - this.view.enabled = true; - this.view.fullWidth = fullWidth; - this.view.fullHeight = fullHeight; - this.view.offsetX = x; - this.view.offsetY = y; - this.view.width = width; - this.view.height = height; - - this.updateProjectionMatrix(); - - } - - clearViewOffset() { - - if ( this.view !== null ) { - - this.view.enabled = false; - - } - - this.updateProjectionMatrix(); - - } - - updateProjectionMatrix() { - - const dx = ( this.right - this.left ) / ( 2 * this.zoom ); - const dy = ( this.top - this.bottom ) / ( 2 * this.zoom ); - const cx = ( this.right + this.left ) / 2; - const cy = ( this.top + this.bottom ) / 2; - - let left = cx - dx; - let right = cx + dx; - let top = cy + dy; - let bottom = cy - dy; - - if ( this.view !== null && this.view.enabled ) { - - const scaleW = ( this.right - this.left ) / this.view.fullWidth / this.zoom; - const scaleH = ( this.top - this.bottom ) / this.view.fullHeight / this.zoom; - - left += scaleW * this.view.offsetX; - right = left + scaleW * this.view.width; - top -= scaleH * this.view.offsetY; - bottom = top - scaleH * this.view.height; - - } - - this.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far ); - - this.projectionMatrixInverse.copy( this.projectionMatrix ).invert(); - - } - - toJSON( meta ) { - - const data = super.toJSON( meta ); - - data.object.zoom = this.zoom; - data.object.left = this.left; - data.object.right = this.right; - data.object.top = this.top; - data.object.bottom = this.bottom; - data.object.near = this.near; - data.object.far = this.far; - - if ( this.view !== null ) data.object.view = Object.assign( {}, this.view ); - - return data; - - } - -} - -OrthographicCamera.prototype.isOrthographicCamera = true; - -class DirectionalLightShadow extends LightShadow { - - constructor() { - - super( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) ); - - } - -} - -DirectionalLightShadow.prototype.isDirectionalLightShadow = true; - -class DirectionalLight extends Light { - - constructor( color, intensity ) { - - super( color, intensity ); - - this.type = 'DirectionalLight'; - - this.position.copy( Object3D.DefaultUp ); - this.updateMatrix(); - - this.target = new Object3D(); - - this.shadow = new DirectionalLightShadow(); - - } - - dispose() { - - this.shadow.dispose(); - - } - - copy( source ) { - - super.copy( source ); - - this.target = source.target.clone(); - this.shadow = source.shadow.clone(); - - return this; - - } - -} - -DirectionalLight.prototype.isDirectionalLight = true; - -class AmbientLight extends Light { - - constructor( color, intensity ) { - - super( color, intensity ); - - this.type = 'AmbientLight'; - - } - -} - -AmbientLight.prototype.isAmbientLight = true; - -class RectAreaLight extends Light { - - constructor( color, intensity, width = 10, height = 10 ) { - - super( color, intensity ); - - this.type = 'RectAreaLight'; - - this.width = width; - this.height = height; - - } - - copy( source ) { - - super.copy( source ); - - this.width = source.width; - this.height = source.height; - - return this; - - } - - toJSON( meta ) { - - const data = super.toJSON( meta ); - - data.object.width = this.width; - data.object.height = this.height; - - return data; - - } - -} - -RectAreaLight.prototype.isRectAreaLight = true; - -/** - * Primary reference: - * https://graphics.stanford.edu/papers/envmap/envmap.pdf - * - * Secondary reference: - * https://www.ppsloan.org/publications/StupidSH36.pdf - */ - -// 3-band SH defined by 9 coefficients - -class SphericalHarmonics3 { - - constructor() { - - this.coefficients = []; - - for ( let i = 0; i < 9; i ++ ) { - - this.coefficients.push( new Vector3() ); - - } - - } - - set( coefficients ) { - - for ( let i = 0; i < 9; i ++ ) { - - this.coefficients[ i ].copy( coefficients[ i ] ); - - } - - return this; - - } - - zero() { - - for ( let i = 0; i < 9; i ++ ) { - - this.coefficients[ i ].set( 0, 0, 0 ); - - } - - return this; - - } - - // get the radiance in the direction of the normal - // target is a Vector3 - getAt( normal, target ) { - - // normal is assumed to be unit length - - const x = normal.x, y = normal.y, z = normal.z; - - const coeff = this.coefficients; - - // band 0 - target.copy( coeff[ 0 ] ).multiplyScalar( 0.282095 ); - - // band 1 - target.addScaledVector( coeff[ 1 ], 0.488603 * y ); - target.addScaledVector( coeff[ 2 ], 0.488603 * z ); - target.addScaledVector( coeff[ 3 ], 0.488603 * x ); - - // band 2 - target.addScaledVector( coeff[ 4 ], 1.092548 * ( x * y ) ); - target.addScaledVector( coeff[ 5 ], 1.092548 * ( y * z ) ); - target.addScaledVector( coeff[ 6 ], 0.315392 * ( 3.0 * z * z - 1.0 ) ); - target.addScaledVector( coeff[ 7 ], 1.092548 * ( x * z ) ); - target.addScaledVector( coeff[ 8 ], 0.546274 * ( x * x - y * y ) ); - - return target; - - } - - // get the irradiance (radiance convolved with cosine lobe) in the direction of the normal - // target is a Vector3 - // https://graphics.stanford.edu/papers/envmap/envmap.pdf - getIrradianceAt( normal, target ) { - - // normal is assumed to be unit length - - const x = normal.x, y = normal.y, z = normal.z; - - const coeff = this.coefficients; - - // band 0 - target.copy( coeff[ 0 ] ).multiplyScalar( 0.886227 ); // π * 0.282095 - - // band 1 - target.addScaledVector( coeff[ 1 ], 2.0 * 0.511664 * y ); // ( 2 * π / 3 ) * 0.488603 - target.addScaledVector( coeff[ 2 ], 2.0 * 0.511664 * z ); - target.addScaledVector( coeff[ 3 ], 2.0 * 0.511664 * x ); - - // band 2 - target.addScaledVector( coeff[ 4 ], 2.0 * 0.429043 * x * y ); // ( π / 4 ) * 1.092548 - target.addScaledVector( coeff[ 5 ], 2.0 * 0.429043 * y * z ); - target.addScaledVector( coeff[ 6 ], 0.743125 * z * z - 0.247708 ); // ( π / 4 ) * 0.315392 * 3 - target.addScaledVector( coeff[ 7 ], 2.0 * 0.429043 * x * z ); - target.addScaledVector( coeff[ 8 ], 0.429043 * ( x * x - y * y ) ); // ( π / 4 ) * 0.546274 - - return target; - - } - - add( sh ) { - - for ( let i = 0; i < 9; i ++ ) { - - this.coefficients[ i ].add( sh.coefficients[ i ] ); - - } - - return this; - - } - - addScaledSH( sh, s ) { - - for ( let i = 0; i < 9; i ++ ) { - - this.coefficients[ i ].addScaledVector( sh.coefficients[ i ], s ); - - } - - return this; - - } - - scale( s ) { - - for ( let i = 0; i < 9; i ++ ) { - - this.coefficients[ i ].multiplyScalar( s ); - - } - - return this; - - } - - lerp( sh, alpha ) { - - for ( let i = 0; i < 9; i ++ ) { - - this.coefficients[ i ].lerp( sh.coefficients[ i ], alpha ); - - } - - return this; - - } - - equals( sh ) { - - for ( let i = 0; i < 9; i ++ ) { - - if ( ! this.coefficients[ i ].equals( sh.coefficients[ i ] ) ) { - - return false; - - } - - } - - return true; - - } - - copy( sh ) { - - return this.set( sh.coefficients ); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - fromArray( array, offset = 0 ) { - - const coefficients = this.coefficients; - - for ( let i = 0; i < 9; i ++ ) { - - coefficients[ i ].fromArray( array, offset + ( i * 3 ) ); - - } - - return this; - - } - - toArray( array = [], offset = 0 ) { - - const coefficients = this.coefficients; - - for ( let i = 0; i < 9; i ++ ) { - - coefficients[ i ].toArray( array, offset + ( i * 3 ) ); - - } - - return array; - - } - - // evaluate the basis functions - // shBasis is an Array[ 9 ] - static getBasisAt( normal, shBasis ) { - - // normal is assumed to be unit length - - const x = normal.x, y = normal.y, z = normal.z; - - // band 0 - shBasis[ 0 ] = 0.282095; - - // band 1 - shBasis[ 1 ] = 0.488603 * y; - shBasis[ 2 ] = 0.488603 * z; - shBasis[ 3 ] = 0.488603 * x; - - // band 2 - shBasis[ 4 ] = 1.092548 * x * y; - shBasis[ 5 ] = 1.092548 * y * z; - shBasis[ 6 ] = 0.315392 * ( 3 * z * z - 1 ); - shBasis[ 7 ] = 1.092548 * x * z; - shBasis[ 8 ] = 0.546274 * ( x * x - y * y ); - - } - -} - -SphericalHarmonics3.prototype.isSphericalHarmonics3 = true; - -class LightProbe extends Light { - - constructor( sh = new SphericalHarmonics3(), intensity = 1 ) { - - super( undefined, intensity ); - - this.sh = sh; - - } - - copy( source ) { - - super.copy( source ); - - this.sh.copy( source.sh ); - - return this; - - } - - fromJSON( json ) { - - this.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON(); - this.sh.fromArray( json.sh ); - - return this; - - } - - toJSON( meta ) { - - const data = super.toJSON( meta ); - - data.object.sh = this.sh.toArray(); - - return data; - - } - -} - -LightProbe.prototype.isLightProbe = true; - -class MaterialLoader extends Loader { - - constructor( manager ) { - - super( manager ); - this.textures = {}; - - } - - load( url, onLoad, onProgress, onError ) { - - const scope = this; - - const loader = new FileLoader( scope.manager ); - loader.setPath( scope.path ); - loader.setRequestHeader( scope.requestHeader ); - loader.setWithCredentials( scope.withCredentials ); - loader.load( url, function ( text ) { - - try { - - onLoad( scope.parse( JSON.parse( text ) ) ); - - } catch ( e ) { - - if ( onError ) { - - onError( e ); - - } else { - - console.error( e ); - - } - - scope.manager.itemError( url ); - - } - - }, onProgress, onError ); - - } - - parse( json ) { - - const textures = this.textures; - - function getTexture( name ) { - - if ( textures[ name ] === undefined ) { - - console.warn( 'THREE.MaterialLoader: Undefined texture', name ); - - } - - return textures[ name ]; - - } - - const material = new Materials[ json.type ](); - - if ( json.uuid !== undefined ) material.uuid = json.uuid; - if ( json.name !== undefined ) material.name = json.name; - if ( json.color !== undefined && material.color !== undefined ) material.color.setHex( json.color ); - if ( json.roughness !== undefined ) material.roughness = json.roughness; - if ( json.metalness !== undefined ) material.metalness = json.metalness; - if ( json.sheen !== undefined ) material.sheen = new Color().setHex( json.sheen ); - if ( json.emissive !== undefined && material.emissive !== undefined ) material.emissive.setHex( json.emissive ); - if ( json.specular !== undefined && material.specular !== undefined ) material.specular.setHex( json.specular ); - if ( json.shininess !== undefined ) material.shininess = json.shininess; - if ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat; - if ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness; - if ( json.transmission !== undefined ) material.transmission = json.transmission; - if ( json.thickness !== undefined ) material.thickness = json.thickness; - if ( json.attenuationDistance !== undefined ) material.attenuationDistance = json.attenuationDistance; - if ( json.attenuationColor !== undefined && material.attenuationColor !== undefined ) material.attenuationColor.setHex( json.attenuationColor ); - if ( json.fog !== undefined ) material.fog = json.fog; - if ( json.flatShading !== undefined ) material.flatShading = json.flatShading; - if ( json.blending !== undefined ) material.blending = json.blending; - if ( json.combine !== undefined ) material.combine = json.combine; - if ( json.side !== undefined ) material.side = json.side; - if ( json.shadowSide !== undefined ) material.shadowSide = json.shadowSide; - if ( json.opacity !== undefined ) material.opacity = json.opacity; - if ( json.transparent !== undefined ) material.transparent = json.transparent; - if ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest; - if ( json.depthTest !== undefined ) material.depthTest = json.depthTest; - if ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite; - if ( json.colorWrite !== undefined ) material.colorWrite = json.colorWrite; - - if ( json.stencilWrite !== undefined ) material.stencilWrite = json.stencilWrite; - if ( json.stencilWriteMask !== undefined ) material.stencilWriteMask = json.stencilWriteMask; - if ( json.stencilFunc !== undefined ) material.stencilFunc = json.stencilFunc; - if ( json.stencilRef !== undefined ) material.stencilRef = json.stencilRef; - if ( json.stencilFuncMask !== undefined ) material.stencilFuncMask = json.stencilFuncMask; - if ( json.stencilFail !== undefined ) material.stencilFail = json.stencilFail; - if ( json.stencilZFail !== undefined ) material.stencilZFail = json.stencilZFail; - if ( json.stencilZPass !== undefined ) material.stencilZPass = json.stencilZPass; - - if ( json.wireframe !== undefined ) material.wireframe = json.wireframe; - if ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth; - if ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap; - if ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin; - - if ( json.rotation !== undefined ) material.rotation = json.rotation; - - if ( json.linewidth !== 1 ) material.linewidth = json.linewidth; - if ( json.dashSize !== undefined ) material.dashSize = json.dashSize; - if ( json.gapSize !== undefined ) material.gapSize = json.gapSize; - if ( json.scale !== undefined ) material.scale = json.scale; - - if ( json.polygonOffset !== undefined ) material.polygonOffset = json.polygonOffset; - if ( json.polygonOffsetFactor !== undefined ) material.polygonOffsetFactor = json.polygonOffsetFactor; - if ( json.polygonOffsetUnits !== undefined ) material.polygonOffsetUnits = json.polygonOffsetUnits; - - if ( json.morphTargets !== undefined ) material.morphTargets = json.morphTargets; - if ( json.morphNormals !== undefined ) material.morphNormals = json.morphNormals; - if ( json.dithering !== undefined ) material.dithering = json.dithering; - - if ( json.alphaToCoverage !== undefined ) material.alphaToCoverage = json.alphaToCoverage; - if ( json.premultipliedAlpha !== undefined ) material.premultipliedAlpha = json.premultipliedAlpha; - - if ( json.vertexTangents !== undefined ) material.vertexTangents = json.vertexTangents; - - if ( json.visible !== undefined ) material.visible = json.visible; - - if ( json.toneMapped !== undefined ) material.toneMapped = json.toneMapped; - - if ( json.userData !== undefined ) material.userData = json.userData; - - if ( json.vertexColors !== undefined ) { - - if ( typeof json.vertexColors === 'number' ) { - - material.vertexColors = ( json.vertexColors > 0 ) ? true : false; - - } else { - - material.vertexColors = json.vertexColors; - - } - - } - - // Shader Material - - if ( json.uniforms !== undefined ) { - - for ( const name in json.uniforms ) { - - const uniform = json.uniforms[ name ]; - - material.uniforms[ name ] = {}; - - switch ( uniform.type ) { - - case 't': - material.uniforms[ name ].value = getTexture( uniform.value ); - break; - - case 'c': - material.uniforms[ name ].value = new Color().setHex( uniform.value ); - break; - - case 'v2': - material.uniforms[ name ].value = new Vector2().fromArray( uniform.value ); - break; - - case 'v3': - material.uniforms[ name ].value = new Vector3().fromArray( uniform.value ); - break; - - case 'v4': - material.uniforms[ name ].value = new Vector4().fromArray( uniform.value ); - break; - - case 'm3': - material.uniforms[ name ].value = new Matrix3().fromArray( uniform.value ); - break; - - case 'm4': - material.uniforms[ name ].value = new Matrix4().fromArray( uniform.value ); - break; - - default: - material.uniforms[ name ].value = uniform.value; - - } - - } - - } - - if ( json.defines !== undefined ) material.defines = json.defines; - if ( json.vertexShader !== undefined ) material.vertexShader = json.vertexShader; - if ( json.fragmentShader !== undefined ) material.fragmentShader = json.fragmentShader; - - if ( json.extensions !== undefined ) { - - for ( const key in json.extensions ) { - - material.extensions[ key ] = json.extensions[ key ]; - - } - - } - - // Deprecated - - if ( json.shading !== undefined ) material.flatShading = json.shading === 1; // THREE.FlatShading - - // for PointsMaterial - - if ( json.size !== undefined ) material.size = json.size; - if ( json.sizeAttenuation !== undefined ) material.sizeAttenuation = json.sizeAttenuation; - - // maps - - if ( json.map !== undefined ) material.map = getTexture( json.map ); - if ( json.matcap !== undefined ) material.matcap = getTexture( json.matcap ); - - if ( json.alphaMap !== undefined ) material.alphaMap = getTexture( json.alphaMap ); - - if ( json.bumpMap !== undefined ) material.bumpMap = getTexture( json.bumpMap ); - if ( json.bumpScale !== undefined ) material.bumpScale = json.bumpScale; - - if ( json.normalMap !== undefined ) material.normalMap = getTexture( json.normalMap ); - if ( json.normalMapType !== undefined ) material.normalMapType = json.normalMapType; - if ( json.normalScale !== undefined ) { - - let normalScale = json.normalScale; - - if ( Array.isArray( normalScale ) === false ) { - - // Blender exporter used to export a scalar. See #7459 - - normalScale = [ normalScale, normalScale ]; - - } - - material.normalScale = new Vector2().fromArray( normalScale ); - - } - - if ( json.displacementMap !== undefined ) material.displacementMap = getTexture( json.displacementMap ); - if ( json.displacementScale !== undefined ) material.displacementScale = json.displacementScale; - if ( json.displacementBias !== undefined ) material.displacementBias = json.displacementBias; - - if ( json.roughnessMap !== undefined ) material.roughnessMap = getTexture( json.roughnessMap ); - if ( json.metalnessMap !== undefined ) material.metalnessMap = getTexture( json.metalnessMap ); - - if ( json.emissiveMap !== undefined ) material.emissiveMap = getTexture( json.emissiveMap ); - if ( json.emissiveIntensity !== undefined ) material.emissiveIntensity = json.emissiveIntensity; - - if ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap ); - - if ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap ); - if ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity; - - if ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity; - if ( json.refractionRatio !== undefined ) material.refractionRatio = json.refractionRatio; - - if ( json.lightMap !== undefined ) material.lightMap = getTexture( json.lightMap ); - if ( json.lightMapIntensity !== undefined ) material.lightMapIntensity = json.lightMapIntensity; - - if ( json.aoMap !== undefined ) material.aoMap = getTexture( json.aoMap ); - if ( json.aoMapIntensity !== undefined ) material.aoMapIntensity = json.aoMapIntensity; - - if ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap ); - - if ( json.clearcoatMap !== undefined ) material.clearcoatMap = getTexture( json.clearcoatMap ); - if ( json.clearcoatRoughnessMap !== undefined ) material.clearcoatRoughnessMap = getTexture( json.clearcoatRoughnessMap ); - if ( json.clearcoatNormalMap !== undefined ) material.clearcoatNormalMap = getTexture( json.clearcoatNormalMap ); - if ( json.clearcoatNormalScale !== undefined ) material.clearcoatNormalScale = new Vector2().fromArray( json.clearcoatNormalScale ); - - if ( json.transmissionMap !== undefined ) material.transmissionMap = getTexture( json.transmissionMap ); - if ( json.thicknessMap !== undefined ) material.thicknessMap = getTexture( json.thicknessMap ); - - return material; - - } - - setTextures( value ) { - - this.textures = value; - return this; - - } - -} - -class LoaderUtils { - - static decodeText( array ) { - - if ( typeof TextDecoder !== 'undefined' ) { - - return new TextDecoder().decode( array ); - - } - - // Avoid the String.fromCharCode.apply(null, array) shortcut, which - // throws a "maximum call stack size exceeded" error for large arrays. - - let s = ''; - - for ( let i = 0, il = array.length; i < il; i ++ ) { - - // Implicitly assumes little-endian. - s += String.fromCharCode( array[ i ] ); - - } - - try { - - // merges multi-byte utf-8 characters. - - return decodeURIComponent( escape( s ) ); - - } catch ( e ) { // see #16358 - - return s; - - } - - } - - static extractUrlBase( url ) { - - const index = url.lastIndexOf( '/' ); - - if ( index === - 1 ) return './'; - - return url.substr( 0, index + 1 ); - - } - -} - -class InstancedBufferGeometry extends BufferGeometry { - - constructor() { - - super(); - - this.type = 'InstancedBufferGeometry'; - this.instanceCount = Infinity; - - } - - copy( source ) { - - super.copy( source ); - - this.instanceCount = source.instanceCount; - - return this; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - toJSON() { - - const data = super.toJSON( this ); - - data.instanceCount = this.instanceCount; - - data.isInstancedBufferGeometry = true; - - return data; - - } - -} - -InstancedBufferGeometry.prototype.isInstancedBufferGeometry = true; - -class InstancedBufferAttribute extends BufferAttribute { - - constructor( array, itemSize, normalized, meshPerAttribute = 1 ) { - - if ( typeof normalized === 'number' ) { - - meshPerAttribute = normalized; - - normalized = false; - - console.error( 'THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.' ); - - } - - super( array, itemSize, normalized ); - - this.meshPerAttribute = meshPerAttribute; - - } - - copy( source ) { - - super.copy( source ); - - this.meshPerAttribute = source.meshPerAttribute; - - return this; - - } - - toJSON() { - - const data = super.toJSON(); - - data.meshPerAttribute = this.meshPerAttribute; - - data.isInstancedBufferAttribute = true; - - return data; - - } - -} - -InstancedBufferAttribute.prototype.isInstancedBufferAttribute = true; - -class BufferGeometryLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - const scope = this; - - const loader = new FileLoader( scope.manager ); - loader.setPath( scope.path ); - loader.setRequestHeader( scope.requestHeader ); - loader.setWithCredentials( scope.withCredentials ); - loader.load( url, function ( text ) { - - try { - - onLoad( scope.parse( JSON.parse( text ) ) ); - - } catch ( e ) { - - if ( onError ) { - - onError( e ); - - } else { - - console.error( e ); - - } - - scope.manager.itemError( url ); - - } - - }, onProgress, onError ); - - } - - parse( json ) { - - const interleavedBufferMap = {}; - const arrayBufferMap = {}; - - function getInterleavedBuffer( json, uuid ) { - - if ( interleavedBufferMap[ uuid ] !== undefined ) return interleavedBufferMap[ uuid ]; - - const interleavedBuffers = json.interleavedBuffers; - const interleavedBuffer = interleavedBuffers[ uuid ]; - - const buffer = getArrayBuffer( json, interleavedBuffer.buffer ); - - const array = getTypedArray( interleavedBuffer.type, buffer ); - const ib = new InterleavedBuffer( array, interleavedBuffer.stride ); - ib.uuid = interleavedBuffer.uuid; - - interleavedBufferMap[ uuid ] = ib; - - return ib; - - } - - function getArrayBuffer( json, uuid ) { - - if ( arrayBufferMap[ uuid ] !== undefined ) return arrayBufferMap[ uuid ]; - - const arrayBuffers = json.arrayBuffers; - const arrayBuffer = arrayBuffers[ uuid ]; - - const ab = new Uint32Array( arrayBuffer ).buffer; - - arrayBufferMap[ uuid ] = ab; - - return ab; - - } - - const geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry(); - - const index = json.data.index; - - if ( index !== undefined ) { - - const typedArray = getTypedArray( index.type, index.array ); - geometry.setIndex( new BufferAttribute( typedArray, 1 ) ); - - } - - const attributes = json.data.attributes; - - for ( const key in attributes ) { - - const attribute = attributes[ key ]; - let bufferAttribute; - - if ( attribute.isInterleavedBufferAttribute ) { - - const interleavedBuffer = getInterleavedBuffer( json.data, attribute.data ); - bufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized ); - - } else { - - const typedArray = getTypedArray( attribute.type, attribute.array ); - const bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute; - bufferAttribute = new bufferAttributeConstr( typedArray, attribute.itemSize, attribute.normalized ); - - } - - if ( attribute.name !== undefined ) bufferAttribute.name = attribute.name; - if ( attribute.usage !== undefined ) bufferAttribute.setUsage( attribute.usage ); - - if ( attribute.updateRange !== undefined ) { - - bufferAttribute.updateRange.offset = attribute.updateRange.offset; - bufferAttribute.updateRange.count = attribute.updateRange.count; - - } - - geometry.setAttribute( key, bufferAttribute ); - - } - - const morphAttributes = json.data.morphAttributes; - - if ( morphAttributes ) { - - for ( const key in morphAttributes ) { - - const attributeArray = morphAttributes[ key ]; - - const array = []; - - for ( let i = 0, il = attributeArray.length; i < il; i ++ ) { - - const attribute = attributeArray[ i ]; - let bufferAttribute; - - if ( attribute.isInterleavedBufferAttribute ) { - - const interleavedBuffer = getInterleavedBuffer( json.data, attribute.data ); - bufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized ); - - } else { - - const typedArray = getTypedArray( attribute.type, attribute.array ); - bufferAttribute = new BufferAttribute( typedArray, attribute.itemSize, attribute.normalized ); - - } - - if ( attribute.name !== undefined ) bufferAttribute.name = attribute.name; - array.push( bufferAttribute ); - - } - - geometry.morphAttributes[ key ] = array; - - } - - } - - const morphTargetsRelative = json.data.morphTargetsRelative; - - if ( morphTargetsRelative ) { - - geometry.morphTargetsRelative = true; - - } - - const groups = json.data.groups || json.data.drawcalls || json.data.offsets; - - if ( groups !== undefined ) { - - for ( let i = 0, n = groups.length; i !== n; ++ i ) { - - const group = groups[ i ]; - - geometry.addGroup( group.start, group.count, group.materialIndex ); - - } - - } - - const boundingSphere = json.data.boundingSphere; - - if ( boundingSphere !== undefined ) { - - const center = new Vector3(); - - if ( boundingSphere.center !== undefined ) { - - center.fromArray( boundingSphere.center ); - - } - - geometry.boundingSphere = new Sphere( center, boundingSphere.radius ); - - } - - if ( json.name ) geometry.name = json.name; - if ( json.userData ) geometry.userData = json.userData; - - return geometry; - - } - -} - -class ObjectLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - const scope = this; - - const path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path; - this.resourcePath = this.resourcePath || path; - - const loader = new FileLoader( this.manager ); - loader.setPath( this.path ); - loader.setRequestHeader( this.requestHeader ); - loader.setWithCredentials( this.withCredentials ); - loader.load( url, function ( text ) { - - let json = null; - - try { - - json = JSON.parse( text ); - - } catch ( error ) { - - if ( onError !== undefined ) onError( error ); - - console.error( 'THREE:ObjectLoader: Can\'t parse ' + url + '.', error.message ); - - return; - - } - - const metadata = json.metadata; - - if ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) { - - console.error( 'THREE.ObjectLoader: Can\'t load ' + url ); - return; - - } - - scope.parse( json, onLoad ); - - }, onProgress, onError ); - - } - - async loadAsync( url, onProgress ) { - - const scope = this; - - const path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path; - this.resourcePath = this.resourcePath || path; - - const loader = new FileLoader( this.manager ); - loader.setPath( this.path ); - loader.setRequestHeader( this.requestHeader ); - loader.setWithCredentials( this.withCredentials ); - - const text = await loader.loadAsync( url, onProgress ); - - const json = JSON.parse( text ); - - const metadata = json.metadata; - - if ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) { - - throw new Error( 'THREE.ObjectLoader: Can\'t load ' + url ); - - } - - return await scope.parseAsync( json ); - - } - - parse( json, onLoad ) { - - const animations = this.parseAnimations( json.animations ); - const shapes = this.parseShapes( json.shapes ); - const geometries = this.parseGeometries( json.geometries, shapes ); - - const images = this.parseImages( json.images, function () { - - if ( onLoad !== undefined ) onLoad( object ); - - } ); - - const textures = this.parseTextures( json.textures, images ); - const materials = this.parseMaterials( json.materials, textures ); - - const object = this.parseObject( json.object, geometries, materials, textures, animations ); - const skeletons = this.parseSkeletons( json.skeletons, object ); - - this.bindSkeletons( object, skeletons ); - - // - - if ( onLoad !== undefined ) { - - let hasImages = false; - - for ( const uuid in images ) { - - if ( images[ uuid ] instanceof HTMLImageElement ) { - - hasImages = true; - break; - - } - - } - - if ( hasImages === false ) onLoad( object ); - - } - - return object; - - } - - async parseAsync( json ) { - - const animations = this.parseAnimations( json.animations ); - const shapes = this.parseShapes( json.shapes ); - const geometries = this.parseGeometries( json.geometries, shapes ); - - const images = await this.parseImagesAsync( json.images ); - - const textures = this.parseTextures( json.textures, images ); - const materials = this.parseMaterials( json.materials, textures ); - - const object = this.parseObject( json.object, geometries, materials, textures, animations ); - const skeletons = this.parseSkeletons( json.skeletons, object ); - - this.bindSkeletons( object, skeletons ); - - return object; - - } - - parseShapes( json ) { - - const shapes = {}; - - if ( json !== undefined ) { - - for ( let i = 0, l = json.length; i < l; i ++ ) { - - const shape = new Shape().fromJSON( json[ i ] ); - - shapes[ shape.uuid ] = shape; - - } - - } - - return shapes; - - } - - parseSkeletons( json, object ) { - - const skeletons = {}; - const bones = {}; - - // generate bone lookup table - - object.traverse( function ( child ) { - - if ( child.isBone ) bones[ child.uuid ] = child; - - } ); - - // create skeletons - - if ( json !== undefined ) { - - for ( let i = 0, l = json.length; i < l; i ++ ) { - - const skeleton = new Skeleton().fromJSON( json[ i ], bones ); - - skeletons[ skeleton.uuid ] = skeleton; - - } - - } - - return skeletons; - - } - - parseGeometries( json, shapes ) { - - const geometries = {}; - - if ( json !== undefined ) { - - const bufferGeometryLoader = new BufferGeometryLoader(); - - for ( let i = 0, l = json.length; i < l; i ++ ) { - - let geometry; - const data = json[ i ]; - - switch ( data.type ) { - - case 'BufferGeometry': - case 'InstancedBufferGeometry': - - geometry = bufferGeometryLoader.parse( data ); - - break; - - case 'Geometry': - - console.error( 'THREE.ObjectLoader: The legacy Geometry type is no longer supported.' ); - - break; - - default: - - if ( data.type in Geometries ) { - - geometry = Geometries[ data.type ].fromJSON( data, shapes ); - - } else { - - console.warn( `THREE.ObjectLoader: Unsupported geometry type "${ data.type }"` ); - - } - - } - - geometry.uuid = data.uuid; - - if ( data.name !== undefined ) geometry.name = data.name; - if ( geometry.isBufferGeometry === true && data.userData !== undefined ) geometry.userData = data.userData; - - geometries[ data.uuid ] = geometry; - - } - - } - - return geometries; - - } - - parseMaterials( json, textures ) { - - const cache = {}; // MultiMaterial - const materials = {}; - - if ( json !== undefined ) { - - const loader = new MaterialLoader(); - loader.setTextures( textures ); - - for ( let i = 0, l = json.length; i < l; i ++ ) { - - const data = json[ i ]; - - if ( data.type === 'MultiMaterial' ) { - - // Deprecated - - const array = []; - - for ( let j = 0; j < data.materials.length; j ++ ) { - - const material = data.materials[ j ]; - - if ( cache[ material.uuid ] === undefined ) { - - cache[ material.uuid ] = loader.parse( material ); - - } - - array.push( cache[ material.uuid ] ); - - } - - materials[ data.uuid ] = array; - - } else { - - if ( cache[ data.uuid ] === undefined ) { - - cache[ data.uuid ] = loader.parse( data ); - - } - - materials[ data.uuid ] = cache[ data.uuid ]; - - } - - } - - } - - return materials; - - } - - parseAnimations( json ) { - - const animations = {}; - - if ( json !== undefined ) { - - for ( let i = 0; i < json.length; i ++ ) { - - const data = json[ i ]; - - const clip = AnimationClip.parse( data ); - - animations[ clip.uuid ] = clip; - - } - - } - - return animations; - - } - - parseImages( json, onLoad ) { - - const scope = this; - const images = {}; - - let loader; - - function loadImage( url ) { - - scope.manager.itemStart( url ); - - return loader.load( url, function () { - - scope.manager.itemEnd( url ); - - }, undefined, function () { - - scope.manager.itemError( url ); - scope.manager.itemEnd( url ); - - } ); - - } - - function deserializeImage( image ) { - - if ( typeof image === 'string' ) { - - const url = image; - - const path = /^(\/\/)|([a-z]+:(\/\/)?)/i.test( url ) ? url : scope.resourcePath + url; - - return loadImage( path ); - - } else { - - if ( image.data ) { - - return { - data: getTypedArray( image.type, image.data ), - width: image.width, - height: image.height - }; - - } else { - - return null; - - } - - } - - } - - if ( json !== undefined && json.length > 0 ) { - - const manager = new LoadingManager( onLoad ); - - loader = new ImageLoader( manager ); - loader.setCrossOrigin( this.crossOrigin ); - - for ( let i = 0, il = json.length; i < il; i ++ ) { - - const image = json[ i ]; - const url = image.url; - - if ( Array.isArray( url ) ) { - - // load array of images e.g CubeTexture - - images[ image.uuid ] = []; - - for ( let j = 0, jl = url.length; j < jl; j ++ ) { - - const currentUrl = url[ j ]; - - const deserializedImage = deserializeImage( currentUrl ); - - if ( deserializedImage !== null ) { - - if ( deserializedImage instanceof HTMLImageElement ) { - - images[ image.uuid ].push( deserializedImage ); - - } else { - - // special case: handle array of data textures for cube textures - - images[ image.uuid ].push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) ); - - } - - } - - } - - } else { - - // load single image - - const deserializedImage = deserializeImage( image.url ); - - if ( deserializedImage !== null ) { - - images[ image.uuid ] = deserializedImage; - - } - - } - - } - - } - - return images; - - } - - async parseImagesAsync( json ) { - - const scope = this; - const images = {}; - - let loader; - - async function deserializeImage( image ) { - - if ( typeof image === 'string' ) { - - const url = image; - - const path = /^(\/\/)|([a-z]+:(\/\/)?)/i.test( url ) ? url : scope.resourcePath + url; - - return await loader.loadAsync( path ); - - } else { - - if ( image.data ) { - - return { - data: getTypedArray( image.type, image.data ), - width: image.width, - height: image.height - }; - - } else { - - return null; - - } - - } - - } - - if ( json !== undefined && json.length > 0 ) { - - loader = new ImageLoader( this.manager ); - loader.setCrossOrigin( this.crossOrigin ); - - for ( let i = 0, il = json.length; i < il; i ++ ) { - - const image = json[ i ]; - const url = image.url; - - if ( Array.isArray( url ) ) { - - // load array of images e.g CubeTexture - - images[ image.uuid ] = []; - - for ( let j = 0, jl = url.length; j < jl; j ++ ) { - - const currentUrl = url[ j ]; - - const deserializedImage = await deserializeImage( currentUrl ); - - if ( deserializedImage !== null ) { - - if ( deserializedImage instanceof HTMLImageElement ) { - - images[ image.uuid ].push( deserializedImage ); - - } else { - - // special case: handle array of data textures for cube textures - - images[ image.uuid ].push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) ); - - } - - } - - } - - } else { - - // load single image - - const deserializedImage = await deserializeImage( image.url ); - - if ( deserializedImage !== null ) { - - images[ image.uuid ] = deserializedImage; - - } - - } - - } - - } - - return images; - - } - - parseTextures( json, images ) { - - function parseConstant( value, type ) { - - if ( typeof value === 'number' ) return value; - - console.warn( 'THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value ); - - return type[ value ]; - - } - - const textures = {}; - - if ( json !== undefined ) { - - for ( let i = 0, l = json.length; i < l; i ++ ) { - - const data = json[ i ]; - - if ( data.image === undefined ) { - - console.warn( 'THREE.ObjectLoader: No "image" specified for', data.uuid ); - - } - - if ( images[ data.image ] === undefined ) { - - console.warn( 'THREE.ObjectLoader: Undefined image', data.image ); - - } - - let texture; - const image = images[ data.image ]; - - if ( Array.isArray( image ) ) { - - texture = new CubeTexture( image ); - - if ( image.length === 6 ) texture.needsUpdate = true; - - } else { - - if ( image && image.data ) { - - texture = new DataTexture( image.data, image.width, image.height ); - - } else { - - texture = new Texture( image ); - - } - - if ( image ) texture.needsUpdate = true; // textures can have undefined image data - - } - - texture.uuid = data.uuid; - - if ( data.name !== undefined ) texture.name = data.name; - - if ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING ); - - if ( data.offset !== undefined ) texture.offset.fromArray( data.offset ); - if ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat ); - if ( data.center !== undefined ) texture.center.fromArray( data.center ); - if ( data.rotation !== undefined ) texture.rotation = data.rotation; - - if ( data.wrap !== undefined ) { - - texture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING ); - texture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING ); - - } - - if ( data.format !== undefined ) texture.format = data.format; - if ( data.type !== undefined ) texture.type = data.type; - if ( data.encoding !== undefined ) texture.encoding = data.encoding; - - if ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER ); - if ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER ); - if ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy; - - if ( data.flipY !== undefined ) texture.flipY = data.flipY; - - if ( data.premultiplyAlpha !== undefined ) texture.premultiplyAlpha = data.premultiplyAlpha; - if ( data.unpackAlignment !== undefined ) texture.unpackAlignment = data.unpackAlignment; - - textures[ data.uuid ] = texture; - - } - - } - - return textures; - - } - - parseObject( data, geometries, materials, textures, animations ) { - - let object; - - function getGeometry( name ) { - - if ( geometries[ name ] === undefined ) { - - console.warn( 'THREE.ObjectLoader: Undefined geometry', name ); - - } - - return geometries[ name ]; - - } - - function getMaterial( name ) { - - if ( name === undefined ) return undefined; - - if ( Array.isArray( name ) ) { - - const array = []; - - for ( let i = 0, l = name.length; i < l; i ++ ) { - - const uuid = name[ i ]; - - if ( materials[ uuid ] === undefined ) { - - console.warn( 'THREE.ObjectLoader: Undefined material', uuid ); - - } - - array.push( materials[ uuid ] ); - - } - - return array; - - } - - if ( materials[ name ] === undefined ) { - - console.warn( 'THREE.ObjectLoader: Undefined material', name ); - - } - - return materials[ name ]; - - } - - function getTexture( uuid ) { - - if ( textures[ uuid ] === undefined ) { - - console.warn( 'THREE.ObjectLoader: Undefined texture', uuid ); - - } - - return textures[ uuid ]; - - } - - let geometry, material; - - switch ( data.type ) { - - case 'Scene': - - object = new Scene(); - - if ( data.background !== undefined ) { - - if ( Number.isInteger( data.background ) ) { - - object.background = new Color( data.background ); - - } else { - - object.background = getTexture( data.background ); - - } - - } - - if ( data.environment !== undefined ) object.environment = getTexture( data.environment ); - - if ( data.fog !== undefined ) { - - if ( data.fog.type === 'Fog' ) { - - object.fog = new Fog( data.fog.color, data.fog.near, data.fog.far ); - - } else if ( data.fog.type === 'FogExp2' ) { - - object.fog = new FogExp2( data.fog.color, data.fog.density ); - - } - - } - - break; - - case 'PerspectiveCamera': - - object = new PerspectiveCamera( data.fov, data.aspect, data.near, data.far ); - - if ( data.focus !== undefined ) object.focus = data.focus; - if ( data.zoom !== undefined ) object.zoom = data.zoom; - if ( data.filmGauge !== undefined ) object.filmGauge = data.filmGauge; - if ( data.filmOffset !== undefined ) object.filmOffset = data.filmOffset; - if ( data.view !== undefined ) object.view = Object.assign( {}, data.view ); - - break; - - case 'OrthographicCamera': - - object = new OrthographicCamera( data.left, data.right, data.top, data.bottom, data.near, data.far ); - - if ( data.zoom !== undefined ) object.zoom = data.zoom; - if ( data.view !== undefined ) object.view = Object.assign( {}, data.view ); - - break; - - case 'AmbientLight': - - object = new AmbientLight( data.color, data.intensity ); - - break; - - case 'DirectionalLight': - - object = new DirectionalLight( data.color, data.intensity ); - - break; - - case 'PointLight': - - object = new PointLight( data.color, data.intensity, data.distance, data.decay ); - - break; - - case 'RectAreaLight': - - object = new RectAreaLight( data.color, data.intensity, data.width, data.height ); - - break; - - case 'SpotLight': - - object = new SpotLight( data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay ); - - break; - - case 'HemisphereLight': - - object = new HemisphereLight( data.color, data.groundColor, data.intensity ); - - break; - - case 'LightProbe': - - object = new LightProbe().fromJSON( data ); - - break; - - case 'SkinnedMesh': - - geometry = getGeometry( data.geometry ); - material = getMaterial( data.material ); - - object = new SkinnedMesh( geometry, material ); - - if ( data.bindMode !== undefined ) object.bindMode = data.bindMode; - if ( data.bindMatrix !== undefined ) object.bindMatrix.fromArray( data.bindMatrix ); - if ( data.skeleton !== undefined ) object.skeleton = data.skeleton; - - break; - - case 'Mesh': - - geometry = getGeometry( data.geometry ); - material = getMaterial( data.material ); - - object = new Mesh( geometry, material ); - - break; - - case 'InstancedMesh': - - geometry = getGeometry( data.geometry ); - material = getMaterial( data.material ); - const count = data.count; - const instanceMatrix = data.instanceMatrix; - const instanceColor = data.instanceColor; - - object = new InstancedMesh( geometry, material, count ); - object.instanceMatrix = new BufferAttribute( new Float32Array( instanceMatrix.array ), 16 ); - if ( instanceColor !== undefined ) object.instanceColor = new BufferAttribute( new Float32Array( instanceColor.array ), instanceColor.itemSize ); - - break; - - case 'LOD': - - object = new LOD(); - - break; - - case 'Line': - - object = new Line( getGeometry( data.geometry ), getMaterial( data.material ) ); - - break; - - case 'LineLoop': - - object = new LineLoop( getGeometry( data.geometry ), getMaterial( data.material ) ); - - break; - - case 'LineSegments': - - object = new LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) ); - - break; - - case 'PointCloud': - case 'Points': - - object = new Points( getGeometry( data.geometry ), getMaterial( data.material ) ); - - break; - - case 'Sprite': - - object = new Sprite( getMaterial( data.material ) ); - - break; - - case 'Group': - - object = new Group(); - - break; - - case 'Bone': - - object = new Bone(); - - break; - - default: - - object = new Object3D(); - - } - - object.uuid = data.uuid; - - if ( data.name !== undefined ) object.name = data.name; - - if ( data.matrix !== undefined ) { - - object.matrix.fromArray( data.matrix ); - - if ( data.matrixAutoUpdate !== undefined ) object.matrixAutoUpdate = data.matrixAutoUpdate; - if ( object.matrixAutoUpdate ) object.matrix.decompose( object.position, object.quaternion, object.scale ); - - } else { - - if ( data.position !== undefined ) object.position.fromArray( data.position ); - if ( data.rotation !== undefined ) object.rotation.fromArray( data.rotation ); - if ( data.quaternion !== undefined ) object.quaternion.fromArray( data.quaternion ); - if ( data.scale !== undefined ) object.scale.fromArray( data.scale ); - - } - - if ( data.castShadow !== undefined ) object.castShadow = data.castShadow; - if ( data.receiveShadow !== undefined ) object.receiveShadow = data.receiveShadow; - - if ( data.shadow ) { - - if ( data.shadow.bias !== undefined ) object.shadow.bias = data.shadow.bias; - if ( data.shadow.normalBias !== undefined ) object.shadow.normalBias = data.shadow.normalBias; - if ( data.shadow.radius !== undefined ) object.shadow.radius = data.shadow.radius; - if ( data.shadow.mapSize !== undefined ) object.shadow.mapSize.fromArray( data.shadow.mapSize ); - if ( data.shadow.camera !== undefined ) object.shadow.camera = this.parseObject( data.shadow.camera ); - - } - - if ( data.visible !== undefined ) object.visible = data.visible; - if ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled; - if ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder; - if ( data.userData !== undefined ) object.userData = data.userData; - if ( data.layers !== undefined ) object.layers.mask = data.layers; - - if ( data.children !== undefined ) { - - const children = data.children; - - for ( let i = 0; i < children.length; i ++ ) { - - object.add( this.parseObject( children[ i ], geometries, materials, textures, animations ) ); - - } - - } - - if ( data.animations !== undefined ) { - - const objectAnimations = data.animations; - - for ( let i = 0; i < objectAnimations.length; i ++ ) { - - const uuid = objectAnimations[ i ]; - - object.animations.push( animations[ uuid ] ); - - } - - } - - if ( data.type === 'LOD' ) { - - if ( data.autoUpdate !== undefined ) object.autoUpdate = data.autoUpdate; - - const levels = data.levels; - - for ( let l = 0; l < levels.length; l ++ ) { - - const level = levels[ l ]; - const child = object.getObjectByProperty( 'uuid', level.object ); - - if ( child !== undefined ) { - - object.addLevel( child, level.distance ); - - } - - } - - } - - return object; - - } - - bindSkeletons( object, skeletons ) { - - if ( Object.keys( skeletons ).length === 0 ) return; - - object.traverse( function ( child ) { - - if ( child.isSkinnedMesh === true && child.skeleton !== undefined ) { - - const skeleton = skeletons[ child.skeleton ]; - - if ( skeleton === undefined ) { - - console.warn( 'THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton ); - - } else { - - child.bind( skeleton, child.bindMatrix ); - - } - - } - - } ); - - } - - /* DEPRECATED */ - - setTexturePath( value ) { - - console.warn( 'THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().' ); - return this.setResourcePath( value ); - - } - -} - -const TEXTURE_MAPPING = { - UVMapping: UVMapping, - CubeReflectionMapping: CubeReflectionMapping, - CubeRefractionMapping: CubeRefractionMapping, - EquirectangularReflectionMapping: EquirectangularReflectionMapping, - EquirectangularRefractionMapping: EquirectangularRefractionMapping, - CubeUVReflectionMapping: CubeUVReflectionMapping, - CubeUVRefractionMapping: CubeUVRefractionMapping -}; - -const TEXTURE_WRAPPING = { - RepeatWrapping: RepeatWrapping, - ClampToEdgeWrapping: ClampToEdgeWrapping, - MirroredRepeatWrapping: MirroredRepeatWrapping -}; - -const TEXTURE_FILTER = { - NearestFilter: NearestFilter, - NearestMipmapNearestFilter: NearestMipmapNearestFilter, - NearestMipmapLinearFilter: NearestMipmapLinearFilter, - LinearFilter: LinearFilter, - LinearMipmapNearestFilter: LinearMipmapNearestFilter, - LinearMipmapLinearFilter: LinearMipmapLinearFilter -}; - -class ImageBitmapLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - if ( typeof createImageBitmap === 'undefined' ) { - - console.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' ); - - } - - if ( typeof fetch === 'undefined' ) { - - console.warn( 'THREE.ImageBitmapLoader: fetch() not supported.' ); - - } - - this.options = { premultiplyAlpha: 'none' }; - - } - - setOptions( options ) { - - this.options = options; - - return this; - - } - - load( url, onLoad, onProgress, onError ) { - - if ( url === undefined ) url = ''; - - if ( this.path !== undefined ) url = this.path + url; - - url = this.manager.resolveURL( url ); - - const scope = this; - - const cached = Cache.get( url ); - - if ( cached !== undefined ) { - - scope.manager.itemStart( url ); - - setTimeout( function () { - - if ( onLoad ) onLoad( cached ); - - scope.manager.itemEnd( url ); - - }, 0 ); - - return cached; - - } - - const fetchOptions = {}; - fetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include'; - fetchOptions.headers = this.requestHeader; - - fetch( url, fetchOptions ).then( function ( res ) { - - return res.blob(); - - } ).then( function ( blob ) { - - return createImageBitmap( blob, Object.assign( scope.options, { colorSpaceConversion: 'none' } ) ); - - } ).then( function ( imageBitmap ) { - - Cache.add( url, imageBitmap ); - - if ( onLoad ) onLoad( imageBitmap ); - - scope.manager.itemEnd( url ); - - } ).catch( function ( e ) { - - if ( onError ) onError( e ); - - scope.manager.itemError( url ); - scope.manager.itemEnd( url ); - - } ); - - scope.manager.itemStart( url ); - - } - -} - -ImageBitmapLoader.prototype.isImageBitmapLoader = true; - -class ShapePath { - - constructor() { - - this.type = 'ShapePath'; - - this.color = new Color(); - - this.subPaths = []; - this.currentPath = null; - - } - - moveTo( x, y ) { - - this.currentPath = new Path(); - this.subPaths.push( this.currentPath ); - this.currentPath.moveTo( x, y ); - - return this; - - } - - lineTo( x, y ) { - - this.currentPath.lineTo( x, y ); - - return this; - - } - - quadraticCurveTo( aCPx, aCPy, aX, aY ) { - - this.currentPath.quadraticCurveTo( aCPx, aCPy, aX, aY ); - - return this; - - } - - bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) { - - this.currentPath.bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ); - - return this; - - } - - splineThru( pts ) { - - this.currentPath.splineThru( pts ); - - return this; - - } - - toShapes( isCCW, noHoles ) { - - function toShapesNoHoles( inSubpaths ) { - - const shapes = []; - - for ( let i = 0, l = inSubpaths.length; i < l; i ++ ) { - - const tmpPath = inSubpaths[ i ]; - - const tmpShape = new Shape(); - tmpShape.curves = tmpPath.curves; - - shapes.push( tmpShape ); - - } - - return shapes; - - } - - function isPointInsidePolygon( inPt, inPolygon ) { - - const polyLen = inPolygon.length; - - // inPt on polygon contour => immediate success or - // toggling of inside/outside at every single! intersection point of an edge - // with the horizontal line through inPt, left of inPt - // not counting lowerY endpoints of edges and whole edges on that line - let inside = false; - for ( let p = polyLen - 1, q = 0; q < polyLen; p = q ++ ) { - - let edgeLowPt = inPolygon[ p ]; - let edgeHighPt = inPolygon[ q ]; - - let edgeDx = edgeHighPt.x - edgeLowPt.x; - let edgeDy = edgeHighPt.y - edgeLowPt.y; - - if ( Math.abs( edgeDy ) > Number.EPSILON ) { - - // not parallel - if ( edgeDy < 0 ) { - - edgeLowPt = inPolygon[ q ]; edgeDx = - edgeDx; - edgeHighPt = inPolygon[ p ]; edgeDy = - edgeDy; - - } - - if ( ( inPt.y < edgeLowPt.y ) || ( inPt.y > edgeHighPt.y ) ) continue; - - if ( inPt.y === edgeLowPt.y ) { - - if ( inPt.x === edgeLowPt.x ) return true; // inPt is on contour ? - // continue; // no intersection or edgeLowPt => doesn't count !!! - - } else { - - const perpEdge = edgeDy * ( inPt.x - edgeLowPt.x ) - edgeDx * ( inPt.y - edgeLowPt.y ); - if ( perpEdge === 0 ) return true; // inPt is on contour ? - if ( perpEdge < 0 ) continue; - inside = ! inside; // true intersection left of inPt - - } - - } else { - - // parallel or collinear - if ( inPt.y !== edgeLowPt.y ) continue; // parallel - // edge lies on the same horizontal line as inPt - if ( ( ( edgeHighPt.x <= inPt.x ) && ( inPt.x <= edgeLowPt.x ) ) || - ( ( edgeLowPt.x <= inPt.x ) && ( inPt.x <= edgeHighPt.x ) ) ) return true; // inPt: Point on contour ! - // continue; - - } - - } - - return inside; - - } - - const isClockWise = ShapeUtils.isClockWise; - - const subPaths = this.subPaths; - if ( subPaths.length === 0 ) return []; - - if ( noHoles === true ) return toShapesNoHoles( subPaths ); - - - let solid, tmpPath, tmpShape; - const shapes = []; - - if ( subPaths.length === 1 ) { - - tmpPath = subPaths[ 0 ]; - tmpShape = new Shape(); - tmpShape.curves = tmpPath.curves; - shapes.push( tmpShape ); - return shapes; - - } - - let holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() ); - holesFirst = isCCW ? ! holesFirst : holesFirst; - - // console.log("Holes first", holesFirst); - - const betterShapeHoles = []; - const newShapes = []; - let newShapeHoles = []; - let mainIdx = 0; - let tmpPoints; - - newShapes[ mainIdx ] = undefined; - newShapeHoles[ mainIdx ] = []; - - for ( let i = 0, l = subPaths.length; i < l; i ++ ) { - - tmpPath = subPaths[ i ]; - tmpPoints = tmpPath.getPoints(); - solid = isClockWise( tmpPoints ); - solid = isCCW ? ! solid : solid; - - if ( solid ) { - - if ( ( ! holesFirst ) && ( newShapes[ mainIdx ] ) ) mainIdx ++; - - newShapes[ mainIdx ] = { s: new Shape(), p: tmpPoints }; - newShapes[ mainIdx ].s.curves = tmpPath.curves; - - if ( holesFirst ) mainIdx ++; - newShapeHoles[ mainIdx ] = []; - - //console.log('cw', i); - - } else { - - newShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } ); - - //console.log('ccw', i); - - } - - } - - // only Holes? -> probably all Shapes with wrong orientation - if ( ! newShapes[ 0 ] ) return toShapesNoHoles( subPaths ); - - - if ( newShapes.length > 1 ) { - - let ambiguous = false; - const toChange = []; - - for ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) { - - betterShapeHoles[ sIdx ] = []; - - } - - for ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) { - - const sho = newShapeHoles[ sIdx ]; - - for ( let hIdx = 0; hIdx < sho.length; hIdx ++ ) { - - const ho = sho[ hIdx ]; - let hole_unassigned = true; - - for ( let s2Idx = 0; s2Idx < newShapes.length; s2Idx ++ ) { - - if ( isPointInsidePolygon( ho.p, newShapes[ s2Idx ].p ) ) { - - if ( sIdx !== s2Idx ) toChange.push( { froms: sIdx, tos: s2Idx, hole: hIdx } ); - if ( hole_unassigned ) { - - hole_unassigned = false; - betterShapeHoles[ s2Idx ].push( ho ); - - } else { - - ambiguous = true; - - } - - } - - } - - if ( hole_unassigned ) { - - betterShapeHoles[ sIdx ].push( ho ); - - } - - } - - } - // console.log("ambiguous: ", ambiguous); - - if ( toChange.length > 0 ) { - - // console.log("to change: ", toChange); - if ( ! ambiguous ) newShapeHoles = betterShapeHoles; - - } - - } - - let tmpHoles; - - for ( let i = 0, il = newShapes.length; i < il; i ++ ) { - - tmpShape = newShapes[ i ].s; - shapes.push( tmpShape ); - tmpHoles = newShapeHoles[ i ]; - - for ( let j = 0, jl = tmpHoles.length; j < jl; j ++ ) { - - tmpShape.holes.push( tmpHoles[ j ].h ); - - } - - } - - //console.log("shape", shapes); - - return shapes; - - } - -} - -class Font { - - constructor( data ) { - - this.type = 'Font'; - - this.data = data; - - } - - generateShapes( text, size = 100 ) { - - const shapes = []; - const paths = createPaths( text, size, this.data ); - - for ( let p = 0, pl = paths.length; p < pl; p ++ ) { - - Array.prototype.push.apply( shapes, paths[ p ].toShapes() ); - - } - - return shapes; - - } - -} - -function createPaths( text, size, data ) { - - const chars = Array.from( text ); - const scale = size / data.resolution; - const line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale; - - const paths = []; - - let offsetX = 0, offsetY = 0; - - for ( let i = 0; i < chars.length; i ++ ) { - - const char = chars[ i ]; - - if ( char === '\n' ) { - - offsetX = 0; - offsetY -= line_height; - - } else { - - const ret = createPath( char, scale, offsetX, offsetY, data ); - offsetX += ret.offsetX; - paths.push( ret.path ); - - } - - } - - return paths; - -} - -function createPath( char, scale, offsetX, offsetY, data ) { - - const glyph = data.glyphs[ char ] || data.glyphs[ '?' ]; - - if ( ! glyph ) { - - console.error( 'THREE.Font: character "' + char + '" does not exists in font family ' + data.familyName + '.' ); - - return; - - } - - const path = new ShapePath(); - - let x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2; - - if ( glyph.o ) { - - const outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) ); - - for ( let i = 0, l = outline.length; i < l; ) { - - const action = outline[ i ++ ]; - - switch ( action ) { - - case 'm': // moveTo - - x = outline[ i ++ ] * scale + offsetX; - y = outline[ i ++ ] * scale + offsetY; - - path.moveTo( x, y ); - - break; - - case 'l': // lineTo - - x = outline[ i ++ ] * scale + offsetX; - y = outline[ i ++ ] * scale + offsetY; - - path.lineTo( x, y ); - - break; - - case 'q': // quadraticCurveTo - - cpx = outline[ i ++ ] * scale + offsetX; - cpy = outline[ i ++ ] * scale + offsetY; - cpx1 = outline[ i ++ ] * scale + offsetX; - cpy1 = outline[ i ++ ] * scale + offsetY; - - path.quadraticCurveTo( cpx1, cpy1, cpx, cpy ); - - break; - - case 'b': // bezierCurveTo - - cpx = outline[ i ++ ] * scale + offsetX; - cpy = outline[ i ++ ] * scale + offsetY; - cpx1 = outline[ i ++ ] * scale + offsetX; - cpy1 = outline[ i ++ ] * scale + offsetY; - cpx2 = outline[ i ++ ] * scale + offsetX; - cpy2 = outline[ i ++ ] * scale + offsetY; - - path.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy ); - - break; - - } - - } - - } - - return { offsetX: glyph.ha * scale, path: path }; - -} - -Font.prototype.isFont = true; - -class FontLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - const scope = this; - - const loader = new FileLoader( this.manager ); - loader.setPath( this.path ); - loader.setRequestHeader( this.requestHeader ); - loader.setWithCredentials( scope.withCredentials ); - loader.load( url, function ( text ) { - - let json; - - try { - - json = JSON.parse( text ); - - } catch ( e ) { - - console.warn( 'THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead.' ); - json = JSON.parse( text.substring( 65, text.length - 2 ) ); - - } - - const font = scope.parse( json ); - - if ( onLoad ) onLoad( font ); - - }, onProgress, onError ); - - } - - parse( json ) { - - return new Font( json ); - - } - -} - -let _context; - -const AudioContext = { - - getContext: function () { - - if ( _context === undefined ) { - - _context = new ( window.AudioContext || window.webkitAudioContext )(); - - } - - return _context; - - }, - - setContext: function ( value ) { - - _context = value; - - } - -}; - -class AudioLoader extends Loader { - - constructor( manager ) { - - super( manager ); - - } - - load( url, onLoad, onProgress, onError ) { - - const scope = this; - - const loader = new FileLoader( this.manager ); - loader.setResponseType( 'arraybuffer' ); - loader.setPath( this.path ); - loader.setRequestHeader( this.requestHeader ); - loader.setWithCredentials( this.withCredentials ); - loader.load( url, function ( buffer ) { - - try { - - // Create a copy of the buffer. The `decodeAudioData` method - // detaches the buffer when complete, preventing reuse. - const bufferCopy = buffer.slice( 0 ); - - const context = AudioContext.getContext(); - context.decodeAudioData( bufferCopy, function ( audioBuffer ) { - - onLoad( audioBuffer ); - - } ); - - } catch ( e ) { - - if ( onError ) { - - onError( e ); - - } else { - - console.error( e ); - - } - - scope.manager.itemError( url ); - - } - - }, onProgress, onError ); - - } - -} - -class HemisphereLightProbe extends LightProbe { - - constructor( skyColor, groundColor, intensity = 1 ) { - - super( undefined, intensity ); - - const color1 = new Color().set( skyColor ); - const color2 = new Color().set( groundColor ); - - const sky = new Vector3( color1.r, color1.g, color1.b ); - const ground = new Vector3( color2.r, color2.g, color2.b ); - - // without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI ); - const c0 = Math.sqrt( Math.PI ); - const c1 = c0 * Math.sqrt( 0.75 ); - - this.sh.coefficients[ 0 ].copy( sky ).add( ground ).multiplyScalar( c0 ); - this.sh.coefficients[ 1 ].copy( sky ).sub( ground ).multiplyScalar( c1 ); - - } - -} - -HemisphereLightProbe.prototype.isHemisphereLightProbe = true; - -class AmbientLightProbe extends LightProbe { - - constructor( color, intensity = 1 ) { - - super( undefined, intensity ); - - const color1 = new Color().set( color ); - - // without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI ); - this.sh.coefficients[ 0 ].set( color1.r, color1.g, color1.b ).multiplyScalar( 2 * Math.sqrt( Math.PI ) ); - - } - -} - -AmbientLightProbe.prototype.isAmbientLightProbe = true; - -const _eyeRight = /*@__PURE__*/ new Matrix4(); -const _eyeLeft = /*@__PURE__*/ new Matrix4(); - -class StereoCamera { - - constructor() { - - this.type = 'StereoCamera'; - - this.aspect = 1; - - this.eyeSep = 0.064; - - this.cameraL = new PerspectiveCamera(); - this.cameraL.layers.enable( 1 ); - this.cameraL.matrixAutoUpdate = false; - - this.cameraR = new PerspectiveCamera(); - this.cameraR.layers.enable( 2 ); - this.cameraR.matrixAutoUpdate = false; - - this._cache = { - focus: null, - fov: null, - aspect: null, - near: null, - far: null, - zoom: null, - eyeSep: null - }; - - } - - update( camera ) { - - const cache = this._cache; - - const needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || - cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || - cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep; - - if ( needsUpdate ) { - - cache.focus = camera.focus; - cache.fov = camera.fov; - cache.aspect = camera.aspect * this.aspect; - cache.near = camera.near; - cache.far = camera.far; - cache.zoom = camera.zoom; - cache.eyeSep = this.eyeSep; - - // Off-axis stereoscopic effect based on - // http://paulbourke.net/stereographics/stereorender/ - - const projectionMatrix = camera.projectionMatrix.clone(); - const eyeSepHalf = cache.eyeSep / 2; - const eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus; - const ymax = ( cache.near * Math.tan( DEG2RAD * cache.fov * 0.5 ) ) / cache.zoom; - let xmin, xmax; - - // translate xOffset - - _eyeLeft.elements[ 12 ] = - eyeSepHalf; - _eyeRight.elements[ 12 ] = eyeSepHalf; - - // for left eye - - xmin = - ymax * cache.aspect + eyeSepOnProjection; - xmax = ymax * cache.aspect + eyeSepOnProjection; - - projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin ); - projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin ); - - this.cameraL.projectionMatrix.copy( projectionMatrix ); - - // for right eye - - xmin = - ymax * cache.aspect - eyeSepOnProjection; - xmax = ymax * cache.aspect - eyeSepOnProjection; - - projectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin ); - projectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin ); - - this.cameraR.projectionMatrix.copy( projectionMatrix ); - - } - - this.cameraL.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeLeft ); - this.cameraR.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeRight ); - - } - -} - -class Clock { - - constructor( autoStart = true ) { - - this.autoStart = autoStart; - - this.startTime = 0; - this.oldTime = 0; - this.elapsedTime = 0; - - this.running = false; - - } - - start() { - - this.startTime = now(); - - this.oldTime = this.startTime; - this.elapsedTime = 0; - this.running = true; - - } - - stop() { - - this.getElapsedTime(); - this.running = false; - this.autoStart = false; - - } - - getElapsedTime() { - - this.getDelta(); - return this.elapsedTime; - - } - - getDelta() { - - let diff = 0; - - if ( this.autoStart && ! this.running ) { - - this.start(); - return 0; - - } - - if ( this.running ) { - - const newTime = now(); - - diff = ( newTime - this.oldTime ) / 1000; - this.oldTime = newTime; - - this.elapsedTime += diff; - - } - - return diff; - - } - -} - -function now() { - - return ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732 - -} - -const _position$1 = /*@__PURE__*/ new Vector3(); -const _quaternion$1 = /*@__PURE__*/ new Quaternion(); -const _scale$1 = /*@__PURE__*/ new Vector3(); -const _orientation$1 = /*@__PURE__*/ new Vector3(); - -class AudioListener extends Object3D { - - constructor() { - - super(); - - this.type = 'AudioListener'; - - this.context = AudioContext.getContext(); - - this.gain = this.context.createGain(); - this.gain.connect( this.context.destination ); - - this.filter = null; - - this.timeDelta = 0; - - // private - - this._clock = new Clock(); - - } - - getInput() { - - return this.gain; - - } - - removeFilter() { - - if ( this.filter !== null ) { - - this.gain.disconnect( this.filter ); - this.filter.disconnect( this.context.destination ); - this.gain.connect( this.context.destination ); - this.filter = null; - - } - - return this; - - } - - getFilter() { - - return this.filter; - - } - - setFilter( value ) { - - if ( this.filter !== null ) { - - this.gain.disconnect( this.filter ); - this.filter.disconnect( this.context.destination ); - - } else { - - this.gain.disconnect( this.context.destination ); - - } - - this.filter = value; - this.gain.connect( this.filter ); - this.filter.connect( this.context.destination ); - - return this; - - } - - getMasterVolume() { - - return this.gain.gain.value; - - } - - setMasterVolume( value ) { - - this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 ); - - return this; - - } - - updateMatrixWorld( force ) { - - super.updateMatrixWorld( force ); - - const listener = this.context.listener; - const up = this.up; - - this.timeDelta = this._clock.getDelta(); - - this.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 ); - - _orientation$1.set( 0, 0, - 1 ).applyQuaternion( _quaternion$1 ); - - if ( listener.positionX ) { - - // code path for Chrome (see #14393) - - const endTime = this.context.currentTime + this.timeDelta; - - listener.positionX.linearRampToValueAtTime( _position$1.x, endTime ); - listener.positionY.linearRampToValueAtTime( _position$1.y, endTime ); - listener.positionZ.linearRampToValueAtTime( _position$1.z, endTime ); - listener.forwardX.linearRampToValueAtTime( _orientation$1.x, endTime ); - listener.forwardY.linearRampToValueAtTime( _orientation$1.y, endTime ); - listener.forwardZ.linearRampToValueAtTime( _orientation$1.z, endTime ); - listener.upX.linearRampToValueAtTime( up.x, endTime ); - listener.upY.linearRampToValueAtTime( up.y, endTime ); - listener.upZ.linearRampToValueAtTime( up.z, endTime ); - - } else { - - listener.setPosition( _position$1.x, _position$1.y, _position$1.z ); - listener.setOrientation( _orientation$1.x, _orientation$1.y, _orientation$1.z, up.x, up.y, up.z ); - - } - - } - -} - -class Audio extends Object3D { - - constructor( listener ) { - - super(); - - this.type = 'Audio'; - - this.listener = listener; - this.context = listener.context; - - this.gain = this.context.createGain(); - this.gain.connect( listener.getInput() ); - - this.autoplay = false; - - this.buffer = null; - this.detune = 0; - this.loop = false; - this.loopStart = 0; - this.loopEnd = 0; - this.offset = 0; - this.duration = undefined; - this.playbackRate = 1; - this.isPlaying = false; - this.hasPlaybackControl = true; - this.source = null; - this.sourceType = 'empty'; - - this._startedAt = 0; - this._progress = 0; - this._connected = false; - - this.filters = []; - - } - - getOutput() { - - return this.gain; - - } - - setNodeSource( audioNode ) { - - this.hasPlaybackControl = false; - this.sourceType = 'audioNode'; - this.source = audioNode; - this.connect(); - - return this; - - } - - setMediaElementSource( mediaElement ) { - - this.hasPlaybackControl = false; - this.sourceType = 'mediaNode'; - this.source = this.context.createMediaElementSource( mediaElement ); - this.connect(); - - return this; - - } - - setMediaStreamSource( mediaStream ) { - - this.hasPlaybackControl = false; - this.sourceType = 'mediaStreamNode'; - this.source = this.context.createMediaStreamSource( mediaStream ); - this.connect(); - - return this; - - } - - setBuffer( audioBuffer ) { - - this.buffer = audioBuffer; - this.sourceType = 'buffer'; - - if ( this.autoplay ) this.play(); - - return this; - - } - - play( delay = 0 ) { - - if ( this.isPlaying === true ) { - - console.warn( 'THREE.Audio: Audio is already playing.' ); - return; - - } - - if ( this.hasPlaybackControl === false ) { - - console.warn( 'THREE.Audio: this Audio has no playback control.' ); - return; - - } - - this._startedAt = this.context.currentTime + delay; - - const source = this.context.createBufferSource(); - source.buffer = this.buffer; - source.loop = this.loop; - source.loopStart = this.loopStart; - source.loopEnd = this.loopEnd; - source.onended = this.onEnded.bind( this ); - source.start( this._startedAt, this._progress + this.offset, this.duration ); - - this.isPlaying = true; - - this.source = source; - - this.setDetune( this.detune ); - this.setPlaybackRate( this.playbackRate ); - - return this.connect(); - - } - - pause() { - - if ( this.hasPlaybackControl === false ) { - - console.warn( 'THREE.Audio: this Audio has no playback control.' ); - return; - - } - - if ( this.isPlaying === true ) { - - // update current progress - - this._progress += Math.max( this.context.currentTime - this._startedAt, 0 ) * this.playbackRate; - - if ( this.loop === true ) { - - // ensure _progress does not exceed duration with looped audios - - this._progress = this._progress % ( this.duration || this.buffer.duration ); - - } - - this.source.stop(); - this.source.onended = null; - - this.isPlaying = false; - - } - - return this; - - } - - stop() { - - if ( this.hasPlaybackControl === false ) { - - console.warn( 'THREE.Audio: this Audio has no playback control.' ); - return; - - } - - this._progress = 0; - - this.source.stop(); - this.source.onended = null; - this.isPlaying = false; - - return this; - - } - - connect() { - - if ( this.filters.length > 0 ) { - - this.source.connect( this.filters[ 0 ] ); - - for ( let i = 1, l = this.filters.length; i < l; i ++ ) { - - this.filters[ i - 1 ].connect( this.filters[ i ] ); - - } - - this.filters[ this.filters.length - 1 ].connect( this.getOutput() ); - - } else { - - this.source.connect( this.getOutput() ); - - } - - this._connected = true; - - return this; - - } - - disconnect() { - - if ( this.filters.length > 0 ) { - - this.source.disconnect( this.filters[ 0 ] ); - - for ( let i = 1, l = this.filters.length; i < l; i ++ ) { - - this.filters[ i - 1 ].disconnect( this.filters[ i ] ); - - } - - this.filters[ this.filters.length - 1 ].disconnect( this.getOutput() ); - - } else { - - this.source.disconnect( this.getOutput() ); - - } - - this._connected = false; - - return this; - - } - - getFilters() { - - return this.filters; - - } - - setFilters( value ) { - - if ( ! value ) value = []; - - if ( this._connected === true ) { - - this.disconnect(); - this.filters = value.slice(); - this.connect(); - - } else { - - this.filters = value.slice(); - - } - - return this; - - } - - setDetune( value ) { - - this.detune = value; - - if ( this.source.detune === undefined ) return; // only set detune when available - - if ( this.isPlaying === true ) { - - this.source.detune.setTargetAtTime( this.detune, this.context.currentTime, 0.01 ); - - } - - return this; - - } - - getDetune() { - - return this.detune; - - } - - getFilter() { - - return this.getFilters()[ 0 ]; - - } - - setFilter( filter ) { - - return this.setFilters( filter ? [ filter ] : [] ); - - } - - setPlaybackRate( value ) { - - if ( this.hasPlaybackControl === false ) { - - console.warn( 'THREE.Audio: this Audio has no playback control.' ); - return; - - } - - this.playbackRate = value; - - if ( this.isPlaying === true ) { - - this.source.playbackRate.setTargetAtTime( this.playbackRate, this.context.currentTime, 0.01 ); - - } - - return this; - - } - - getPlaybackRate() { - - return this.playbackRate; - - } - - onEnded() { - - this.isPlaying = false; - - } - - getLoop() { - - if ( this.hasPlaybackControl === false ) { - - console.warn( 'THREE.Audio: this Audio has no playback control.' ); - return false; - - } - - return this.loop; - - } - - setLoop( value ) { - - if ( this.hasPlaybackControl === false ) { - - console.warn( 'THREE.Audio: this Audio has no playback control.' ); - return; - - } - - this.loop = value; - - if ( this.isPlaying === true ) { - - this.source.loop = this.loop; - - } - - return this; - - } - - setLoopStart( value ) { - - this.loopStart = value; - - return this; - - } - - setLoopEnd( value ) { - - this.loopEnd = value; - - return this; - - } - - getVolume() { - - return this.gain.gain.value; - - } - - setVolume( value ) { - - this.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 ); - - return this; - - } - -} - -const _position = /*@__PURE__*/ new Vector3(); -const _quaternion = /*@__PURE__*/ new Quaternion(); -const _scale = /*@__PURE__*/ new Vector3(); -const _orientation = /*@__PURE__*/ new Vector3(); - -class PositionalAudio extends Audio { - - constructor( listener ) { - - super( listener ); - - this.panner = this.context.createPanner(); - this.panner.panningModel = 'HRTF'; - this.panner.connect( this.gain ); - - } - - getOutput() { - - return this.panner; - - } - - getRefDistance() { - - return this.panner.refDistance; - - } - - setRefDistance( value ) { - - this.panner.refDistance = value; - - return this; - - } - - getRolloffFactor() { - - return this.panner.rolloffFactor; - - } - - setRolloffFactor( value ) { - - this.panner.rolloffFactor = value; - - return this; - - } - - getDistanceModel() { - - return this.panner.distanceModel; - - } - - setDistanceModel( value ) { - - this.panner.distanceModel = value; - - return this; - - } - - getMaxDistance() { - - return this.panner.maxDistance; - - } - - setMaxDistance( value ) { - - this.panner.maxDistance = value; - - return this; - - } - - setDirectionalCone( coneInnerAngle, coneOuterAngle, coneOuterGain ) { - - this.panner.coneInnerAngle = coneInnerAngle; - this.panner.coneOuterAngle = coneOuterAngle; - this.panner.coneOuterGain = coneOuterGain; - - return this; - - } - - updateMatrixWorld( force ) { - - super.updateMatrixWorld( force ); - - if ( this.hasPlaybackControl === true && this.isPlaying === false ) return; - - this.matrixWorld.decompose( _position, _quaternion, _scale ); - - _orientation.set( 0, 0, 1 ).applyQuaternion( _quaternion ); - - const panner = this.panner; - - if ( panner.positionX ) { - - // code path for Chrome and Firefox (see #14393) - - const endTime = this.context.currentTime + this.listener.timeDelta; - - panner.positionX.linearRampToValueAtTime( _position.x, endTime ); - panner.positionY.linearRampToValueAtTime( _position.y, endTime ); - panner.positionZ.linearRampToValueAtTime( _position.z, endTime ); - panner.orientationX.linearRampToValueAtTime( _orientation.x, endTime ); - panner.orientationY.linearRampToValueAtTime( _orientation.y, endTime ); - panner.orientationZ.linearRampToValueAtTime( _orientation.z, endTime ); - - } else { - - panner.setPosition( _position.x, _position.y, _position.z ); - panner.setOrientation( _orientation.x, _orientation.y, _orientation.z ); - - } - - } - -} - -class AudioAnalyser { - - constructor( audio, fftSize = 2048 ) { - - this.analyser = audio.context.createAnalyser(); - this.analyser.fftSize = fftSize; - - this.data = new Uint8Array( this.analyser.frequencyBinCount ); - - audio.getOutput().connect( this.analyser ); - - } - - - getFrequencyData() { - - this.analyser.getByteFrequencyData( this.data ); - - return this.data; - - } - - getAverageFrequency() { - - let value = 0; - const data = this.getFrequencyData(); - - for ( let i = 0; i < data.length; i ++ ) { - - value += data[ i ]; - - } - - return value / data.length; - - } - -} - -class PropertyMixer { - - constructor( binding, typeName, valueSize ) { - - this.binding = binding; - this.valueSize = valueSize; - - let mixFunction, - mixFunctionAdditive, - setIdentity; - - // buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ] - // - // interpolators can use .buffer as their .result - // the data then goes to 'incoming' - // - // 'accu0' and 'accu1' are used frame-interleaved for - // the cumulative result and are compared to detect - // changes - // - // 'orig' stores the original state of the property - // - // 'add' is used for additive cumulative results - // - // 'work' is optional and is only present for quaternion types. It is used - // to store intermediate quaternion multiplication results - - switch ( typeName ) { - - case 'quaternion': - mixFunction = this._slerp; - mixFunctionAdditive = this._slerpAdditive; - setIdentity = this._setAdditiveIdentityQuaternion; - - this.buffer = new Float64Array( valueSize * 6 ); - this._workIndex = 5; - break; - - case 'string': - case 'bool': - mixFunction = this._select; - - // Use the regular mix function and for additive on these types, - // additive is not relevant for non-numeric types - mixFunctionAdditive = this._select; - - setIdentity = this._setAdditiveIdentityOther; - - this.buffer = new Array( valueSize * 5 ); - break; - - default: - mixFunction = this._lerp; - mixFunctionAdditive = this._lerpAdditive; - setIdentity = this._setAdditiveIdentityNumeric; - - this.buffer = new Float64Array( valueSize * 5 ); - - } - - this._mixBufferRegion = mixFunction; - this._mixBufferRegionAdditive = mixFunctionAdditive; - this._setIdentity = setIdentity; - this._origIndex = 3; - this._addIndex = 4; - - this.cumulativeWeight = 0; - this.cumulativeWeightAdditive = 0; - - this.useCount = 0; - this.referenceCount = 0; - - } - - // accumulate data in the 'incoming' region into 'accu' - accumulate( accuIndex, weight ) { - - // note: happily accumulating nothing when weight = 0, the caller knows - // the weight and shouldn't have made the call in the first place - - const buffer = this.buffer, - stride = this.valueSize, - offset = accuIndex * stride + stride; - - let currentWeight = this.cumulativeWeight; - - if ( currentWeight === 0 ) { - - // accuN := incoming * weight - - for ( let i = 0; i !== stride; ++ i ) { - - buffer[ offset + i ] = buffer[ i ]; - - } - - currentWeight = weight; - - } else { - - // accuN := accuN + incoming * weight - - currentWeight += weight; - const mix = weight / currentWeight; - this._mixBufferRegion( buffer, offset, 0, mix, stride ); - - } - - this.cumulativeWeight = currentWeight; - - } - - // accumulate data in the 'incoming' region into 'add' - accumulateAdditive( weight ) { - - const buffer = this.buffer, - stride = this.valueSize, - offset = stride * this._addIndex; - - if ( this.cumulativeWeightAdditive === 0 ) { - - // add = identity - - this._setIdentity(); - - } - - // add := add + incoming * weight - - this._mixBufferRegionAdditive( buffer, offset, 0, weight, stride ); - this.cumulativeWeightAdditive += weight; - - } - - // apply the state of 'accu' to the binding when accus differ - apply( accuIndex ) { - - const stride = this.valueSize, - buffer = this.buffer, - offset = accuIndex * stride + stride, - - weight = this.cumulativeWeight, - weightAdditive = this.cumulativeWeightAdditive, - - binding = this.binding; - - this.cumulativeWeight = 0; - this.cumulativeWeightAdditive = 0; - - if ( weight < 1 ) { - - // accuN := accuN + original * ( 1 - cumulativeWeight ) - - const originalValueOffset = stride * this._origIndex; - - this._mixBufferRegion( - buffer, offset, originalValueOffset, 1 - weight, stride ); - - } - - if ( weightAdditive > 0 ) { - - // accuN := accuN + additive accuN - - this._mixBufferRegionAdditive( buffer, offset, this._addIndex * stride, 1, stride ); - - } - - for ( let i = stride, e = stride + stride; i !== e; ++ i ) { - - if ( buffer[ i ] !== buffer[ i + stride ] ) { - - // value has changed -> update scene graph - - binding.setValue( buffer, offset ); - break; - - } - - } - - } - - // remember the state of the bound property and copy it to both accus - saveOriginalState() { - - const binding = this.binding; - - const buffer = this.buffer, - stride = this.valueSize, - - originalValueOffset = stride * this._origIndex; - - binding.getValue( buffer, originalValueOffset ); - - // accu[0..1] := orig -- initially detect changes against the original - for ( let i = stride, e = originalValueOffset; i !== e; ++ i ) { - - buffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ]; - - } - - // Add to identity for additive - this._setIdentity(); - - this.cumulativeWeight = 0; - this.cumulativeWeightAdditive = 0; - - } - - // apply the state previously taken via 'saveOriginalState' to the binding - restoreOriginalState() { - - const originalValueOffset = this.valueSize * 3; - this.binding.setValue( this.buffer, originalValueOffset ); - - } - - _setAdditiveIdentityNumeric() { - - const startIndex = this._addIndex * this.valueSize; - const endIndex = startIndex + this.valueSize; - - for ( let i = startIndex; i < endIndex; i ++ ) { - - this.buffer[ i ] = 0; - - } - - } - - _setAdditiveIdentityQuaternion() { - - this._setAdditiveIdentityNumeric(); - this.buffer[ this._addIndex * this.valueSize + 3 ] = 1; - - } - - _setAdditiveIdentityOther() { - - const startIndex = this._origIndex * this.valueSize; - const targetIndex = this._addIndex * this.valueSize; - - for ( let i = 0; i < this.valueSize; i ++ ) { - - this.buffer[ targetIndex + i ] = this.buffer[ startIndex + i ]; - - } - - } - - - // mix functions - - _select( buffer, dstOffset, srcOffset, t, stride ) { - - if ( t >= 0.5 ) { - - for ( let i = 0; i !== stride; ++ i ) { - - buffer[ dstOffset + i ] = buffer[ srcOffset + i ]; - - } - - } - - } - - _slerp( buffer, dstOffset, srcOffset, t ) { - - Quaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t ); - - } - - _slerpAdditive( buffer, dstOffset, srcOffset, t, stride ) { - - const workOffset = this._workIndex * stride; - - // Store result in intermediate buffer offset - Quaternion.multiplyQuaternionsFlat( buffer, workOffset, buffer, dstOffset, buffer, srcOffset ); - - // Slerp to the intermediate result - Quaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t ); - - } - - _lerp( buffer, dstOffset, srcOffset, t, stride ) { - - const s = 1 - t; - - for ( let i = 0; i !== stride; ++ i ) { - - const j = dstOffset + i; - - buffer[ j ] = buffer[ j ] * s + buffer[ srcOffset + i ] * t; - - } - - } - - _lerpAdditive( buffer, dstOffset, srcOffset, t, stride ) { - - for ( let i = 0; i !== stride; ++ i ) { - - const j = dstOffset + i; - - buffer[ j ] = buffer[ j ] + buffer[ srcOffset + i ] * t; - - } - - } - -} - -// Characters [].:/ are reserved for track binding syntax. -const _RESERVED_CHARS_RE = '\\[\\]\\.:\\/'; -const _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' ); - -// Attempts to allow node names from any language. ES5's `\w` regexp matches -// only latin characters, and the unicode \p{L} is not yet supported. So -// instead, we exclude reserved characters and match everything else. -const _wordChar = '[^' + _RESERVED_CHARS_RE + ']'; -const _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace( '\\.', '' ) + ']'; - -// Parent directories, delimited by '/' or ':'. Currently unused, but must -// be matched to parse the rest of the track name. -const _directoryRe = /((?:WC+[\/:])*)/.source.replace( 'WC', _wordChar ); - -// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'. -const _nodeRe = /(WCOD+)?/.source.replace( 'WCOD', _wordCharOrDot ); - -// Object on target node, and accessor. May not contain reserved -// characters. Accessor may contain any character except closing bracket. -const _objectRe = /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace( 'WC', _wordChar ); - -// Property and accessor. May not contain reserved characters. Accessor may -// contain any non-bracket characters. -const _propertyRe = /\.(WC+)(?:\[(.+)\])?/.source.replace( 'WC', _wordChar ); - -const _trackRe = new RegExp( '' - + '^' - + _directoryRe - + _nodeRe - + _objectRe - + _propertyRe - + '$' -); - -const _supportedObjectNames = [ 'material', 'materials', 'bones' ]; - -class Composite { - - constructor( targetGroup, path, optionalParsedPath ) { - - const parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path ); - - this._targetGroup = targetGroup; - this._bindings = targetGroup.subscribe_( path, parsedPath ); - - } - - getValue( array, offset ) { - - this.bind(); // bind all binding - - const firstValidIndex = this._targetGroup.nCachedObjects_, - binding = this._bindings[ firstValidIndex ]; - - // and only call .getValue on the first - if ( binding !== undefined ) binding.getValue( array, offset ); - - } - - setValue( array, offset ) { - - const bindings = this._bindings; - - for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { - - bindings[ i ].setValue( array, offset ); - - } - - } - - bind() { - - const bindings = this._bindings; - - for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { - - bindings[ i ].bind(); - - } - - } - - unbind() { - - const bindings = this._bindings; - - for ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) { - - bindings[ i ].unbind(); - - } - - } - -} - -// Note: This class uses a State pattern on a per-method basis: -// 'bind' sets 'this.getValue' / 'setValue' and shadows the -// prototype version of these methods with one that represents -// the bound state. When the property is not found, the methods -// become no-ops. -class PropertyBinding { - - constructor( rootNode, path, parsedPath ) { - - this.path = path; - this.parsedPath = parsedPath || PropertyBinding.parseTrackName( path ); - - this.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName ) || rootNode; - - this.rootNode = rootNode; - - // initial state of these methods that calls 'bind' - this.getValue = this._getValue_unbound; - this.setValue = this._setValue_unbound; - - } - - - static create( root, path, parsedPath ) { - - if ( ! ( root && root.isAnimationObjectGroup ) ) { - - return new PropertyBinding( root, path, parsedPath ); - - } else { - - return new PropertyBinding.Composite( root, path, parsedPath ); - - } - - } - - /** - * Replaces spaces with underscores and removes unsupported characters from - * node names, to ensure compatibility with parseTrackName(). - * - * @param {string} name Node name to be sanitized. - * @return {string} - */ - static sanitizeNodeName( name ) { - - return name.replace( /\s/g, '_' ).replace( _reservedRe, '' ); - - } - - static parseTrackName( trackName ) { - - const matches = _trackRe.exec( trackName ); - - if ( ! matches ) { - - throw new Error( 'PropertyBinding: Cannot parse trackName: ' + trackName ); - - } - - const results = { - // directoryName: matches[ 1 ], // (tschw) currently unused - nodeName: matches[ 2 ], - objectName: matches[ 3 ], - objectIndex: matches[ 4 ], - propertyName: matches[ 5 ], // required - propertyIndex: matches[ 6 ] - }; - - const lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' ); - - if ( lastDot !== undefined && lastDot !== - 1 ) { - - const objectName = results.nodeName.substring( lastDot + 1 ); - - // Object names must be checked against an allowlist. Otherwise, there - // is no way to parse 'foo.bar.baz': 'baz' must be a property, but - // 'bar' could be the objectName, or part of a nodeName (which can - // include '.' characters). - if ( _supportedObjectNames.indexOf( objectName ) !== - 1 ) { - - results.nodeName = results.nodeName.substring( 0, lastDot ); - results.objectName = objectName; - - } - - } - - if ( results.propertyName === null || results.propertyName.length === 0 ) { - - throw new Error( 'PropertyBinding: can not parse propertyName from trackName: ' + trackName ); - - } - - return results; - - } - - static findNode( root, nodeName ) { - - if ( ! nodeName || nodeName === '' || nodeName === '.' || nodeName === - 1 || nodeName === root.name || nodeName === root.uuid ) { - - return root; - - } - - // search into skeleton bones. - if ( root.skeleton ) { - - const bone = root.skeleton.getBoneByName( nodeName ); - - if ( bone !== undefined ) { - - return bone; - - } - - } - - // search into node subtree. - if ( root.children ) { - - const searchNodeSubtree = function ( children ) { - - for ( let i = 0; i < children.length; i ++ ) { - - const childNode = children[ i ]; - - if ( childNode.name === nodeName || childNode.uuid === nodeName ) { - - return childNode; - - } - - const result = searchNodeSubtree( childNode.children ); - - if ( result ) return result; - - } - - return null; - - }; - - const subTreeNode = searchNodeSubtree( root.children ); - - if ( subTreeNode ) { - - return subTreeNode; - - } - - } - - return null; - - } - - // these are used to "bind" a nonexistent property - _getValue_unavailable() {} - _setValue_unavailable() {} - - // Getters - - _getValue_direct( buffer, offset ) { - - buffer[ offset ] = this.node[ this.propertyName ]; - - } - - _getValue_array( buffer, offset ) { - - const source = this.resolvedProperty; - - for ( let i = 0, n = source.length; i !== n; ++ i ) { - - buffer[ offset ++ ] = source[ i ]; - - } - - } - - _getValue_arrayElement( buffer, offset ) { - - buffer[ offset ] = this.resolvedProperty[ this.propertyIndex ]; - - } - - _getValue_toArray( buffer, offset ) { - - this.resolvedProperty.toArray( buffer, offset ); - - } - - // Direct - - _setValue_direct( buffer, offset ) { - - this.targetObject[ this.propertyName ] = buffer[ offset ]; - - } - - _setValue_direct_setNeedsUpdate( buffer, offset ) { - - this.targetObject[ this.propertyName ] = buffer[ offset ]; - this.targetObject.needsUpdate = true; - - } - - _setValue_direct_setMatrixWorldNeedsUpdate( buffer, offset ) { - - this.targetObject[ this.propertyName ] = buffer[ offset ]; - this.targetObject.matrixWorldNeedsUpdate = true; - - } - - // EntireArray - - _setValue_array( buffer, offset ) { - - const dest = this.resolvedProperty; - - for ( let i = 0, n = dest.length; i !== n; ++ i ) { - - dest[ i ] = buffer[ offset ++ ]; - - } - - } - - _setValue_array_setNeedsUpdate( buffer, offset ) { - - const dest = this.resolvedProperty; - - for ( let i = 0, n = dest.length; i !== n; ++ i ) { - - dest[ i ] = buffer[ offset ++ ]; - - } - - this.targetObject.needsUpdate = true; - - } - - _setValue_array_setMatrixWorldNeedsUpdate( buffer, offset ) { - - const dest = this.resolvedProperty; - - for ( let i = 0, n = dest.length; i !== n; ++ i ) { - - dest[ i ] = buffer[ offset ++ ]; - - } - - this.targetObject.matrixWorldNeedsUpdate = true; - - } - - // ArrayElement - - _setValue_arrayElement( buffer, offset ) { - - this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; - - } - - _setValue_arrayElement_setNeedsUpdate( buffer, offset ) { - - this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; - this.targetObject.needsUpdate = true; - - } - - _setValue_arrayElement_setMatrixWorldNeedsUpdate( buffer, offset ) { - - this.resolvedProperty[ this.propertyIndex ] = buffer[ offset ]; - this.targetObject.matrixWorldNeedsUpdate = true; - - } - - // HasToFromArray - - _setValue_fromArray( buffer, offset ) { - - this.resolvedProperty.fromArray( buffer, offset ); - - } - - _setValue_fromArray_setNeedsUpdate( buffer, offset ) { - - this.resolvedProperty.fromArray( buffer, offset ); - this.targetObject.needsUpdate = true; - - } - - _setValue_fromArray_setMatrixWorldNeedsUpdate( buffer, offset ) { - - this.resolvedProperty.fromArray( buffer, offset ); - this.targetObject.matrixWorldNeedsUpdate = true; - - } - - _getValue_unbound( targetArray, offset ) { - - this.bind(); - this.getValue( targetArray, offset ); - - } - - _setValue_unbound( sourceArray, offset ) { - - this.bind(); - this.setValue( sourceArray, offset ); - - } - - // create getter / setter pair for a property in the scene graph - bind() { - - let targetObject = this.node; - const parsedPath = this.parsedPath; - - const objectName = parsedPath.objectName; - const propertyName = parsedPath.propertyName; - let propertyIndex = parsedPath.propertyIndex; - - if ( ! targetObject ) { - - targetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName ) || this.rootNode; - - this.node = targetObject; - - } - - // set fail state so we can just 'return' on error - this.getValue = this._getValue_unavailable; - this.setValue = this._setValue_unavailable; - - // ensure there is a value node - if ( ! targetObject ) { - - console.error( 'THREE.PropertyBinding: Trying to update node for track: ' + this.path + ' but it wasn\'t found.' ); - return; - - } - - if ( objectName ) { - - let objectIndex = parsedPath.objectIndex; - - // special cases were we need to reach deeper into the hierarchy to get the face materials.... - switch ( objectName ) { - - case 'materials': - - if ( ! targetObject.material ) { - - console.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this ); - return; - - } - - if ( ! targetObject.material.materials ) { - - console.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this ); - return; - - } - - targetObject = targetObject.material.materials; - - break; - - case 'bones': - - if ( ! targetObject.skeleton ) { - - console.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this ); - return; - - } - - // potential future optimization: skip this if propertyIndex is already an integer - // and convert the integer string to a true integer. - - targetObject = targetObject.skeleton.bones; - - // support resolving morphTarget names into indices. - for ( let i = 0; i < targetObject.length; i ++ ) { - - if ( targetObject[ i ].name === objectIndex ) { - - objectIndex = i; - break; - - } - - } - - break; - - default: - - if ( targetObject[ objectName ] === undefined ) { - - console.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this ); - return; - - } - - targetObject = targetObject[ objectName ]; - - } - - - if ( objectIndex !== undefined ) { - - if ( targetObject[ objectIndex ] === undefined ) { - - console.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject ); - return; - - } - - targetObject = targetObject[ objectIndex ]; - - } - - } - - // resolve property - const nodeProperty = targetObject[ propertyName ]; - - if ( nodeProperty === undefined ) { - - const nodeName = parsedPath.nodeName; - - console.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName + - '.' + propertyName + ' but it wasn\'t found.', targetObject ); - return; - - } - - // determine versioning scheme - let versioning = this.Versioning.None; - - this.targetObject = targetObject; - - if ( targetObject.needsUpdate !== undefined ) { // material - - versioning = this.Versioning.NeedsUpdate; - - } else if ( targetObject.matrixWorldNeedsUpdate !== undefined ) { // node transform - - versioning = this.Versioning.MatrixWorldNeedsUpdate; - - } - - // determine how the property gets bound - let bindingType = this.BindingType.Direct; - - if ( propertyIndex !== undefined ) { - - // access a sub element of the property array (only primitives are supported right now) - - if ( propertyName === 'morphTargetInfluences' ) { - - // potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer. - - // support resolving morphTarget names into indices. - if ( ! targetObject.geometry ) { - - console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this ); - return; - - } - - if ( targetObject.geometry.isBufferGeometry ) { - - if ( ! targetObject.geometry.morphAttributes ) { - - console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this ); - return; - - } - - if ( targetObject.morphTargetDictionary[ propertyIndex ] !== undefined ) { - - propertyIndex = targetObject.morphTargetDictionary[ propertyIndex ]; - - } - - - } else { - - console.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.', this ); - return; - - } - - } - - bindingType = this.BindingType.ArrayElement; - - this.resolvedProperty = nodeProperty; - this.propertyIndex = propertyIndex; - - } else if ( nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined ) { - - // must use copy for Object3D.Euler/Quaternion - - bindingType = this.BindingType.HasFromToArray; - - this.resolvedProperty = nodeProperty; - - } else if ( Array.isArray( nodeProperty ) ) { - - bindingType = this.BindingType.EntireArray; - - this.resolvedProperty = nodeProperty; - - } else { - - this.propertyName = propertyName; - - } - - // select getter / setter - this.getValue = this.GetterByBindingType[ bindingType ]; - this.setValue = this.SetterByBindingTypeAndVersioning[ bindingType ][ versioning ]; - - } - - unbind() { - - this.node = null; - - // back to the prototype version of getValue / setValue - // note: avoiding to mutate the shape of 'this' via 'delete' - this.getValue = this._getValue_unbound; - this.setValue = this._setValue_unbound; - - } - -} - -PropertyBinding.Composite = Composite; - -PropertyBinding.prototype.BindingType = { - Direct: 0, - EntireArray: 1, - ArrayElement: 2, - HasFromToArray: 3 -}; - -PropertyBinding.prototype.Versioning = { - None: 0, - NeedsUpdate: 1, - MatrixWorldNeedsUpdate: 2 -}; - -PropertyBinding.prototype.GetterByBindingType = [ - - PropertyBinding.prototype._getValue_direct, - PropertyBinding.prototype._getValue_array, - PropertyBinding.prototype._getValue_arrayElement, - PropertyBinding.prototype._getValue_toArray, - -]; - -PropertyBinding.prototype.SetterByBindingTypeAndVersioning = [ - - [ - // Direct - PropertyBinding.prototype._setValue_direct, - PropertyBinding.prototype._setValue_direct_setNeedsUpdate, - PropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate, - - ], [ - - // EntireArray - - PropertyBinding.prototype._setValue_array, - PropertyBinding.prototype._setValue_array_setNeedsUpdate, - PropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate, - - ], [ - - // ArrayElement - PropertyBinding.prototype._setValue_arrayElement, - PropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate, - PropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate, - - ], [ - - // HasToFromArray - PropertyBinding.prototype._setValue_fromArray, - PropertyBinding.prototype._setValue_fromArray_setNeedsUpdate, - PropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate, - - ] - -]; - -/** - * - * A group of objects that receives a shared animation state. - * - * Usage: - * - * - Add objects you would otherwise pass as 'root' to the - * constructor or the .clipAction method of AnimationMixer. - * - * - Instead pass this object as 'root'. - * - * - You can also add and remove objects later when the mixer - * is running. - * - * Note: - * - * Objects of this class appear as one object to the mixer, - * so cache control of the individual objects must be done - * on the group. - * - * Limitation: - * - * - The animated properties must be compatible among the - * all objects in the group. - * - * - A single property can either be controlled through a - * target group or directly, but not both. - */ - -class AnimationObjectGroup { - - constructor() { - - this.uuid = generateUUID(); - - // cached objects followed by the active ones - this._objects = Array.prototype.slice.call( arguments ); - - this.nCachedObjects_ = 0; // threshold - // note: read by PropertyBinding.Composite - - const indices = {}; - this._indicesByUUID = indices; // for bookkeeping - - for ( let i = 0, n = arguments.length; i !== n; ++ i ) { - - indices[ arguments[ i ].uuid ] = i; - - } - - this._paths = []; // inside: string - this._parsedPaths = []; // inside: { we don't care, here } - this._bindings = []; // inside: Array< PropertyBinding > - this._bindingsIndicesByPath = {}; // inside: indices in these arrays - - const scope = this; - - this.stats = { - - objects: { - get total() { - - return scope._objects.length; - - }, - get inUse() { - - return this.total - scope.nCachedObjects_; - - } - }, - get bindingsPerObject() { - - return scope._bindings.length; - - } - - }; - - } - - add() { - - const objects = this._objects, - indicesByUUID = this._indicesByUUID, - paths = this._paths, - parsedPaths = this._parsedPaths, - bindings = this._bindings, - nBindings = bindings.length; - - let knownObject = undefined, - nObjects = objects.length, - nCachedObjects = this.nCachedObjects_; - - for ( let i = 0, n = arguments.length; i !== n; ++ i ) { - - const object = arguments[ i ], - uuid = object.uuid; - let index = indicesByUUID[ uuid ]; - - if ( index === undefined ) { - - // unknown object -> add it to the ACTIVE region - - index = nObjects ++; - indicesByUUID[ uuid ] = index; - objects.push( object ); - - // accounting is done, now do the same for all bindings - - for ( let j = 0, m = nBindings; j !== m; ++ j ) { - - bindings[ j ].push( new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ) ); - - } - - } else if ( index < nCachedObjects ) { - - knownObject = objects[ index ]; - - // move existing object to the ACTIVE region - - const firstActiveIndex = -- nCachedObjects, - lastCachedObject = objects[ firstActiveIndex ]; - - indicesByUUID[ lastCachedObject.uuid ] = index; - objects[ index ] = lastCachedObject; - - indicesByUUID[ uuid ] = firstActiveIndex; - objects[ firstActiveIndex ] = object; - - // accounting is done, now do the same for all bindings - - for ( let j = 0, m = nBindings; j !== m; ++ j ) { - - const bindingsForPath = bindings[ j ], - lastCached = bindingsForPath[ firstActiveIndex ]; - - let binding = bindingsForPath[ index ]; - - bindingsForPath[ index ] = lastCached; - - if ( binding === undefined ) { - - // since we do not bother to create new bindings - // for objects that are cached, the binding may - // or may not exist - - binding = new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ); - - } - - bindingsForPath[ firstActiveIndex ] = binding; - - } - - } else if ( objects[ index ] !== knownObject ) { - - console.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' + - 'detected. Clean the caches or recreate your infrastructure when reloading scenes.' ); - - } // else the object is already where we want it to be - - } // for arguments - - this.nCachedObjects_ = nCachedObjects; - - } - - remove() { - - const objects = this._objects, - indicesByUUID = this._indicesByUUID, - bindings = this._bindings, - nBindings = bindings.length; - - let nCachedObjects = this.nCachedObjects_; - - for ( let i = 0, n = arguments.length; i !== n; ++ i ) { - - const object = arguments[ i ], - uuid = object.uuid, - index = indicesByUUID[ uuid ]; - - if ( index !== undefined && index >= nCachedObjects ) { - - // move existing object into the CACHED region - - const lastCachedIndex = nCachedObjects ++, - firstActiveObject = objects[ lastCachedIndex ]; - - indicesByUUID[ firstActiveObject.uuid ] = index; - objects[ index ] = firstActiveObject; - - indicesByUUID[ uuid ] = lastCachedIndex; - objects[ lastCachedIndex ] = object; - - // accounting is done, now do the same for all bindings - - for ( let j = 0, m = nBindings; j !== m; ++ j ) { - - const bindingsForPath = bindings[ j ], - firstActive = bindingsForPath[ lastCachedIndex ], - binding = bindingsForPath[ index ]; - - bindingsForPath[ index ] = firstActive; - bindingsForPath[ lastCachedIndex ] = binding; - - } - - } - - } // for arguments - - this.nCachedObjects_ = nCachedObjects; - - } - - // remove & forget - uncache() { - - const objects = this._objects, - indicesByUUID = this._indicesByUUID, - bindings = this._bindings, - nBindings = bindings.length; - - let nCachedObjects = this.nCachedObjects_, - nObjects = objects.length; - - for ( let i = 0, n = arguments.length; i !== n; ++ i ) { - - const object = arguments[ i ], - uuid = object.uuid, - index = indicesByUUID[ uuid ]; - - if ( index !== undefined ) { - - delete indicesByUUID[ uuid ]; - - if ( index < nCachedObjects ) { - - // object is cached, shrink the CACHED region - - const firstActiveIndex = -- nCachedObjects, - lastCachedObject = objects[ firstActiveIndex ], - lastIndex = -- nObjects, - lastObject = objects[ lastIndex ]; - - // last cached object takes this object's place - indicesByUUID[ lastCachedObject.uuid ] = index; - objects[ index ] = lastCachedObject; - - // last object goes to the activated slot and pop - indicesByUUID[ lastObject.uuid ] = firstActiveIndex; - objects[ firstActiveIndex ] = lastObject; - objects.pop(); - - // accounting is done, now do the same for all bindings - - for ( let j = 0, m = nBindings; j !== m; ++ j ) { - - const bindingsForPath = bindings[ j ], - lastCached = bindingsForPath[ firstActiveIndex ], - last = bindingsForPath[ lastIndex ]; - - bindingsForPath[ index ] = lastCached; - bindingsForPath[ firstActiveIndex ] = last; - bindingsForPath.pop(); - - } - - } else { - - // object is active, just swap with the last and pop - - const lastIndex = -- nObjects, - lastObject = objects[ lastIndex ]; - - if ( lastIndex > 0 ) { - - indicesByUUID[ lastObject.uuid ] = index; - - } - - objects[ index ] = lastObject; - objects.pop(); - - // accounting is done, now do the same for all bindings - - for ( let j = 0, m = nBindings; j !== m; ++ j ) { - - const bindingsForPath = bindings[ j ]; - - bindingsForPath[ index ] = bindingsForPath[ lastIndex ]; - bindingsForPath.pop(); - - } - - } // cached or active - - } // if object is known - - } // for arguments - - this.nCachedObjects_ = nCachedObjects; - - } - - // Internal interface used by befriended PropertyBinding.Composite: - - subscribe_( path, parsedPath ) { - - // returns an array of bindings for the given path that is changed - // according to the contained objects in the group - - const indicesByPath = this._bindingsIndicesByPath; - let index = indicesByPath[ path ]; - const bindings = this._bindings; - - if ( index !== undefined ) return bindings[ index ]; - - const paths = this._paths, - parsedPaths = this._parsedPaths, - objects = this._objects, - nObjects = objects.length, - nCachedObjects = this.nCachedObjects_, - bindingsForPath = new Array( nObjects ); - - index = bindings.length; - - indicesByPath[ path ] = index; - - paths.push( path ); - parsedPaths.push( parsedPath ); - bindings.push( bindingsForPath ); - - for ( let i = nCachedObjects, n = objects.length; i !== n; ++ i ) { - - const object = objects[ i ]; - bindingsForPath[ i ] = new PropertyBinding( object, path, parsedPath ); - - } - - return bindingsForPath; - - } - - unsubscribe_( path ) { - - // tells the group to forget about a property path and no longer - // update the array previously obtained with 'subscribe_' - - const indicesByPath = this._bindingsIndicesByPath, - index = indicesByPath[ path ]; - - if ( index !== undefined ) { - - const paths = this._paths, - parsedPaths = this._parsedPaths, - bindings = this._bindings, - lastBindingsIndex = bindings.length - 1, - lastBindings = bindings[ lastBindingsIndex ], - lastBindingsPath = path[ lastBindingsIndex ]; - - indicesByPath[ lastBindingsPath ] = index; - - bindings[ index ] = lastBindings; - bindings.pop(); - - parsedPaths[ index ] = parsedPaths[ lastBindingsIndex ]; - parsedPaths.pop(); - - paths[ index ] = paths[ lastBindingsIndex ]; - paths.pop(); - - } - - } - -} - -AnimationObjectGroup.prototype.isAnimationObjectGroup = true; - -class AnimationAction { - - constructor( mixer, clip, localRoot = null, blendMode = clip.blendMode ) { - - this._mixer = mixer; - this._clip = clip; - this._localRoot = localRoot; - this.blendMode = blendMode; - - const tracks = clip.tracks, - nTracks = tracks.length, - interpolants = new Array( nTracks ); - - const interpolantSettings = { - endingStart: ZeroCurvatureEnding, - endingEnd: ZeroCurvatureEnding - }; - - for ( let i = 0; i !== nTracks; ++ i ) { - - const interpolant = tracks[ i ].createInterpolant( null ); - interpolants[ i ] = interpolant; - interpolant.settings = interpolantSettings; - - } - - this._interpolantSettings = interpolantSettings; - - this._interpolants = interpolants; // bound by the mixer - - // inside: PropertyMixer (managed by the mixer) - this._propertyBindings = new Array( nTracks ); - - this._cacheIndex = null; // for the memory manager - this._byClipCacheIndex = null; // for the memory manager - - this._timeScaleInterpolant = null; - this._weightInterpolant = null; - - this.loop = LoopRepeat; - this._loopCount = - 1; - - // global mixer time when the action is to be started - // it's set back to 'null' upon start of the action - this._startTime = null; - - // scaled local time of the action - // gets clamped or wrapped to 0..clip.duration according to loop - this.time = 0; - - this.timeScale = 1; - this._effectiveTimeScale = 1; - - this.weight = 1; - this._effectiveWeight = 1; - - this.repetitions = Infinity; // no. of repetitions when looping - - this.paused = false; // true -> zero effective time scale - this.enabled = true; // false -> zero effective weight - - this.clampWhenFinished = false;// keep feeding the last frame? - - this.zeroSlopeAtStart = true;// for smooth interpolation w/o separate - this.zeroSlopeAtEnd = true;// clips for start, loop and end - - } - - // State & Scheduling - - play() { - - this._mixer._activateAction( this ); - - return this; - - } - - stop() { - - this._mixer._deactivateAction( this ); - - return this.reset(); - - } - - reset() { - - this.paused = false; - this.enabled = true; - - this.time = 0; // restart clip - this._loopCount = - 1;// forget previous loops - this._startTime = null;// forget scheduling - - return this.stopFading().stopWarping(); - - } - - isRunning() { - - return this.enabled && ! this.paused && this.timeScale !== 0 && - this._startTime === null && this._mixer._isActiveAction( this ); - - } - - // return true when play has been called - isScheduled() { - - return this._mixer._isActiveAction( this ); - - } - - startAt( time ) { - - this._startTime = time; - - return this; - - } - - setLoop( mode, repetitions ) { - - this.loop = mode; - this.repetitions = repetitions; - - return this; - - } - - // Weight - - // set the weight stopping any scheduled fading - // although .enabled = false yields an effective weight of zero, this - // method does *not* change .enabled, because it would be confusing - setEffectiveWeight( weight ) { - - this.weight = weight; - - // note: same logic as when updated at runtime - this._effectiveWeight = this.enabled ? weight : 0; - - return this.stopFading(); - - } - - // return the weight considering fading and .enabled - getEffectiveWeight() { - - return this._effectiveWeight; - - } - - fadeIn( duration ) { - - return this._scheduleFading( duration, 0, 1 ); - - } - - fadeOut( duration ) { - - return this._scheduleFading( duration, 1, 0 ); - - } - - crossFadeFrom( fadeOutAction, duration, warp ) { - - fadeOutAction.fadeOut( duration ); - this.fadeIn( duration ); - - if ( warp ) { - - const fadeInDuration = this._clip.duration, - fadeOutDuration = fadeOutAction._clip.duration, - - startEndRatio = fadeOutDuration / fadeInDuration, - endStartRatio = fadeInDuration / fadeOutDuration; - - fadeOutAction.warp( 1.0, startEndRatio, duration ); - this.warp( endStartRatio, 1.0, duration ); - - } - - return this; - - } - - crossFadeTo( fadeInAction, duration, warp ) { - - return fadeInAction.crossFadeFrom( this, duration, warp ); - - } - - stopFading() { - - const weightInterpolant = this._weightInterpolant; - - if ( weightInterpolant !== null ) { - - this._weightInterpolant = null; - this._mixer._takeBackControlInterpolant( weightInterpolant ); - - } - - return this; - - } - - // Time Scale Control - - // set the time scale stopping any scheduled warping - // although .paused = true yields an effective time scale of zero, this - // method does *not* change .paused, because it would be confusing - setEffectiveTimeScale( timeScale ) { - - this.timeScale = timeScale; - this._effectiveTimeScale = this.paused ? 0 : timeScale; - - return this.stopWarping(); - - } - - // return the time scale considering warping and .paused - getEffectiveTimeScale() { - - return this._effectiveTimeScale; - - } - - setDuration( duration ) { - - this.timeScale = this._clip.duration / duration; - - return this.stopWarping(); - - } - - syncWith( action ) { - - this.time = action.time; - this.timeScale = action.timeScale; - - return this.stopWarping(); - - } - - halt( duration ) { - - return this.warp( this._effectiveTimeScale, 0, duration ); - - } - - warp( startTimeScale, endTimeScale, duration ) { - - const mixer = this._mixer, - now = mixer.time, - timeScale = this.timeScale; - - let interpolant = this._timeScaleInterpolant; - - if ( interpolant === null ) { - - interpolant = mixer._lendControlInterpolant(); - this._timeScaleInterpolant = interpolant; - - } - - const times = interpolant.parameterPositions, - values = interpolant.sampleValues; - - times[ 0 ] = now; - times[ 1 ] = now + duration; - - values[ 0 ] = startTimeScale / timeScale; - values[ 1 ] = endTimeScale / timeScale; - - return this; - - } - - stopWarping() { - - const timeScaleInterpolant = this._timeScaleInterpolant; - - if ( timeScaleInterpolant !== null ) { - - this._timeScaleInterpolant = null; - this._mixer._takeBackControlInterpolant( timeScaleInterpolant ); - - } - - return this; - - } - - // Object Accessors - - getMixer() { - - return this._mixer; - - } - - getClip() { - - return this._clip; - - } - - getRoot() { - - return this._localRoot || this._mixer._root; - - } - - // Interna - - _update( time, deltaTime, timeDirection, accuIndex ) { - - // called by the mixer - - if ( ! this.enabled ) { - - // call ._updateWeight() to update ._effectiveWeight - - this._updateWeight( time ); - return; - - } - - const startTime = this._startTime; - - if ( startTime !== null ) { - - // check for scheduled start of action - - const timeRunning = ( time - startTime ) * timeDirection; - if ( timeRunning < 0 || timeDirection === 0 ) { - - return; // yet to come / don't decide when delta = 0 - - } - - // start - - this._startTime = null; // unschedule - deltaTime = timeDirection * timeRunning; - - } - - // apply time scale and advance time - - deltaTime *= this._updateTimeScale( time ); - const clipTime = this._updateTime( deltaTime ); - - // note: _updateTime may disable the action resulting in - // an effective weight of 0 - - const weight = this._updateWeight( time ); - - if ( weight > 0 ) { - - const interpolants = this._interpolants; - const propertyMixers = this._propertyBindings; - - switch ( this.blendMode ) { - - case AdditiveAnimationBlendMode: - - for ( let j = 0, m = interpolants.length; j !== m; ++ j ) { - - interpolants[ j ].evaluate( clipTime ); - propertyMixers[ j ].accumulateAdditive( weight ); - - } - - break; - - case NormalAnimationBlendMode: - default: - - for ( let j = 0, m = interpolants.length; j !== m; ++ j ) { - - interpolants[ j ].evaluate( clipTime ); - propertyMixers[ j ].accumulate( accuIndex, weight ); - - } - - } - - } - - } - - _updateWeight( time ) { - - let weight = 0; - - if ( this.enabled ) { - - weight = this.weight; - const interpolant = this._weightInterpolant; - - if ( interpolant !== null ) { - - const interpolantValue = interpolant.evaluate( time )[ 0 ]; - - weight *= interpolantValue; - - if ( time > interpolant.parameterPositions[ 1 ] ) { - - this.stopFading(); - - if ( interpolantValue === 0 ) { - - // faded out, disable - this.enabled = false; - - } - - } - - } - - } - - this._effectiveWeight = weight; - return weight; - - } - - _updateTimeScale( time ) { - - let timeScale = 0; - - if ( ! this.paused ) { - - timeScale = this.timeScale; - - const interpolant = this._timeScaleInterpolant; - - if ( interpolant !== null ) { - - const interpolantValue = interpolant.evaluate( time )[ 0 ]; - - timeScale *= interpolantValue; - - if ( time > interpolant.parameterPositions[ 1 ] ) { - - this.stopWarping(); - - if ( timeScale === 0 ) { - - // motion has halted, pause - this.paused = true; - - } else { - - // warp done - apply final time scale - this.timeScale = timeScale; - - } - - } - - } - - } - - this._effectiveTimeScale = timeScale; - return timeScale; - - } - - _updateTime( deltaTime ) { - - const duration = this._clip.duration; - const loop = this.loop; - - let time = this.time + deltaTime; - let loopCount = this._loopCount; - - const pingPong = ( loop === LoopPingPong ); - - if ( deltaTime === 0 ) { - - if ( loopCount === - 1 ) return time; - - return ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time; - - } - - if ( loop === LoopOnce ) { - - if ( loopCount === - 1 ) { - - // just started - - this._loopCount = 0; - this._setEndings( true, true, false ); - - } - - handle_stop: { - - if ( time >= duration ) { - - time = duration; - - } else if ( time < 0 ) { - - time = 0; - - } else { - - this.time = time; - - break handle_stop; - - } - - if ( this.clampWhenFinished ) this.paused = true; - else this.enabled = false; - - this.time = time; - - this._mixer.dispatchEvent( { - type: 'finished', action: this, - direction: deltaTime < 0 ? - 1 : 1 - } ); - - } - - } else { // repetitive Repeat or PingPong - - if ( loopCount === - 1 ) { - - // just started - - if ( deltaTime >= 0 ) { - - loopCount = 0; - - this._setEndings( true, this.repetitions === 0, pingPong ); - - } else { - - // when looping in reverse direction, the initial - // transition through zero counts as a repetition, - // so leave loopCount at -1 - - this._setEndings( this.repetitions === 0, true, pingPong ); - - } - - } - - if ( time >= duration || time < 0 ) { - - // wrap around - - const loopDelta = Math.floor( time / duration ); // signed - time -= duration * loopDelta; - - loopCount += Math.abs( loopDelta ); - - const pending = this.repetitions - loopCount; - - if ( pending <= 0 ) { - - // have to stop (switch state, clamp time, fire event) - - if ( this.clampWhenFinished ) this.paused = true; - else this.enabled = false; - - time = deltaTime > 0 ? duration : 0; - - this.time = time; - - this._mixer.dispatchEvent( { - type: 'finished', action: this, - direction: deltaTime > 0 ? 1 : - 1 - } ); - - } else { - - // keep running - - if ( pending === 1 ) { - - // entering the last round - - const atStart = deltaTime < 0; - this._setEndings( atStart, ! atStart, pingPong ); - - } else { - - this._setEndings( false, false, pingPong ); - - } - - this._loopCount = loopCount; - - this.time = time; - - this._mixer.dispatchEvent( { - type: 'loop', action: this, loopDelta: loopDelta - } ); - - } - - } else { - - this.time = time; - - } - - if ( pingPong && ( loopCount & 1 ) === 1 ) { - - // invert time for the "pong round" - - return duration - time; - - } - - } - - return time; - - } - - _setEndings( atStart, atEnd, pingPong ) { - - const settings = this._interpolantSettings; - - if ( pingPong ) { - - settings.endingStart = ZeroSlopeEnding; - settings.endingEnd = ZeroSlopeEnding; - - } else { - - // assuming for LoopOnce atStart == atEnd == true - - if ( atStart ) { - - settings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding; - - } else { - - settings.endingStart = WrapAroundEnding; - - } - - if ( atEnd ) { - - settings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding; - - } else { - - settings.endingEnd = WrapAroundEnding; - - } - - } - - } - - _scheduleFading( duration, weightNow, weightThen ) { - - const mixer = this._mixer, now = mixer.time; - let interpolant = this._weightInterpolant; - - if ( interpolant === null ) { - - interpolant = mixer._lendControlInterpolant(); - this._weightInterpolant = interpolant; - - } - - const times = interpolant.parameterPositions, - values = interpolant.sampleValues; - - times[ 0 ] = now; - values[ 0 ] = weightNow; - times[ 1 ] = now + duration; - values[ 1 ] = weightThen; - - return this; - - } - -} - -class AnimationMixer extends EventDispatcher { - - constructor( root ) { - - super(); - - this._root = root; - this._initMemoryManager(); - this._accuIndex = 0; - this.time = 0; - this.timeScale = 1.0; - - } - - _bindAction( action, prototypeAction ) { - - const root = action._localRoot || this._root, - tracks = action._clip.tracks, - nTracks = tracks.length, - bindings = action._propertyBindings, - interpolants = action._interpolants, - rootUuid = root.uuid, - bindingsByRoot = this._bindingsByRootAndName; - - let bindingsByName = bindingsByRoot[ rootUuid ]; - - if ( bindingsByName === undefined ) { - - bindingsByName = {}; - bindingsByRoot[ rootUuid ] = bindingsByName; - - } - - for ( let i = 0; i !== nTracks; ++ i ) { - - const track = tracks[ i ], - trackName = track.name; - - let binding = bindingsByName[ trackName ]; - - if ( binding !== undefined ) { - - bindings[ i ] = binding; - - } else { - - binding = bindings[ i ]; - - if ( binding !== undefined ) { - - // existing binding, make sure the cache knows - - if ( binding._cacheIndex === null ) { - - ++ binding.referenceCount; - this._addInactiveBinding( binding, rootUuid, trackName ); - - } - - continue; - - } - - const path = prototypeAction && prototypeAction. - _propertyBindings[ i ].binding.parsedPath; - - binding = new PropertyMixer( - PropertyBinding.create( root, trackName, path ), - track.ValueTypeName, track.getValueSize() ); - - ++ binding.referenceCount; - this._addInactiveBinding( binding, rootUuid, trackName ); - - bindings[ i ] = binding; - - } - - interpolants[ i ].resultBuffer = binding.buffer; - - } - - } - - _activateAction( action ) { - - if ( ! this._isActiveAction( action ) ) { - - if ( action._cacheIndex === null ) { - - // this action has been forgotten by the cache, but the user - // appears to be still using it -> rebind - - const rootUuid = ( action._localRoot || this._root ).uuid, - clipUuid = action._clip.uuid, - actionsForClip = this._actionsByClip[ clipUuid ]; - - this._bindAction( action, - actionsForClip && actionsForClip.knownActions[ 0 ] ); - - this._addInactiveAction( action, clipUuid, rootUuid ); - - } - - const bindings = action._propertyBindings; - - // increment reference counts / sort out state - for ( let i = 0, n = bindings.length; i !== n; ++ i ) { - - const binding = bindings[ i ]; - - if ( binding.useCount ++ === 0 ) { - - this._lendBinding( binding ); - binding.saveOriginalState(); - - } - - } - - this._lendAction( action ); - - } - - } - - _deactivateAction( action ) { - - if ( this._isActiveAction( action ) ) { - - const bindings = action._propertyBindings; - - // decrement reference counts / sort out state - for ( let i = 0, n = bindings.length; i !== n; ++ i ) { - - const binding = bindings[ i ]; - - if ( -- binding.useCount === 0 ) { - - binding.restoreOriginalState(); - this._takeBackBinding( binding ); - - } - - } - - this._takeBackAction( action ); - - } - - } - - // Memory manager - - _initMemoryManager() { - - this._actions = []; // 'nActiveActions' followed by inactive ones - this._nActiveActions = 0; - - this._actionsByClip = {}; - // inside: - // { - // knownActions: Array< AnimationAction > - used as prototypes - // actionByRoot: AnimationAction - lookup - // } - - - this._bindings = []; // 'nActiveBindings' followed by inactive ones - this._nActiveBindings = 0; - - this._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer > - - - this._controlInterpolants = []; // same game as above - this._nActiveControlInterpolants = 0; - - const scope = this; - - this.stats = { - - actions: { - get total() { - - return scope._actions.length; - - }, - get inUse() { - - return scope._nActiveActions; - - } - }, - bindings: { - get total() { - - return scope._bindings.length; - - }, - get inUse() { - - return scope._nActiveBindings; - - } - }, - controlInterpolants: { - get total() { - - return scope._controlInterpolants.length; - - }, - get inUse() { - - return scope._nActiveControlInterpolants; - - } - } - - }; - - } - - // Memory management for AnimationAction objects - - _isActiveAction( action ) { - - const index = action._cacheIndex; - return index !== null && index < this._nActiveActions; - - } - - _addInactiveAction( action, clipUuid, rootUuid ) { - - const actions = this._actions, - actionsByClip = this._actionsByClip; - - let actionsForClip = actionsByClip[ clipUuid ]; - - if ( actionsForClip === undefined ) { - - actionsForClip = { - - knownActions: [ action ], - actionByRoot: {} - - }; - - action._byClipCacheIndex = 0; - - actionsByClip[ clipUuid ] = actionsForClip; - - } else { - - const knownActions = actionsForClip.knownActions; - - action._byClipCacheIndex = knownActions.length; - knownActions.push( action ); - - } - - action._cacheIndex = actions.length; - actions.push( action ); - - actionsForClip.actionByRoot[ rootUuid ] = action; - - } - - _removeInactiveAction( action ) { - - const actions = this._actions, - lastInactiveAction = actions[ actions.length - 1 ], - cacheIndex = action._cacheIndex; - - lastInactiveAction._cacheIndex = cacheIndex; - actions[ cacheIndex ] = lastInactiveAction; - actions.pop(); - - action._cacheIndex = null; - - - const clipUuid = action._clip.uuid, - actionsByClip = this._actionsByClip, - actionsForClip = actionsByClip[ clipUuid ], - knownActionsForClip = actionsForClip.knownActions, - - lastKnownAction = - knownActionsForClip[ knownActionsForClip.length - 1 ], - - byClipCacheIndex = action._byClipCacheIndex; - - lastKnownAction._byClipCacheIndex = byClipCacheIndex; - knownActionsForClip[ byClipCacheIndex ] = lastKnownAction; - knownActionsForClip.pop(); - - action._byClipCacheIndex = null; - - - const actionByRoot = actionsForClip.actionByRoot, - rootUuid = ( action._localRoot || this._root ).uuid; - - delete actionByRoot[ rootUuid ]; - - if ( knownActionsForClip.length === 0 ) { - - delete actionsByClip[ clipUuid ]; - - } - - this._removeInactiveBindingsForAction( action ); - - } - - _removeInactiveBindingsForAction( action ) { - - const bindings = action._propertyBindings; - - for ( let i = 0, n = bindings.length; i !== n; ++ i ) { - - const binding = bindings[ i ]; - - if ( -- binding.referenceCount === 0 ) { - - this._removeInactiveBinding( binding ); - - } - - } - - } - - _lendAction( action ) { - - // [ active actions | inactive actions ] - // [ active actions >| inactive actions ] - // s a - // <-swap-> - // a s - - const actions = this._actions, - prevIndex = action._cacheIndex, - - lastActiveIndex = this._nActiveActions ++, - - firstInactiveAction = actions[ lastActiveIndex ]; - - action._cacheIndex = lastActiveIndex; - actions[ lastActiveIndex ] = action; - - firstInactiveAction._cacheIndex = prevIndex; - actions[ prevIndex ] = firstInactiveAction; - - } - - _takeBackAction( action ) { - - // [ active actions | inactive actions ] - // [ active actions |< inactive actions ] - // a s - // <-swap-> - // s a - - const actions = this._actions, - prevIndex = action._cacheIndex, - - firstInactiveIndex = -- this._nActiveActions, - - lastActiveAction = actions[ firstInactiveIndex ]; - - action._cacheIndex = firstInactiveIndex; - actions[ firstInactiveIndex ] = action; - - lastActiveAction._cacheIndex = prevIndex; - actions[ prevIndex ] = lastActiveAction; - - } - - // Memory management for PropertyMixer objects - - _addInactiveBinding( binding, rootUuid, trackName ) { - - const bindingsByRoot = this._bindingsByRootAndName, - bindings = this._bindings; - - let bindingByName = bindingsByRoot[ rootUuid ]; - - if ( bindingByName === undefined ) { - - bindingByName = {}; - bindingsByRoot[ rootUuid ] = bindingByName; - - } - - bindingByName[ trackName ] = binding; - - binding._cacheIndex = bindings.length; - bindings.push( binding ); - - } - - _removeInactiveBinding( binding ) { - - const bindings = this._bindings, - propBinding = binding.binding, - rootUuid = propBinding.rootNode.uuid, - trackName = propBinding.path, - bindingsByRoot = this._bindingsByRootAndName, - bindingByName = bindingsByRoot[ rootUuid ], - - lastInactiveBinding = bindings[ bindings.length - 1 ], - cacheIndex = binding._cacheIndex; - - lastInactiveBinding._cacheIndex = cacheIndex; - bindings[ cacheIndex ] = lastInactiveBinding; - bindings.pop(); - - delete bindingByName[ trackName ]; - - if ( Object.keys( bindingByName ).length === 0 ) { - - delete bindingsByRoot[ rootUuid ]; - - } - - } - - _lendBinding( binding ) { - - const bindings = this._bindings, - prevIndex = binding._cacheIndex, - - lastActiveIndex = this._nActiveBindings ++, - - firstInactiveBinding = bindings[ lastActiveIndex ]; - - binding._cacheIndex = lastActiveIndex; - bindings[ lastActiveIndex ] = binding; - - firstInactiveBinding._cacheIndex = prevIndex; - bindings[ prevIndex ] = firstInactiveBinding; - - } - - _takeBackBinding( binding ) { - - const bindings = this._bindings, - prevIndex = binding._cacheIndex, - - firstInactiveIndex = -- this._nActiveBindings, - - lastActiveBinding = bindings[ firstInactiveIndex ]; - - binding._cacheIndex = firstInactiveIndex; - bindings[ firstInactiveIndex ] = binding; - - lastActiveBinding._cacheIndex = prevIndex; - bindings[ prevIndex ] = lastActiveBinding; - - } - - - // Memory management of Interpolants for weight and time scale - - _lendControlInterpolant() { - - const interpolants = this._controlInterpolants, - lastActiveIndex = this._nActiveControlInterpolants ++; - - let interpolant = interpolants[ lastActiveIndex ]; - - if ( interpolant === undefined ) { - - interpolant = new LinearInterpolant( - new Float32Array( 2 ), new Float32Array( 2 ), - 1, this._controlInterpolantsResultBuffer ); - - interpolant.__cacheIndex = lastActiveIndex; - interpolants[ lastActiveIndex ] = interpolant; - - } - - return interpolant; - - } - - _takeBackControlInterpolant( interpolant ) { - - const interpolants = this._controlInterpolants, - prevIndex = interpolant.__cacheIndex, - - firstInactiveIndex = -- this._nActiveControlInterpolants, - - lastActiveInterpolant = interpolants[ firstInactiveIndex ]; - - interpolant.__cacheIndex = firstInactiveIndex; - interpolants[ firstInactiveIndex ] = interpolant; - - lastActiveInterpolant.__cacheIndex = prevIndex; - interpolants[ prevIndex ] = lastActiveInterpolant; - - } - - // return an action for a clip optionally using a custom root target - // object (this method allocates a lot of dynamic memory in case a - // previously unknown clip/root combination is specified) - clipAction( clip, optionalRoot, blendMode ) { - - const root = optionalRoot || this._root, - rootUuid = root.uuid; - - let clipObject = typeof clip === 'string' ? AnimationClip.findByName( root, clip ) : clip; - - const clipUuid = clipObject !== null ? clipObject.uuid : clip; - - const actionsForClip = this._actionsByClip[ clipUuid ]; - let prototypeAction = null; - - if ( blendMode === undefined ) { - - if ( clipObject !== null ) { - - blendMode = clipObject.blendMode; - - } else { - - blendMode = NormalAnimationBlendMode; - - } - - } - - if ( actionsForClip !== undefined ) { - - const existingAction = actionsForClip.actionByRoot[ rootUuid ]; - - if ( existingAction !== undefined && existingAction.blendMode === blendMode ) { - - return existingAction; - - } - - // we know the clip, so we don't have to parse all - // the bindings again but can just copy - prototypeAction = actionsForClip.knownActions[ 0 ]; - - // also, take the clip from the prototype action - if ( clipObject === null ) - clipObject = prototypeAction._clip; - - } - - // clip must be known when specified via string - if ( clipObject === null ) return null; - - // allocate all resources required to run it - const newAction = new AnimationAction( this, clipObject, optionalRoot, blendMode ); - - this._bindAction( newAction, prototypeAction ); - - // and make the action known to the memory manager - this._addInactiveAction( newAction, clipUuid, rootUuid ); - - return newAction; - - } - - // get an existing action - existingAction( clip, optionalRoot ) { - - const root = optionalRoot || this._root, - rootUuid = root.uuid, - - clipObject = typeof clip === 'string' ? - AnimationClip.findByName( root, clip ) : clip, - - clipUuid = clipObject ? clipObject.uuid : clip, - - actionsForClip = this._actionsByClip[ clipUuid ]; - - if ( actionsForClip !== undefined ) { - - return actionsForClip.actionByRoot[ rootUuid ] || null; - - } - - return null; - - } - - // deactivates all previously scheduled actions - stopAllAction() { - - const actions = this._actions, - nActions = this._nActiveActions; - - for ( let i = nActions - 1; i >= 0; -- i ) { - - actions[ i ].stop(); - - } - - return this; - - } - - // advance the time and update apply the animation - update( deltaTime ) { - - deltaTime *= this.timeScale; - - const actions = this._actions, - nActions = this._nActiveActions, - - time = this.time += deltaTime, - timeDirection = Math.sign( deltaTime ), - - accuIndex = this._accuIndex ^= 1; - - // run active actions - - for ( let i = 0; i !== nActions; ++ i ) { - - const action = actions[ i ]; - - action._update( time, deltaTime, timeDirection, accuIndex ); - - } - - // update scene graph - - const bindings = this._bindings, - nBindings = this._nActiveBindings; - - for ( let i = 0; i !== nBindings; ++ i ) { - - bindings[ i ].apply( accuIndex ); - - } - - return this; - - } - - // Allows you to seek to a specific time in an animation. - setTime( timeInSeconds ) { - - this.time = 0; // Zero out time attribute for AnimationMixer object; - for ( let i = 0; i < this._actions.length; i ++ ) { - - this._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects. - - } - - return this.update( timeInSeconds ); // Update used to set exact time. Returns "this" AnimationMixer object. - - } - - // return this mixer's root target object - getRoot() { - - return this._root; - - } - - // free all resources specific to a particular clip - uncacheClip( clip ) { - - const actions = this._actions, - clipUuid = clip.uuid, - actionsByClip = this._actionsByClip, - actionsForClip = actionsByClip[ clipUuid ]; - - if ( actionsForClip !== undefined ) { - - // note: just calling _removeInactiveAction would mess up the - // iteration state and also require updating the state we can - // just throw away - - const actionsToRemove = actionsForClip.knownActions; - - for ( let i = 0, n = actionsToRemove.length; i !== n; ++ i ) { - - const action = actionsToRemove[ i ]; - - this._deactivateAction( action ); - - const cacheIndex = action._cacheIndex, - lastInactiveAction = actions[ actions.length - 1 ]; - - action._cacheIndex = null; - action._byClipCacheIndex = null; - - lastInactiveAction._cacheIndex = cacheIndex; - actions[ cacheIndex ] = lastInactiveAction; - actions.pop(); - - this._removeInactiveBindingsForAction( action ); - - } - - delete actionsByClip[ clipUuid ]; - - } - - } - - // free all resources specific to a particular root target object - uncacheRoot( root ) { - - const rootUuid = root.uuid, - actionsByClip = this._actionsByClip; - - for ( const clipUuid in actionsByClip ) { - - const actionByRoot = actionsByClip[ clipUuid ].actionByRoot, - action = actionByRoot[ rootUuid ]; - - if ( action !== undefined ) { - - this._deactivateAction( action ); - this._removeInactiveAction( action ); - - } - - } - - const bindingsByRoot = this._bindingsByRootAndName, - bindingByName = bindingsByRoot[ rootUuid ]; - - if ( bindingByName !== undefined ) { - - for ( const trackName in bindingByName ) { - - const binding = bindingByName[ trackName ]; - binding.restoreOriginalState(); - this._removeInactiveBinding( binding ); - - } - - } - - } - - // remove a targeted clip from the cache - uncacheAction( clip, optionalRoot ) { - - const action = this.existingAction( clip, optionalRoot ); - - if ( action !== null ) { - - this._deactivateAction( action ); - this._removeInactiveAction( action ); - - } - - } - -} - -AnimationMixer.prototype._controlInterpolantsResultBuffer = new Float32Array( 1 ); - -class Uniform { - - constructor( value ) { - - if ( typeof value === 'string' ) { - - console.warn( 'THREE.Uniform: Type parameter is no longer needed.' ); - value = arguments[ 1 ]; - - } - - this.value = value; - - } - - clone() { - - return new Uniform( this.value.clone === undefined ? this.value : this.value.clone() ); - - } - -} - -class InstancedInterleavedBuffer extends InterleavedBuffer { - - constructor( array, stride, meshPerAttribute = 1 ) { - - super( array, stride ); - - this.meshPerAttribute = meshPerAttribute; - - } - - copy( source ) { - - super.copy( source ); - - this.meshPerAttribute = source.meshPerAttribute; - - return this; - - } - - clone( data ) { - - const ib = super.clone( data ); - - ib.meshPerAttribute = this.meshPerAttribute; - - return ib; - - } - - toJSON( data ) { - - const json = super.toJSON( data ); - - json.isInstancedInterleavedBuffer = true; - json.meshPerAttribute = this.meshPerAttribute; - - return json; - - } - -} - -InstancedInterleavedBuffer.prototype.isInstancedInterleavedBuffer = true; - -class GLBufferAttribute { - - constructor( buffer, type, itemSize, elementSize, count ) { - - this.buffer = buffer; - this.type = type; - this.itemSize = itemSize; - this.elementSize = elementSize; - this.count = count; - - this.version = 0; - - } - - set needsUpdate( value ) { - - if ( value === true ) this.version ++; - - } - - setBuffer( buffer ) { - - this.buffer = buffer; - - return this; - - } - - setType( type, elementSize ) { - - this.type = type; - this.elementSize = elementSize; - - return this; - - } - - setItemSize( itemSize ) { - - this.itemSize = itemSize; - - return this; - - } - - setCount( count ) { - - this.count = count; - - return this; - - } - -} - -GLBufferAttribute.prototype.isGLBufferAttribute = true; - -class Raycaster { - - constructor( origin, direction, near = 0, far = Infinity ) { - - this.ray = new Ray( origin, direction ); - // direction is assumed to be normalized (for accurate distance calculations) - - this.near = near; - this.far = far; - this.camera = null; - this.layers = new Layers(); - - this.params = { - Mesh: {}, - Line: { threshold: 1 }, - LOD: {}, - Points: { threshold: 1 }, - Sprite: {} - }; - - } - - set( origin, direction ) { - - // direction is assumed to be normalized (for accurate distance calculations) - - this.ray.set( origin, direction ); - - } - - setFromCamera( coords, camera ) { - - if ( camera && camera.isPerspectiveCamera ) { - - this.ray.origin.setFromMatrixPosition( camera.matrixWorld ); - this.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize(); - this.camera = camera; - - } else if ( camera && camera.isOrthographicCamera ) { - - this.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera - this.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld ); - this.camera = camera; - - } else { - - console.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type ); - - } - - } - - intersectObject( object, recursive = false, intersects = [] ) { - - intersectObject( object, this, intersects, recursive ); - - intersects.sort( ascSort ); - - return intersects; - - } - - intersectObjects( objects, recursive = false, intersects = [] ) { - - for ( let i = 0, l = objects.length; i < l; i ++ ) { - - intersectObject( objects[ i ], this, intersects, recursive ); - - } - - intersects.sort( ascSort ); - - return intersects; - - } - -} - -function ascSort( a, b ) { - - return a.distance - b.distance; - -} - -function intersectObject( object, raycaster, intersects, recursive ) { - - if ( object.layers.test( raycaster.layers ) ) { - - object.raycast( raycaster, intersects ); - - } - - if ( recursive === true ) { - - const children = object.children; - - for ( let i = 0, l = children.length; i < l; i ++ ) { - - intersectObject( children[ i ], raycaster, intersects, true ); - - } - - } - -} - -/** - * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system - * - * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up. - * The azimuthal angle (theta) is measured from the positive z-axis. - */ - -class Spherical { - - constructor( radius = 1, phi = 0, theta = 0 ) { - - this.radius = radius; - this.phi = phi; // polar angle - this.theta = theta; // azimuthal angle - - return this; - - } - - set( radius, phi, theta ) { - - this.radius = radius; - this.phi = phi; - this.theta = theta; - - return this; - - } - - copy( other ) { - - this.radius = other.radius; - this.phi = other.phi; - this.theta = other.theta; - - return this; - - } - - // restrict phi to be betwee EPS and PI-EPS - makeSafe() { - - const EPS = 0.000001; - this.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) ); - - return this; - - } - - setFromVector3( v ) { - - return this.setFromCartesianCoords( v.x, v.y, v.z ); - - } - - setFromCartesianCoords( x, y, z ) { - - this.radius = Math.sqrt( x * x + y * y + z * z ); - - if ( this.radius === 0 ) { - - this.theta = 0; - this.phi = 0; - - } else { - - this.theta = Math.atan2( x, z ); - this.phi = Math.acos( clamp( y / this.radius, - 1, 1 ) ); - - } - - return this; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - -} - -/** - * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system - */ - -class Cylindrical { - - constructor( radius = 1, theta = 0, y = 0 ) { - - this.radius = radius; // distance from the origin to a point in the x-z plane - this.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis - this.y = y; // height above the x-z plane - - return this; - - } - - set( radius, theta, y ) { - - this.radius = radius; - this.theta = theta; - this.y = y; - - return this; - - } - - copy( other ) { - - this.radius = other.radius; - this.theta = other.theta; - this.y = other.y; - - return this; - - } - - setFromVector3( v ) { - - return this.setFromCartesianCoords( v.x, v.y, v.z ); - - } - - setFromCartesianCoords( x, y, z ) { - - this.radius = Math.sqrt( x * x + z * z ); - this.theta = Math.atan2( x, z ); - this.y = y; - - return this; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - -} - -const _vector$4 = /*@__PURE__*/ new Vector2(); - -class Box2 { - - constructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) { - - this.min = min; - this.max = max; - - } - - set( min, max ) { - - this.min.copy( min ); - this.max.copy( max ); - - return this; - - } - - setFromPoints( points ) { - - this.makeEmpty(); - - for ( let i = 0, il = points.length; i < il; i ++ ) { - - this.expandByPoint( points[ i ] ); - - } - - return this; - - } - - setFromCenterAndSize( center, size ) { - - const halfSize = _vector$4.copy( size ).multiplyScalar( 0.5 ); - this.min.copy( center ).sub( halfSize ); - this.max.copy( center ).add( halfSize ); - - return this; - - } - - clone() { - - return new this.constructor().copy( this ); - - } - - copy( box ) { - - this.min.copy( box.min ); - this.max.copy( box.max ); - - return this; - - } - - makeEmpty() { - - this.min.x = this.min.y = + Infinity; - this.max.x = this.max.y = - Infinity; - - return this; - - } - - isEmpty() { - - // this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes - - return ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ); - - } - - getCenter( target ) { - - return this.isEmpty() ? target.set( 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 ); - - } - - getSize( target ) { - - return this.isEmpty() ? target.set( 0, 0 ) : target.subVectors( this.max, this.min ); - - } - - expandByPoint( point ) { - - this.min.min( point ); - this.max.max( point ); - - return this; - - } - - expandByVector( vector ) { - - this.min.sub( vector ); - this.max.add( vector ); - - return this; - - } - - expandByScalar( scalar ) { - - this.min.addScalar( - scalar ); - this.max.addScalar( scalar ); - - return this; - - } - - containsPoint( point ) { - - return point.x < this.min.x || point.x > this.max.x || - point.y < this.min.y || point.y > this.max.y ? false : true; - - } - - containsBox( box ) { - - return this.min.x <= box.min.x && box.max.x <= this.max.x && - this.min.y <= box.min.y && box.max.y <= this.max.y; - - } - - getParameter( point, target ) { - - // This can potentially have a divide by zero if the box - // has a size dimension of 0. - - return target.set( - ( point.x - this.min.x ) / ( this.max.x - this.min.x ), - ( point.y - this.min.y ) / ( this.max.y - this.min.y ) - ); - - } - - intersectsBox( box ) { - - // using 4 splitting planes to rule out intersections - - return box.max.x < this.min.x || box.min.x > this.max.x || - box.max.y < this.min.y || box.min.y > this.max.y ? false : true; - - } - - clampPoint( point, target ) { - - return target.copy( point ).clamp( this.min, this.max ); - - } - - distanceToPoint( point ) { - - const clampedPoint = _vector$4.copy( point ).clamp( this.min, this.max ); - return clampedPoint.sub( point ).length(); - - } - - intersect( box ) { - - this.min.max( box.min ); - this.max.min( box.max ); - - return this; - - } - - union( box ) { - - this.min.min( box.min ); - this.max.max( box.max ); - - return this; - - } - - translate( offset ) { - - this.min.add( offset ); - this.max.add( offset ); - - return this; - - } - - equals( box ) { - - return box.min.equals( this.min ) && box.max.equals( this.max ); - - } - -} - -Box2.prototype.isBox2 = true; - -const _startP = /*@__PURE__*/ new Vector3(); -const _startEnd = /*@__PURE__*/ new Vector3(); - -class Line3 { - - constructor( start = new Vector3(), end = new Vector3() ) { - - this.start = start; - this.end = end; - - } - - set( start, end ) { - - this.start.copy( start ); - this.end.copy( end ); - - return this; - - } - - copy( line ) { - - this.start.copy( line.start ); - this.end.copy( line.end ); - - return this; - - } - - getCenter( target ) { - - return target.addVectors( this.start, this.end ).multiplyScalar( 0.5 ); - - } - - delta( target ) { - - return target.subVectors( this.end, this.start ); - - } - - distanceSq() { - - return this.start.distanceToSquared( this.end ); - - } - - distance() { - - return this.start.distanceTo( this.end ); - - } - - at( t, target ) { - - return this.delta( target ).multiplyScalar( t ).add( this.start ); - - } - - closestPointToPointParameter( point, clampToLine ) { - - _startP.subVectors( point, this.start ); - _startEnd.subVectors( this.end, this.start ); - - const startEnd2 = _startEnd.dot( _startEnd ); - const startEnd_startP = _startEnd.dot( _startP ); - - let t = startEnd_startP / startEnd2; - - if ( clampToLine ) { - - t = clamp( t, 0, 1 ); - - } - - return t; - - } - - closestPointToPoint( point, clampToLine, target ) { - - const t = this.closestPointToPointParameter( point, clampToLine ); - - return this.delta( target ).multiplyScalar( t ).add( this.start ); - - } - - applyMatrix4( matrix ) { - - this.start.applyMatrix4( matrix ); - this.end.applyMatrix4( matrix ); - - return this; - - } - - equals( line ) { - - return line.start.equals( this.start ) && line.end.equals( this.end ); - - } - - clone() { - - return new this.constructor().copy( this ); - - } - -} - -class ImmediateRenderObject extends Object3D { - - constructor( material ) { - - super(); - - this.material = material; - this.render = function ( /* renderCallback */ ) {}; - - this.hasPositions = false; - this.hasNormals = false; - this.hasColors = false; - this.hasUvs = false; - - this.positionArray = null; - this.normalArray = null; - this.colorArray = null; - this.uvArray = null; - - this.count = 0; - - } - -} - -ImmediateRenderObject.prototype.isImmediateRenderObject = true; - -const _vector$3 = /*@__PURE__*/ new Vector3(); - -class SpotLightHelper extends Object3D { - - constructor( light, color ) { - - super(); - this.light = light; - this.light.updateMatrixWorld(); - - this.matrix = light.matrixWorld; - this.matrixAutoUpdate = false; - - this.color = color; - - const geometry = new BufferGeometry(); - - const positions = [ - 0, 0, 0, 0, 0, 1, - 0, 0, 0, 1, 0, 1, - 0, 0, 0, - 1, 0, 1, - 0, 0, 0, 0, 1, 1, - 0, 0, 0, 0, - 1, 1 - ]; - - for ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) { - - const p1 = ( i / l ) * Math.PI * 2; - const p2 = ( j / l ) * Math.PI * 2; - - positions.push( - Math.cos( p1 ), Math.sin( p1 ), 1, - Math.cos( p2 ), Math.sin( p2 ), 1 - ); - - } - - geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); - - const material = new LineBasicMaterial( { fog: false, toneMapped: false } ); - - this.cone = new LineSegments( geometry, material ); - this.add( this.cone ); - - this.update(); - - } - - dispose() { - - this.cone.geometry.dispose(); - this.cone.material.dispose(); - - } - - update() { - - this.light.updateMatrixWorld(); - - const coneLength = this.light.distance ? this.light.distance : 1000; - const coneWidth = coneLength * Math.tan( this.light.angle ); - - this.cone.scale.set( coneWidth, coneWidth, coneLength ); - - _vector$3.setFromMatrixPosition( this.light.target.matrixWorld ); - - this.cone.lookAt( _vector$3 ); - - if ( this.color !== undefined ) { - - this.cone.material.color.set( this.color ); - - } else { - - this.cone.material.color.copy( this.light.color ); - - } - - } - -} - -const _vector$2 = /*@__PURE__*/ new Vector3(); -const _boneMatrix = /*@__PURE__*/ new Matrix4(); -const _matrixWorldInv = /*@__PURE__*/ new Matrix4(); - - -class SkeletonHelper extends LineSegments { - - constructor( object ) { - - const bones = getBoneList( object ); - - const geometry = new BufferGeometry(); - - const vertices = []; - const colors = []; - - const color1 = new Color( 0, 0, 1 ); - const color2 = new Color( 0, 1, 0 ); - - for ( let i = 0; i < bones.length; i ++ ) { - - const bone = bones[ i ]; - - if ( bone.parent && bone.parent.isBone ) { - - vertices.push( 0, 0, 0 ); - vertices.push( 0, 0, 0 ); - colors.push( color1.r, color1.g, color1.b ); - colors.push( color2.r, color2.g, color2.b ); - - } - - } - - geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); - - const material = new LineBasicMaterial( { vertexColors: true, depthTest: false, depthWrite: false, toneMapped: false, transparent: true } ); - - super( geometry, material ); - - this.type = 'SkeletonHelper'; - this.isSkeletonHelper = true; - - this.root = object; - this.bones = bones; - - this.matrix = object.matrixWorld; - this.matrixAutoUpdate = false; - - } - - updateMatrixWorld( force ) { - - const bones = this.bones; - - const geometry = this.geometry; - const position = geometry.getAttribute( 'position' ); - - _matrixWorldInv.copy( this.root.matrixWorld ).invert(); - - for ( let i = 0, j = 0; i < bones.length; i ++ ) { - - const bone = bones[ i ]; - - if ( bone.parent && bone.parent.isBone ) { - - _boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld ); - _vector$2.setFromMatrixPosition( _boneMatrix ); - position.setXYZ( j, _vector$2.x, _vector$2.y, _vector$2.z ); - - _boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld ); - _vector$2.setFromMatrixPosition( _boneMatrix ); - position.setXYZ( j + 1, _vector$2.x, _vector$2.y, _vector$2.z ); - - j += 2; - - } - - } - - geometry.getAttribute( 'position' ).needsUpdate = true; - - super.updateMatrixWorld( force ); - - } - -} - - -function getBoneList( object ) { - - const boneList = []; - - if ( object && object.isBone ) { - - boneList.push( object ); - - } - - for ( let i = 0; i < object.children.length; i ++ ) { - - boneList.push.apply( boneList, getBoneList( object.children[ i ] ) ); - - } - - return boneList; - -} - -class PointLightHelper extends Mesh { - - constructor( light, sphereSize, color ) { - - const geometry = new SphereGeometry( sphereSize, 4, 2 ); - const material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } ); - - super( geometry, material ); - - this.light = light; - this.light.updateMatrixWorld(); - - this.color = color; - - this.type = 'PointLightHelper'; - - this.matrix = this.light.matrixWorld; - this.matrixAutoUpdate = false; - - this.update(); - - - /* - // TODO: delete this comment? - const distanceGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 ); - const distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } ); - - this.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial ); - this.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial ); - - const d = light.distance; - - if ( d === 0.0 ) { - - this.lightDistance.visible = false; - - } else { - - this.lightDistance.scale.set( d, d, d ); - - } - - this.add( this.lightDistance ); - */ - - } - - dispose() { - - this.geometry.dispose(); - this.material.dispose(); - - } - - update() { - - if ( this.color !== undefined ) { - - this.material.color.set( this.color ); - - } else { - - this.material.color.copy( this.light.color ); - - } - - /* - const d = this.light.distance; - - if ( d === 0.0 ) { - - this.lightDistance.visible = false; - - } else { - - this.lightDistance.visible = true; - this.lightDistance.scale.set( d, d, d ); - - } - */ - - } - -} - -const _vector$1 = /*@__PURE__*/ new Vector3(); -const _color1 = /*@__PURE__*/ new Color(); -const _color2 = /*@__PURE__*/ new Color(); - -class HemisphereLightHelper extends Object3D { - - constructor( light, size, color ) { - - super(); - this.light = light; - this.light.updateMatrixWorld(); - - this.matrix = light.matrixWorld; - this.matrixAutoUpdate = false; - - this.color = color; - - const geometry = new OctahedronGeometry( size ); - geometry.rotateY( Math.PI * 0.5 ); - - this.material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } ); - if ( this.color === undefined ) this.material.vertexColors = true; - - const position = geometry.getAttribute( 'position' ); - const colors = new Float32Array( position.count * 3 ); - - geometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) ); - - this.add( new Mesh( geometry, this.material ) ); - - this.update(); - - } - - dispose() { - - this.children[ 0 ].geometry.dispose(); - this.children[ 0 ].material.dispose(); - - } - - update() { - - const mesh = this.children[ 0 ]; - - if ( this.color !== undefined ) { - - this.material.color.set( this.color ); - - } else { - - const colors = mesh.geometry.getAttribute( 'color' ); - - _color1.copy( this.light.color ); - _color2.copy( this.light.groundColor ); - - for ( let i = 0, l = colors.count; i < l; i ++ ) { - - const color = ( i < ( l / 2 ) ) ? _color1 : _color2; - - colors.setXYZ( i, color.r, color.g, color.b ); - - } - - colors.needsUpdate = true; - - } - - mesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() ); - - } - -} - -class GridHelper extends LineSegments { - - constructor( size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888 ) { - - color1 = new Color( color1 ); - color2 = new Color( color2 ); - - const center = divisions / 2; - const step = size / divisions; - const halfSize = size / 2; - - const vertices = [], colors = []; - - for ( let i = 0, j = 0, k = - halfSize; i <= divisions; i ++, k += step ) { - - vertices.push( - halfSize, 0, k, halfSize, 0, k ); - vertices.push( k, 0, - halfSize, k, 0, halfSize ); - - const color = i === center ? color1 : color2; - - color.toArray( colors, j ); j += 3; - color.toArray( colors, j ); j += 3; - color.toArray( colors, j ); j += 3; - color.toArray( colors, j ); j += 3; - - } - - const geometry = new BufferGeometry(); - geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); - - const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); - - super( geometry, material ); - - this.type = 'GridHelper'; - - } - -} - -class PolarGridHelper extends LineSegments { - - constructor( radius = 10, radials = 16, circles = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888 ) { - - color1 = new Color( color1 ); - color2 = new Color( color2 ); - - const vertices = []; - const colors = []; - - // create the radials - - for ( let i = 0; i <= radials; i ++ ) { - - const v = ( i / radials ) * ( Math.PI * 2 ); - - const x = Math.sin( v ) * radius; - const z = Math.cos( v ) * radius; - - vertices.push( 0, 0, 0 ); - vertices.push( x, 0, z ); - - const color = ( i & 1 ) ? color1 : color2; - - colors.push( color.r, color.g, color.b ); - colors.push( color.r, color.g, color.b ); - - } - - // create the circles - - for ( let i = 0; i <= circles; i ++ ) { - - const color = ( i & 1 ) ? color1 : color2; - - const r = radius - ( radius / circles * i ); - - for ( let j = 0; j < divisions; j ++ ) { - - // first vertex - - let v = ( j / divisions ) * ( Math.PI * 2 ); - - let x = Math.sin( v ) * r; - let z = Math.cos( v ) * r; - - vertices.push( x, 0, z ); - colors.push( color.r, color.g, color.b ); - - // second vertex - - v = ( ( j + 1 ) / divisions ) * ( Math.PI * 2 ); - - x = Math.sin( v ) * r; - z = Math.cos( v ) * r; - - vertices.push( x, 0, z ); - colors.push( color.r, color.g, color.b ); - - } - - } - - const geometry = new BufferGeometry(); - geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); - - const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); - - super( geometry, material ); - - this.type = 'PolarGridHelper'; - - } - -} - -const _v1 = /*@__PURE__*/ new Vector3(); -const _v2 = /*@__PURE__*/ new Vector3(); -const _v3 = /*@__PURE__*/ new Vector3(); - -class DirectionalLightHelper extends Object3D { - - constructor( light, size, color ) { - - super(); - this.light = light; - this.light.updateMatrixWorld(); - - this.matrix = light.matrixWorld; - this.matrixAutoUpdate = false; - - this.color = color; - - if ( size === undefined ) size = 1; - - let geometry = new BufferGeometry(); - geometry.setAttribute( 'position', new Float32BufferAttribute( [ - - size, size, 0, - size, size, 0, - size, - size, 0, - - size, - size, 0, - - size, size, 0 - ], 3 ) ); - - const material = new LineBasicMaterial( { fog: false, toneMapped: false } ); - - this.lightPlane = new Line( geometry, material ); - this.add( this.lightPlane ); - - geometry = new BufferGeometry(); - geometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 0, 1 ], 3 ) ); - - this.targetLine = new Line( geometry, material ); - this.add( this.targetLine ); - - this.update(); - - } - - dispose() { - - this.lightPlane.geometry.dispose(); - this.lightPlane.material.dispose(); - this.targetLine.geometry.dispose(); - this.targetLine.material.dispose(); - - } - - update() { - - _v1.setFromMatrixPosition( this.light.matrixWorld ); - _v2.setFromMatrixPosition( this.light.target.matrixWorld ); - _v3.subVectors( _v2, _v1 ); - - this.lightPlane.lookAt( _v2 ); - - if ( this.color !== undefined ) { - - this.lightPlane.material.color.set( this.color ); - this.targetLine.material.color.set( this.color ); - - } else { - - this.lightPlane.material.color.copy( this.light.color ); - this.targetLine.material.color.copy( this.light.color ); - - } - - this.targetLine.lookAt( _v2 ); - this.targetLine.scale.z = _v3.length(); - - } - -} - -const _vector = /*@__PURE__*/ new Vector3(); -const _camera = /*@__PURE__*/ new Camera(); - -/** - * - shows frustum, line of sight and up of the camera - * - suitable for fast updates - * - based on frustum visualization in lightgl.js shadowmap example - * http://evanw.github.com/lightgl.js/tests/shadowmap.html - */ - -class CameraHelper extends LineSegments { - - constructor( camera ) { - - const geometry = new BufferGeometry(); - const material = new LineBasicMaterial( { color: 0xffffff, vertexColors: true, toneMapped: false } ); - - const vertices = []; - const colors = []; - - const pointMap = {}; - - // colors - - const colorFrustum = new Color( 0xffaa00 ); - const colorCone = new Color( 0xff0000 ); - const colorUp = new Color( 0x00aaff ); - const colorTarget = new Color( 0xffffff ); - const colorCross = new Color( 0x333333 ); - - // near - - addLine( 'n1', 'n2', colorFrustum ); - addLine( 'n2', 'n4', colorFrustum ); - addLine( 'n4', 'n3', colorFrustum ); - addLine( 'n3', 'n1', colorFrustum ); - - // far - - addLine( 'f1', 'f2', colorFrustum ); - addLine( 'f2', 'f4', colorFrustum ); - addLine( 'f4', 'f3', colorFrustum ); - addLine( 'f3', 'f1', colorFrustum ); - - // sides - - addLine( 'n1', 'f1', colorFrustum ); - addLine( 'n2', 'f2', colorFrustum ); - addLine( 'n3', 'f3', colorFrustum ); - addLine( 'n4', 'f4', colorFrustum ); - - // cone - - addLine( 'p', 'n1', colorCone ); - addLine( 'p', 'n2', colorCone ); - addLine( 'p', 'n3', colorCone ); - addLine( 'p', 'n4', colorCone ); - - // up - - addLine( 'u1', 'u2', colorUp ); - addLine( 'u2', 'u3', colorUp ); - addLine( 'u3', 'u1', colorUp ); - - // target - - addLine( 'c', 't', colorTarget ); - addLine( 'p', 'c', colorCross ); - - // cross - - addLine( 'cn1', 'cn2', colorCross ); - addLine( 'cn3', 'cn4', colorCross ); - - addLine( 'cf1', 'cf2', colorCross ); - addLine( 'cf3', 'cf4', colorCross ); - - function addLine( a, b, color ) { - - addPoint( a, color ); - addPoint( b, color ); - - } - - function addPoint( id, color ) { - - vertices.push( 0, 0, 0 ); - colors.push( color.r, color.g, color.b ); - - if ( pointMap[ id ] === undefined ) { - - pointMap[ id ] = []; - - } - - pointMap[ id ].push( ( vertices.length / 3 ) - 1 ); - - } - - geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); - - super( geometry, material ); - - this.type = 'CameraHelper'; - - this.camera = camera; - if ( this.camera.updateProjectionMatrix ) this.camera.updateProjectionMatrix(); - - this.matrix = camera.matrixWorld; - this.matrixAutoUpdate = false; - - this.pointMap = pointMap; - - this.update(); - - } - - update() { - - const geometry = this.geometry; - const pointMap = this.pointMap; - - const w = 1, h = 1; - - // we need just camera projection matrix inverse - // world matrix must be identity - - _camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse ); - - // center / target - - setPoint( 'c', pointMap, geometry, _camera, 0, 0, - 1 ); - setPoint( 't', pointMap, geometry, _camera, 0, 0, 1 ); - - // near - - setPoint( 'n1', pointMap, geometry, _camera, - w, - h, - 1 ); - setPoint( 'n2', pointMap, geometry, _camera, w, - h, - 1 ); - setPoint( 'n3', pointMap, geometry, _camera, - w, h, - 1 ); - setPoint( 'n4', pointMap, geometry, _camera, w, h, - 1 ); - - // far - - setPoint( 'f1', pointMap, geometry, _camera, - w, - h, 1 ); - setPoint( 'f2', pointMap, geometry, _camera, w, - h, 1 ); - setPoint( 'f3', pointMap, geometry, _camera, - w, h, 1 ); - setPoint( 'f4', pointMap, geometry, _camera, w, h, 1 ); - - // up - - setPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, - 1 ); - setPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, - 1 ); - setPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, - 1 ); - - // cross - - setPoint( 'cf1', pointMap, geometry, _camera, - w, 0, 1 ); - setPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 ); - setPoint( 'cf3', pointMap, geometry, _camera, 0, - h, 1 ); - setPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 ); - - setPoint( 'cn1', pointMap, geometry, _camera, - w, 0, - 1 ); - setPoint( 'cn2', pointMap, geometry, _camera, w, 0, - 1 ); - setPoint( 'cn3', pointMap, geometry, _camera, 0, - h, - 1 ); - setPoint( 'cn4', pointMap, geometry, _camera, 0, h, - 1 ); - - geometry.getAttribute( 'position' ).needsUpdate = true; - - } - - dispose() { - - this.geometry.dispose(); - this.material.dispose(); - - } - -} - - -function setPoint( point, pointMap, geometry, camera, x, y, z ) { - - _vector.set( x, y, z ).unproject( camera ); - - const points = pointMap[ point ]; - - if ( points !== undefined ) { - - const position = geometry.getAttribute( 'position' ); - - for ( let i = 0, l = points.length; i < l; i ++ ) { - - position.setXYZ( points[ i ], _vector.x, _vector.y, _vector.z ); - - } - - } - -} - -const _box = /*@__PURE__*/ new Box3(); - -class BoxHelper extends LineSegments { - - constructor( object, color = 0xffff00 ) { - - const indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] ); - const positions = new Float32Array( 8 * 3 ); - - const geometry = new BufferGeometry(); - geometry.setIndex( new BufferAttribute( indices, 1 ) ); - geometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) ); - - super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); - - this.object = object; - this.type = 'BoxHelper'; - - this.matrixAutoUpdate = false; - - this.update(); - - } - - update( object ) { - - if ( object !== undefined ) { - - console.warn( 'THREE.BoxHelper: .update() has no longer arguments.' ); - - } - - if ( this.object !== undefined ) { - - _box.setFromObject( this.object ); - - } - - if ( _box.isEmpty() ) return; - - const min = _box.min; - const max = _box.max; - - /* - 5____4 - 1/___0/| - | 6__|_7 - 2/___3/ - - 0: max.x, max.y, max.z - 1: min.x, max.y, max.z - 2: min.x, min.y, max.z - 3: max.x, min.y, max.z - 4: max.x, max.y, min.z - 5: min.x, max.y, min.z - 6: min.x, min.y, min.z - 7: max.x, min.y, min.z - */ - - const position = this.geometry.attributes.position; - const array = position.array; - - array[ 0 ] = max.x; array[ 1 ] = max.y; array[ 2 ] = max.z; - array[ 3 ] = min.x; array[ 4 ] = max.y; array[ 5 ] = max.z; - array[ 6 ] = min.x; array[ 7 ] = min.y; array[ 8 ] = max.z; - array[ 9 ] = max.x; array[ 10 ] = min.y; array[ 11 ] = max.z; - array[ 12 ] = max.x; array[ 13 ] = max.y; array[ 14 ] = min.z; - array[ 15 ] = min.x; array[ 16 ] = max.y; array[ 17 ] = min.z; - array[ 18 ] = min.x; array[ 19 ] = min.y; array[ 20 ] = min.z; - array[ 21 ] = max.x; array[ 22 ] = min.y; array[ 23 ] = min.z; - - position.needsUpdate = true; - - this.geometry.computeBoundingSphere(); - - - } - - setFromObject( object ) { - - this.object = object; - this.update(); - - return this; - - } - - copy( source ) { - - LineSegments.prototype.copy.call( this, source ); - - this.object = source.object; - - return this; - - } - -} - -class Box3Helper extends LineSegments { - - constructor( box, color = 0xffff00 ) { - - const indices = new Uint16Array( [ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7 ] ); - - const positions = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 1, - 1, 1, - 1, - 1 ]; - - const geometry = new BufferGeometry(); - - geometry.setIndex( new BufferAttribute( indices, 1 ) ); - - geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); - - super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); - - this.box = box; - - this.type = 'Box3Helper'; - - this.geometry.computeBoundingSphere(); - - } - - updateMatrixWorld( force ) { - - const box = this.box; - - if ( box.isEmpty() ) return; - - box.getCenter( this.position ); - - box.getSize( this.scale ); - - this.scale.multiplyScalar( 0.5 ); - - super.updateMatrixWorld( force ); - - } - -} - -class PlaneHelper extends Line { - - constructor( plane, size = 1, hex = 0xffff00 ) { - - const color = hex; - - const positions = [ 1, - 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0 ]; - - const geometry = new BufferGeometry(); - geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) ); - geometry.computeBoundingSphere(); - - super( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); - - this.type = 'PlaneHelper'; - - this.plane = plane; - - this.size = size; - - const positions2 = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, - 1, 1, 1, - 1, 1 ]; - - const geometry2 = new BufferGeometry(); - geometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) ); - geometry2.computeBoundingSphere(); - - this.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false, toneMapped: false } ) ) ); - - } - - updateMatrixWorld( force ) { - - let scale = - this.plane.constant; - - if ( Math.abs( scale ) < 1e-8 ) scale = 1e-8; // sign does not matter - - this.scale.set( 0.5 * this.size, 0.5 * this.size, scale ); - - this.children[ 0 ].material.side = ( scale < 0 ) ? BackSide : FrontSide; // renderer flips side when determinant < 0; flipping not wanted here - - this.lookAt( this.plane.normal ); - - super.updateMatrixWorld( force ); - - } - -} - -const _axis = /*@__PURE__*/ new Vector3(); -let _lineGeometry, _coneGeometry; - -class ArrowHelper extends Object3D { - - // dir is assumed to be normalized - - constructor( dir = new Vector3( 0, 0, 1 ), origin = new Vector3( 0, 0, 0 ), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2 ) { - - super(); - - this.type = 'ArrowHelper'; - - if ( _lineGeometry === undefined ) { - - _lineGeometry = new BufferGeometry(); - _lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) ); - - _coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 ); - _coneGeometry.translate( 0, - 0.5, 0 ); - - } - - this.position.copy( origin ); - - this.line = new Line( _lineGeometry, new LineBasicMaterial( { color: color, toneMapped: false } ) ); - this.line.matrixAutoUpdate = false; - this.add( this.line ); - - this.cone = new Mesh( _coneGeometry, new MeshBasicMaterial( { color: color, toneMapped: false } ) ); - this.cone.matrixAutoUpdate = false; - this.add( this.cone ); - - this.setDirection( dir ); - this.setLength( length, headLength, headWidth ); - - } - - setDirection( dir ) { - - // dir is assumed to be normalized - - if ( dir.y > 0.99999 ) { - - this.quaternion.set( 0, 0, 0, 1 ); - - } else if ( dir.y < - 0.99999 ) { - - this.quaternion.set( 1, 0, 0, 0 ); - - } else { - - _axis.set( dir.z, 0, - dir.x ).normalize(); - - const radians = Math.acos( dir.y ); - - this.quaternion.setFromAxisAngle( _axis, radians ); - - } - - } - - setLength( length, headLength = length * 0.2, headWidth = headLength * 0.2 ) { - - this.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // see #17458 - this.line.updateMatrix(); - - this.cone.scale.set( headWidth, headLength, headWidth ); - this.cone.position.y = length; - this.cone.updateMatrix(); - - } - - setColor( color ) { - - this.line.material.color.set( color ); - this.cone.material.color.set( color ); - - } - - copy( source ) { - - super.copy( source, false ); - - this.line.copy( source.line ); - this.cone.copy( source.cone ); - - return this; - - } - -} - -class AxesHelper extends LineSegments { - - constructor( size = 1 ) { - - const vertices = [ - 0, 0, 0, size, 0, 0, - 0, 0, 0, 0, size, 0, - 0, 0, 0, 0, 0, size - ]; - - const colors = [ - 1, 0, 0, 1, 0.6, 0, - 0, 1, 0, 0.6, 1, 0, - 0, 0, 1, 0, 0.6, 1 - ]; - - const geometry = new BufferGeometry(); - geometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) ); - geometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) ); - - const material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } ); - - super( geometry, material ); - - this.type = 'AxesHelper'; - - } - - setColors( xAxisColor, yAxisColor, zAxisColor ) { - - const color = new Color(); - const array = this.geometry.attributes.color.array; - - color.set( xAxisColor ); - color.toArray( array, 0 ); - color.toArray( array, 3 ); - - color.set( yAxisColor ); - color.toArray( array, 6 ); - color.toArray( array, 9 ); - - color.set( zAxisColor ); - color.toArray( array, 12 ); - color.toArray( array, 15 ); - - this.geometry.attributes.color.needsUpdate = true; - - return this; - - } - - dispose() { - - this.geometry.dispose(); - this.material.dispose(); - - } - -} - -const _floatView = new Float32Array( 1 ); -const _int32View = new Int32Array( _floatView.buffer ); - -class DataUtils { - - // Converts float32 to float16 (stored as uint16 value). - - static toHalfFloat( val ) { - - // Source: http://gamedev.stackexchange.com/questions/17326/conversion-of-a-number-from-single-precision-floating-point-representation-to-a/17410#17410 - - /* This method is faster than the OpenEXR implementation (very often - * used, eg. in Ogre), with the additional benefit of rounding, inspired - * by James Tursa?s half-precision code. */ - - _floatView[ 0 ] = val; - const x = _int32View[ 0 ]; - - let bits = ( x >> 16 ) & 0x8000; /* Get the sign */ - let m = ( x >> 12 ) & 0x07ff; /* Keep one extra bit for rounding */ - const e = ( x >> 23 ) & 0xff; /* Using int is faster here */ - - /* If zero, or denormal, or exponent underflows too much for a denormal - * half, return signed zero. */ - if ( e < 103 ) return bits; - - /* If NaN, return NaN. If Inf or exponent overflow, return Inf. */ - if ( e > 142 ) { - - bits |= 0x7c00; - /* If exponent was 0xff and one mantissa bit was set, it means NaN, - * not Inf, so make sure we set one mantissa bit too. */ - bits |= ( ( e == 255 ) ? 0 : 1 ) && ( x & 0x007fffff ); - return bits; - - } - - /* If exponent underflows but not too much, return a denormal */ - if ( e < 113 ) { - - m |= 0x0800; - /* Extra rounding may overflow and set mantissa to 0 and exponent - * to 1, which is OK. */ - bits |= ( m >> ( 114 - e ) ) + ( ( m >> ( 113 - e ) ) & 1 ); - return bits; - - } - - bits |= ( ( e - 112 ) << 10 ) | ( m >> 1 ); - /* Extra rounding. An overflow will set mantissa to 0 and increment - * the exponent, which is OK. */ - bits += m & 1; - return bits; - - } - -} - -const LOD_MIN = 4; -const LOD_MAX = 8; -const SIZE_MAX = Math.pow( 2, LOD_MAX ); - -// The standard deviations (radians) associated with the extra mips. These are -// chosen to approximate a Trowbridge-Reitz distribution function times the -// geometric shadowing function. These sigma values squared must match the -// variance #defines in cube_uv_reflection_fragment.glsl.js. -const EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ]; - -const TOTAL_LODS = LOD_MAX - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length; - -// The maximum length of the blur for loop. Smaller sigmas will use fewer -// samples and exit early, but not recompile the shader. -const MAX_SAMPLES = 20; - -const ENCODINGS = { - [ LinearEncoding ]: 0, - [ sRGBEncoding ]: 1, - [ RGBEEncoding ]: 2, - [ RGBM7Encoding ]: 3, - [ RGBM16Encoding ]: 4, - [ RGBDEncoding ]: 5, - [ GammaEncoding ]: 6 -}; - -const backgroundMaterial = new MeshBasicMaterial( { - side: BackSide, - depthWrite: false, - depthTest: false, -} ); -const backgroundBox = new Mesh( new BoxGeometry(), backgroundMaterial ); - -const _flatCamera = /*@__PURE__*/ new OrthographicCamera(); -const { _lodPlanes, _sizeLods, _sigmas } = /*@__PURE__*/ _createPlanes(); -const _clearColor = /*@__PURE__*/ new Color(); -let _oldTarget = null; - -// Golden Ratio -const PHI = ( 1 + Math.sqrt( 5 ) ) / 2; -const INV_PHI = 1 / PHI; - -// Vertices of a dodecahedron (except the opposites, which represent the -// same axis), used as axis directions evenly spread on a sphere. -const _axisDirections = [ - /*@__PURE__*/ new Vector3( 1, 1, 1 ), - /*@__PURE__*/ new Vector3( - 1, 1, 1 ), - /*@__PURE__*/ new Vector3( 1, 1, - 1 ), - /*@__PURE__*/ new Vector3( - 1, 1, - 1 ), - /*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ), - /*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ), - /*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ), - /*@__PURE__*/ new Vector3( - INV_PHI, 0, PHI ), - /*@__PURE__*/ new Vector3( PHI, INV_PHI, 0 ), - /*@__PURE__*/ new Vector3( - PHI, INV_PHI, 0 ) ]; - -/** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * Paper: Fast, Accurate Image-Based Lighting - * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view -*/ - -function convertLinearToRGBE( color ) { - - const maxComponent = Math.max( color.r, color.g, color.b ); - const fExp = Math.min( Math.max( Math.ceil( Math.log2( maxComponent ) ), - 128.0 ), 127.0 ); - color.multiplyScalar( Math.pow( 2.0, - fExp ) ); - - const alpha = ( fExp + 128.0 ) / 255.0; - return alpha; - -} - -class PMREMGenerator { - - constructor( renderer ) { - - this._renderer = renderer; - this._pingPongRenderTarget = null; - - this._blurMaterial = _getBlurShader( MAX_SAMPLES ); - this._equirectShader = null; - this._cubemapShader = null; - - this._compileMaterial( this._blurMaterial ); - - } - - /** - * Generates a PMREM from a supplied Scene, which can be faster than using an - * image if networking bandwidth is low. Optional sigma specifies a blur radius - * in radians to be applied to the scene before PMREM generation. Optional near - * and far planes ensure the scene is rendered in its entirety (the cubeCamera - * is placed at the origin). - */ - fromScene( scene, sigma = 0, near = 0.1, far = 100 ) { - - _oldTarget = this._renderer.getRenderTarget(); - const cubeUVRenderTarget = this._allocateTargets(); - - this._sceneToCubeUV( scene, near, far, cubeUVRenderTarget ); - if ( sigma > 0 ) { - - this._blur( cubeUVRenderTarget, 0, 0, sigma ); - - } - - this._applyPMREM( cubeUVRenderTarget ); - this._cleanup( cubeUVRenderTarget ); - - return cubeUVRenderTarget; - - } - - /** - * Generates a PMREM from an equirectangular texture, which can be either LDR - * (RGBFormat) or HDR (RGBEFormat). The ideal input image size is 1k (1024 x 512), - * as this matches best with the 256 x 256 cubemap output. - */ - fromEquirectangular( equirectangular ) { - - return this._fromTexture( equirectangular ); - - } - - /** - * Generates a PMREM from an cubemap texture, which can be either LDR - * (RGBFormat) or HDR (RGBEFormat). The ideal input cube size is 256 x 256, - * as this matches best with the 256 x 256 cubemap output. - */ - fromCubemap( cubemap ) { - - return this._fromTexture( cubemap ); - - } - - /** - * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - compileCubemapShader() { - - if ( this._cubemapShader === null ) { - - this._cubemapShader = _getCubemapShader(); - this._compileMaterial( this._cubemapShader ); - - } - - } - - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - compileEquirectangularShader() { - - if ( this._equirectShader === null ) { - - this._equirectShader = _getEquirectShader(); - this._compileMaterial( this._equirectShader ); - - } - - } - - /** - * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, - * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on - * one of them will cause any others to also become unusable. - */ - dispose() { - - this._blurMaterial.dispose(); - - if ( this._cubemapShader !== null ) this._cubemapShader.dispose(); - if ( this._equirectShader !== null ) this._equirectShader.dispose(); - - for ( let i = 0; i < _lodPlanes.length; i ++ ) { - - _lodPlanes[ i ].dispose(); - - } - - } - - // private interface - - _cleanup( outputTarget ) { - - this._pingPongRenderTarget.dispose(); - this._renderer.setRenderTarget( _oldTarget ); - outputTarget.scissorTest = false; - _setViewport( outputTarget, 0, 0, outputTarget.width, outputTarget.height ); - - } - - _fromTexture( texture ) { - - _oldTarget = this._renderer.getRenderTarget(); - const cubeUVRenderTarget = this._allocateTargets( texture ); - this._textureToCubeUV( texture, cubeUVRenderTarget ); - this._applyPMREM( cubeUVRenderTarget ); - this._cleanup( cubeUVRenderTarget ); - - return cubeUVRenderTarget; - - } - - _allocateTargets( texture ) { // warning: null texture is valid - - const params = { - magFilter: NearestFilter, - minFilter: NearestFilter, - generateMipmaps: false, - type: UnsignedByteType, - format: RGBEFormat, - encoding: _isLDR( texture ) ? texture.encoding : RGBEEncoding, - depthBuffer: false - }; - - const cubeUVRenderTarget = _createRenderTarget( params ); - cubeUVRenderTarget.depthBuffer = texture ? false : true; - this._pingPongRenderTarget = _createRenderTarget( params ); - return cubeUVRenderTarget; - - } - - _compileMaterial( material ) { - - const tmpMesh = new Mesh( _lodPlanes[ 0 ], material ); - this._renderer.compile( tmpMesh, _flatCamera ); - - } - - _sceneToCubeUV( scene, near, far, cubeUVRenderTarget ) { - - const fov = 90; - const aspect = 1; - const cubeCamera = new PerspectiveCamera( fov, aspect, near, far ); - const upSign = [ 1, - 1, 1, 1, 1, 1 ]; - const forwardSign = [ 1, 1, 1, - 1, - 1, - 1 ]; - const renderer = this._renderer; - - const originalAutoClear = renderer.autoClear; - const outputEncoding = renderer.outputEncoding; - const toneMapping = renderer.toneMapping; - renderer.getClearColor( _clearColor ); - - renderer.toneMapping = NoToneMapping; - renderer.outputEncoding = LinearEncoding; - renderer.autoClear = false; - - let useSolidColor = false; - const background = scene.background; - if ( background ) { - - if ( background.isColor ) { - - backgroundMaterial.color.copy( background ).convertSRGBToLinear(); - scene.background = null; - - const alpha = convertLinearToRGBE( backgroundMaterial.color ); - backgroundMaterial.opacity = alpha; - useSolidColor = true; - - } - - } else { - - backgroundMaterial.color.copy( _clearColor ).convertSRGBToLinear(); - - const alpha = convertLinearToRGBE( backgroundMaterial.color ); - backgroundMaterial.opacity = alpha; - useSolidColor = true; - - } - - - for ( let i = 0; i < 6; i ++ ) { - - const col = i % 3; - if ( col == 0 ) { - - cubeCamera.up.set( 0, upSign[ i ], 0 ); - cubeCamera.lookAt( forwardSign[ i ], 0, 0 ); - - } else if ( col == 1 ) { - - cubeCamera.up.set( 0, 0, upSign[ i ] ); - cubeCamera.lookAt( 0, forwardSign[ i ], 0 ); - - } else { - - cubeCamera.up.set( 0, upSign[ i ], 0 ); - cubeCamera.lookAt( 0, 0, forwardSign[ i ] ); - - } - - _setViewport( cubeUVRenderTarget, - col * SIZE_MAX, i > 2 ? SIZE_MAX : 0, SIZE_MAX, SIZE_MAX ); - renderer.setRenderTarget( cubeUVRenderTarget ); - - if ( useSolidColor ) { - - renderer.render( backgroundBox, cubeCamera ); - - } - - renderer.render( scene, cubeCamera ); - - } - - renderer.toneMapping = toneMapping; - renderer.outputEncoding = outputEncoding; - renderer.autoClear = originalAutoClear; - - } - - _textureToCubeUV( texture, cubeUVRenderTarget ) { - - const renderer = this._renderer; - - if ( texture.isCubeTexture ) { - - if ( this._cubemapShader == null ) { - - this._cubemapShader = _getCubemapShader(); - - } - - } else { - - if ( this._equirectShader == null ) { - - this._equirectShader = _getEquirectShader(); - - } - - } - - const material = texture.isCubeTexture ? this._cubemapShader : this._equirectShader; - const mesh = new Mesh( _lodPlanes[ 0 ], material ); - - const uniforms = material.uniforms; - - uniforms[ 'envMap' ].value = texture; - - if ( ! texture.isCubeTexture ) { - - uniforms[ 'texelSize' ].value.set( 1.0 / texture.image.width, 1.0 / texture.image.height ); - - } - - uniforms[ 'inputEncoding' ].value = ENCODINGS[ texture.encoding ]; - uniforms[ 'outputEncoding' ].value = ENCODINGS[ cubeUVRenderTarget.texture.encoding ]; - - _setViewport( cubeUVRenderTarget, 0, 0, 3 * SIZE_MAX, 2 * SIZE_MAX ); - - renderer.setRenderTarget( cubeUVRenderTarget ); - renderer.render( mesh, _flatCamera ); - - } - - _applyPMREM( cubeUVRenderTarget ) { - - const renderer = this._renderer; - const autoClear = renderer.autoClear; - renderer.autoClear = false; - - for ( let i = 1; i < TOTAL_LODS; i ++ ) { - - const sigma = Math.sqrt( _sigmas[ i ] * _sigmas[ i ] - _sigmas[ i - 1 ] * _sigmas[ i - 1 ] ); - - const poleAxis = _axisDirections[ ( i - 1 ) % _axisDirections.length ]; - - this._blur( cubeUVRenderTarget, i - 1, i, sigma, poleAxis ); - - } - - renderer.autoClear = autoClear; - - } - - /** - * This is a two-pass Gaussian blur for a cubemap. Normally this is done - * vertically and horizontally, but this breaks down on a cube. Here we apply - * the blur latitudinally (around the poles), and then longitudinally (towards - * the poles) to approximate the orthogonally-separable blur. It is least - * accurate at the poles, but still does a decent job. - */ - _blur( cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis ) { - - const pingPongRenderTarget = this._pingPongRenderTarget; - - this._halfBlur( - cubeUVRenderTarget, - pingPongRenderTarget, - lodIn, - lodOut, - sigma, - 'latitudinal', - poleAxis ); - - this._halfBlur( - pingPongRenderTarget, - cubeUVRenderTarget, - lodOut, - lodOut, - sigma, - 'longitudinal', - poleAxis ); - - } - - _halfBlur( targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis ) { - - const renderer = this._renderer; - const blurMaterial = this._blurMaterial; - - if ( direction !== 'latitudinal' && direction !== 'longitudinal' ) { - - console.error( - 'blur direction must be either latitudinal or longitudinal!' ); - - } - - // Number of standard deviations at which to cut off the discrete approximation. - const STANDARD_DEVIATIONS = 3; - - const blurMesh = new Mesh( _lodPlanes[ lodOut ], blurMaterial ); - const blurUniforms = blurMaterial.uniforms; - - const pixels = _sizeLods[ lodIn ] - 1; - const radiansPerPixel = isFinite( sigmaRadians ) ? Math.PI / ( 2 * pixels ) : 2 * Math.PI / ( 2 * MAX_SAMPLES - 1 ); - const sigmaPixels = sigmaRadians / radiansPerPixel; - const samples = isFinite( sigmaRadians ) ? 1 + Math.floor( STANDARD_DEVIATIONS * sigmaPixels ) : MAX_SAMPLES; - - if ( samples > MAX_SAMPLES ) { - - console.warn( `sigmaRadians, ${ - sigmaRadians}, is too large and will clip, as it requested ${ - samples} samples when the maximum is set to ${MAX_SAMPLES}` ); - - } - - const weights = []; - let sum = 0; - - for ( let i = 0; i < MAX_SAMPLES; ++ i ) { - - const x = i / sigmaPixels; - const weight = Math.exp( - x * x / 2 ); - weights.push( weight ); - - if ( i == 0 ) { - - sum += weight; - - } else if ( i < samples ) { - - sum += 2 * weight; - - } - - } - - for ( let i = 0; i < weights.length; i ++ ) { - - weights[ i ] = weights[ i ] / sum; - - } - - blurUniforms[ 'envMap' ].value = targetIn.texture; - blurUniforms[ 'samples' ].value = samples; - blurUniforms[ 'weights' ].value = weights; - blurUniforms[ 'latitudinal' ].value = direction === 'latitudinal'; - - if ( poleAxis ) { - - blurUniforms[ 'poleAxis' ].value = poleAxis; - - } - - blurUniforms[ 'dTheta' ].value = radiansPerPixel; - blurUniforms[ 'mipInt' ].value = LOD_MAX - lodIn; - blurUniforms[ 'inputEncoding' ].value = ENCODINGS[ targetIn.texture.encoding ]; - blurUniforms[ 'outputEncoding' ].value = ENCODINGS[ targetIn.texture.encoding ]; - - const outputSize = _sizeLods[ lodOut ]; - const x = 3 * Math.max( 0, SIZE_MAX - 2 * outputSize ); - const y = ( lodOut === 0 ? 0 : 2 * SIZE_MAX ) + 2 * outputSize * ( lodOut > LOD_MAX - LOD_MIN ? lodOut - LOD_MAX + LOD_MIN : 0 ); - - _setViewport( targetOut, x, y, 3 * outputSize, 2 * outputSize ); - renderer.setRenderTarget( targetOut ); - renderer.render( blurMesh, _flatCamera ); - - } - -} - -function _isLDR( texture ) { - - if ( texture === undefined || texture.type !== UnsignedByteType ) return false; - - return texture.encoding === LinearEncoding || texture.encoding === sRGBEncoding || texture.encoding === GammaEncoding; - -} - -function _createPlanes() { - - const _lodPlanes = []; - const _sizeLods = []; - const _sigmas = []; - - let lod = LOD_MAX; - - for ( let i = 0; i < TOTAL_LODS; i ++ ) { - - const sizeLod = Math.pow( 2, lod ); - _sizeLods.push( sizeLod ); - let sigma = 1.0 / sizeLod; - - if ( i > LOD_MAX - LOD_MIN ) { - - sigma = EXTRA_LOD_SIGMA[ i - LOD_MAX + LOD_MIN - 1 ]; - - } else if ( i == 0 ) { - - sigma = 0; - - } - - _sigmas.push( sigma ); - - const texelSize = 1.0 / ( sizeLod - 1 ); - const min = - texelSize / 2; - const max = 1 + texelSize / 2; - const uv1 = [ min, min, max, min, max, max, min, min, max, max, min, max ]; - - const cubeFaces = 6; - const vertices = 6; - const positionSize = 3; - const uvSize = 2; - const faceIndexSize = 1; - - const position = new Float32Array( positionSize * vertices * cubeFaces ); - const uv = new Float32Array( uvSize * vertices * cubeFaces ); - const faceIndex = new Float32Array( faceIndexSize * vertices * cubeFaces ); - - for ( let face = 0; face < cubeFaces; face ++ ) { - - const x = ( face % 3 ) * 2 / 3 - 1; - const y = face > 2 ? 0 : - 1; - const coordinates = [ - x, y, 0, - x + 2 / 3, y, 0, - x + 2 / 3, y + 1, 0, - x, y, 0, - x + 2 / 3, y + 1, 0, - x, y + 1, 0 - ]; - position.set( coordinates, positionSize * vertices * face ); - uv.set( uv1, uvSize * vertices * face ); - const fill = [ face, face, face, face, face, face ]; - faceIndex.set( fill, faceIndexSize * vertices * face ); - - } - - const planes = new BufferGeometry(); - planes.setAttribute( 'position', new BufferAttribute( position, positionSize ) ); - planes.setAttribute( 'uv', new BufferAttribute( uv, uvSize ) ); - planes.setAttribute( 'faceIndex', new BufferAttribute( faceIndex, faceIndexSize ) ); - _lodPlanes.push( planes ); - - if ( lod > LOD_MIN ) { - - lod --; - - } - - } - - return { _lodPlanes, _sizeLods, _sigmas }; - -} - -function _createRenderTarget( params ) { - - const cubeUVRenderTarget = new WebGLRenderTarget( 3 * SIZE_MAX, 3 * SIZE_MAX, params ); - cubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping; - cubeUVRenderTarget.texture.name = 'PMREM.cubeUv'; - cubeUVRenderTarget.scissorTest = true; - return cubeUVRenderTarget; - -} - -function _setViewport( target, x, y, width, height ) { - - target.viewport.set( x, y, width, height ); - target.scissor.set( x, y, width, height ); - -} - -function _getBlurShader( maxSamples ) { - - const weights = new Float32Array( maxSamples ); - const poleAxis = new Vector3( 0, 1, 0 ); - const shaderMaterial = new RawShaderMaterial( { - - name: 'SphericalGaussianBlur', - - defines: { 'n': maxSamples }, - - uniforms: { - 'envMap': { value: null }, - 'samples': { value: 1 }, - 'weights': { value: weights }, - 'latitudinal': { value: false }, - 'dTheta': { value: 0 }, - 'mipInt': { value: 0 }, - 'poleAxis': { value: poleAxis }, - 'inputEncoding': { value: ENCODINGS[ LinearEncoding ] }, - 'outputEncoding': { value: ENCODINGS[ LinearEncoding ] } - }, - - vertexShader: _getCommonVertexShader(), - - fragmentShader: /* glsl */` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - ${ _getEncodings() } - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `, - - blending: NoBlending, - depthTest: false, - depthWrite: false - - } ); - - return shaderMaterial; - -} - -function _getEquirectShader() { - - const texelSize = new Vector2( 1, 1 ); - const shaderMaterial = new RawShaderMaterial( { - - name: 'EquirectangularToCubeUV', - - uniforms: { - 'envMap': { value: null }, - 'texelSize': { value: texelSize }, - 'inputEncoding': { value: ENCODINGS[ LinearEncoding ] }, - 'outputEncoding': { value: ENCODINGS[ LinearEncoding ] } - }, - - vertexShader: _getCommonVertexShader(), - - fragmentShader: /* glsl */` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform vec2 texelSize; - - ${ _getEncodings() } - - #include - - void main() { - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - vec2 f = fract( uv / texelSize - 0.5 ); - uv -= f * texelSize; - vec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.x += texelSize.x; - vec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.y += texelSize.y; - vec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.x -= texelSize.x; - vec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - - vec3 tm = mix( tl, tr, f.x ); - vec3 bm = mix( bl, br, f.x ); - gl_FragColor.rgb = mix( tm, bm, f.y ); - - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `, - - blending: NoBlending, - depthTest: false, - depthWrite: false - - } ); - - return shaderMaterial; - -} - -function _getCubemapShader() { - - const shaderMaterial = new RawShaderMaterial( { - - name: 'CubemapToCubeUV', - - uniforms: { - 'envMap': { value: null }, - 'inputEncoding': { value: ENCODINGS[ LinearEncoding ] }, - 'outputEncoding': { value: ENCODINGS[ LinearEncoding ] } - }, - - vertexShader: _getCommonVertexShader(), - - fragmentShader: /* glsl */` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - ${ _getEncodings() } - - void main() { - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb; - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `, - - blending: NoBlending, - depthTest: false, - depthWrite: false - - } ); - - return shaderMaterial; - -} - -function _getCommonVertexShader() { - - return /* glsl */` - - precision mediump float; - precision mediump int; - - attribute vec3 position; - attribute vec2 uv; - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - `; - -} - -function _getEncodings() { - - return /* glsl */` - - uniform int inputEncoding; - uniform int outputEncoding; - - #include - - vec4 inputTexelToLinear( vec4 value ) { - - if ( inputEncoding == 0 ) { - - return value; - - } else if ( inputEncoding == 1 ) { - - return sRGBToLinear( value ); - - } else if ( inputEncoding == 2 ) { - - return RGBEToLinear( value ); - - } else if ( inputEncoding == 3 ) { - - return RGBMToLinear( value, 7.0 ); - - } else if ( inputEncoding == 4 ) { - - return RGBMToLinear( value, 16.0 ); - - } else if ( inputEncoding == 5 ) { - - return RGBDToLinear( value, 256.0 ); - - } else { - - return GammaToLinear( value, 2.2 ); - - } - - } - - vec4 linearToOutputTexel( vec4 value ) { - - if ( outputEncoding == 0 ) { - - return value; - - } else if ( outputEncoding == 1 ) { - - return LinearTosRGB( value ); - - } else if ( outputEncoding == 2 ) { - - return LinearToRGBE( value ); - - } else if ( outputEncoding == 3 ) { - - return LinearToRGBM( value, 7.0 ); - - } else if ( outputEncoding == 4 ) { - - return LinearToRGBM( value, 16.0 ); - - } else if ( outputEncoding == 5 ) { - - return LinearToRGBD( value, 256.0 ); - - } else { - - return LinearToGamma( value, 2.2 ); - - } - - } - - vec4 envMapTexelToLinear( vec4 color ) { - - return inputTexelToLinear( color ); - - } - `; - -} - -const LineStrip = 0; -const LinePieces = 1; -const NoColors = 0; -const FaceColors = 1; -const VertexColors = 2; - -function MeshFaceMaterial( materials ) { - - console.warn( 'THREE.MeshFaceMaterial has been removed. Use an Array instead.' ); - return materials; - -} - -function MultiMaterial( materials = [] ) { - - console.warn( 'THREE.MultiMaterial has been removed. Use an Array instead.' ); - materials.isMultiMaterial = true; - materials.materials = materials; - materials.clone = function () { - - return materials.slice(); - - }; - - return materials; - -} - -function PointCloud( geometry, material ) { - - console.warn( 'THREE.PointCloud has been renamed to THREE.Points.' ); - return new Points( geometry, material ); - -} - -function Particle( material ) { - - console.warn( 'THREE.Particle has been renamed to THREE.Sprite.' ); - return new Sprite( material ); - -} - -function ParticleSystem( geometry, material ) { - - console.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' ); - return new Points( geometry, material ); - -} - -function PointCloudMaterial( parameters ) { - - console.warn( 'THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.' ); - return new PointsMaterial( parameters ); - -} - -function ParticleBasicMaterial( parameters ) { - - console.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.' ); - return new PointsMaterial( parameters ); - -} - -function ParticleSystemMaterial( parameters ) { - - console.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.' ); - return new PointsMaterial( parameters ); - -} - -function Vertex( x, y, z ) { - - console.warn( 'THREE.Vertex has been removed. Use THREE.Vector3 instead.' ); - return new Vector3( x, y, z ); - -} - -// - -function DynamicBufferAttribute( array, itemSize ) { - - console.warn( 'THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead.' ); - return new BufferAttribute( array, itemSize ).setUsage( DynamicDrawUsage ); - -} - -function Int8Attribute( array, itemSize ) { - - console.warn( 'THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.' ); - return new Int8BufferAttribute( array, itemSize ); - -} - -function Uint8Attribute( array, itemSize ) { - - console.warn( 'THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.' ); - return new Uint8BufferAttribute( array, itemSize ); - -} - -function Uint8ClampedAttribute( array, itemSize ) { - - console.warn( 'THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.' ); - return new Uint8ClampedBufferAttribute( array, itemSize ); - -} - -function Int16Attribute( array, itemSize ) { - - console.warn( 'THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.' ); - return new Int16BufferAttribute( array, itemSize ); - -} - -function Uint16Attribute( array, itemSize ) { - - console.warn( 'THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.' ); - return new Uint16BufferAttribute( array, itemSize ); - -} - -function Int32Attribute( array, itemSize ) { - - console.warn( 'THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.' ); - return new Int32BufferAttribute( array, itemSize ); - -} - -function Uint32Attribute( array, itemSize ) { - - console.warn( 'THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.' ); - return new Uint32BufferAttribute( array, itemSize ); - -} - -function Float32Attribute( array, itemSize ) { - - console.warn( 'THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.' ); - return new Float32BufferAttribute( array, itemSize ); - -} - -function Float64Attribute( array, itemSize ) { - - console.warn( 'THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.' ); - return new Float64BufferAttribute( array, itemSize ); - -} - -// - -Curve.create = function ( construct, getPoint ) { - - console.log( 'THREE.Curve.create() has been deprecated' ); - - construct.prototype = Object.create( Curve.prototype ); - construct.prototype.constructor = construct; - construct.prototype.getPoint = getPoint; - - return construct; - -}; - -// - -Path.prototype.fromPoints = function ( points ) { - - console.warn( 'THREE.Path: .fromPoints() has been renamed to .setFromPoints().' ); - return this.setFromPoints( points ); - -}; - -// - -function AxisHelper( size ) { - - console.warn( 'THREE.AxisHelper has been renamed to THREE.AxesHelper.' ); - return new AxesHelper( size ); - -} - -function BoundingBoxHelper( object, color ) { - - console.warn( 'THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.' ); - return new BoxHelper( object, color ); - -} - -function EdgesHelper( object, hex ) { - - console.warn( 'THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.' ); - return new LineSegments( new EdgesGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) ); - -} - -GridHelper.prototype.setColors = function () { - - console.error( 'THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.' ); - -}; - -SkeletonHelper.prototype.update = function () { - - console.error( 'THREE.SkeletonHelper: update() no longer needs to be called.' ); - -}; - -function WireframeHelper( object, hex ) { - - console.warn( 'THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.' ); - return new LineSegments( new WireframeGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) ); - -} - -// - -Loader.prototype.extractUrlBase = function ( url ) { - - console.warn( 'THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.' ); - return LoaderUtils.extractUrlBase( url ); - -}; - -Loader.Handlers = { - - add: function ( /* regex, loader */ ) { - - console.error( 'THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.' ); - - }, - - get: function ( /* file */ ) { - - console.error( 'THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.' ); - - } - -}; - -function XHRLoader( manager ) { - - console.warn( 'THREE.XHRLoader has been renamed to THREE.FileLoader.' ); - return new FileLoader( manager ); - -} - -function BinaryTextureLoader( manager ) { - - console.warn( 'THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.' ); - return new DataTextureLoader( manager ); - -} - -// - -Box2.prototype.center = function ( optionalTarget ) { - - console.warn( 'THREE.Box2: .center() has been renamed to .getCenter().' ); - return this.getCenter( optionalTarget ); - -}; - -Box2.prototype.empty = function () { - - console.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' ); - return this.isEmpty(); - -}; - -Box2.prototype.isIntersectionBox = function ( box ) { - - console.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' ); - return this.intersectsBox( box ); - -}; - -Box2.prototype.size = function ( optionalTarget ) { - - console.warn( 'THREE.Box2: .size() has been renamed to .getSize().' ); - return this.getSize( optionalTarget ); - -}; - -// - -Box3.prototype.center = function ( optionalTarget ) { - - console.warn( 'THREE.Box3: .center() has been renamed to .getCenter().' ); - return this.getCenter( optionalTarget ); - -}; - -Box3.prototype.empty = function () { - - console.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' ); - return this.isEmpty(); - -}; - -Box3.prototype.isIntersectionBox = function ( box ) { - - console.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' ); - return this.intersectsBox( box ); - -}; - -Box3.prototype.isIntersectionSphere = function ( sphere ) { - - console.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' ); - return this.intersectsSphere( sphere ); - -}; - -Box3.prototype.size = function ( optionalTarget ) { - - console.warn( 'THREE.Box3: .size() has been renamed to .getSize().' ); - return this.getSize( optionalTarget ); - -}; - -// - -Sphere.prototype.empty = function () { - - console.warn( 'THREE.Sphere: .empty() has been renamed to .isEmpty().' ); - return this.isEmpty(); - -}; - -// - -Frustum.prototype.setFromMatrix = function ( m ) { - - console.warn( 'THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().' ); - return this.setFromProjectionMatrix( m ); - -}; - -// - -Line3.prototype.center = function ( optionalTarget ) { - - console.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' ); - return this.getCenter( optionalTarget ); - -}; - -// - -Matrix3.prototype.flattenToArrayOffset = function ( array, offset ) { - - console.warn( 'THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.' ); - return this.toArray( array, offset ); - -}; - -Matrix3.prototype.multiplyVector3 = function ( vector ) { - - console.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' ); - return vector.applyMatrix3( this ); - -}; - -Matrix3.prototype.multiplyVector3Array = function ( /* a */ ) { - - console.error( 'THREE.Matrix3: .multiplyVector3Array() has been removed.' ); - -}; - -Matrix3.prototype.applyToBufferAttribute = function ( attribute ) { - - console.warn( 'THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.' ); - return attribute.applyMatrix3( this ); - -}; - -Matrix3.prototype.applyToVector3Array = function ( /* array, offset, length */ ) { - - console.error( 'THREE.Matrix3: .applyToVector3Array() has been removed.' ); - -}; - -Matrix3.prototype.getInverse = function ( matrix ) { - - console.warn( 'THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.' ); - return this.copy( matrix ).invert(); - -}; - -// - -Matrix4.prototype.extractPosition = function ( m ) { - - console.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' ); - return this.copyPosition( m ); - -}; - -Matrix4.prototype.flattenToArrayOffset = function ( array, offset ) { - - console.warn( 'THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.' ); - return this.toArray( array, offset ); - -}; - -Matrix4.prototype.getPosition = function () { - - console.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' ); - return new Vector3().setFromMatrixColumn( this, 3 ); - -}; - -Matrix4.prototype.setRotationFromQuaternion = function ( q ) { - - console.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' ); - return this.makeRotationFromQuaternion( q ); - -}; - -Matrix4.prototype.multiplyToArray = function () { - - console.warn( 'THREE.Matrix4: .multiplyToArray() has been removed.' ); - -}; - -Matrix4.prototype.multiplyVector3 = function ( vector ) { - - console.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.' ); - return vector.applyMatrix4( this ); - -}; - -Matrix4.prototype.multiplyVector4 = function ( vector ) { - - console.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' ); - return vector.applyMatrix4( this ); - -}; - -Matrix4.prototype.multiplyVector3Array = function ( /* a */ ) { - - console.error( 'THREE.Matrix4: .multiplyVector3Array() has been removed.' ); - -}; - -Matrix4.prototype.rotateAxis = function ( v ) { - - console.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' ); - v.transformDirection( this ); - -}; - -Matrix4.prototype.crossVector = function ( vector ) { - - console.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' ); - return vector.applyMatrix4( this ); - -}; - -Matrix4.prototype.translate = function () { - - console.error( 'THREE.Matrix4: .translate() has been removed.' ); - -}; - -Matrix4.prototype.rotateX = function () { - - console.error( 'THREE.Matrix4: .rotateX() has been removed.' ); - -}; - -Matrix4.prototype.rotateY = function () { - - console.error( 'THREE.Matrix4: .rotateY() has been removed.' ); - -}; - -Matrix4.prototype.rotateZ = function () { - - console.error( 'THREE.Matrix4: .rotateZ() has been removed.' ); - -}; - -Matrix4.prototype.rotateByAxis = function () { - - console.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' ); - -}; - -Matrix4.prototype.applyToBufferAttribute = function ( attribute ) { - - console.warn( 'THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.' ); - return attribute.applyMatrix4( this ); - -}; - -Matrix4.prototype.applyToVector3Array = function ( /* array, offset, length */ ) { - - console.error( 'THREE.Matrix4: .applyToVector3Array() has been removed.' ); - -}; - -Matrix4.prototype.makeFrustum = function ( left, right, bottom, top, near, far ) { - - console.warn( 'THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.' ); - return this.makePerspective( left, right, top, bottom, near, far ); - -}; - -Matrix4.prototype.getInverse = function ( matrix ) { - - console.warn( 'THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.' ); - return this.copy( matrix ).invert(); - -}; - -// - -Plane.prototype.isIntersectionLine = function ( line ) { - - console.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' ); - return this.intersectsLine( line ); - -}; - -// - -Quaternion.prototype.multiplyVector3 = function ( vector ) { - - console.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' ); - return vector.applyQuaternion( this ); - -}; - -Quaternion.prototype.inverse = function ( ) { - - console.warn( 'THREE.Quaternion: .inverse() has been renamed to invert().' ); - return this.invert(); - -}; - -// - -Ray.prototype.isIntersectionBox = function ( box ) { - - console.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' ); - return this.intersectsBox( box ); - -}; - -Ray.prototype.isIntersectionPlane = function ( plane ) { - - console.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' ); - return this.intersectsPlane( plane ); - -}; - -Ray.prototype.isIntersectionSphere = function ( sphere ) { - - console.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' ); - return this.intersectsSphere( sphere ); - -}; - -// - -Triangle.prototype.area = function () { - - console.warn( 'THREE.Triangle: .area() has been renamed to .getArea().' ); - return this.getArea(); - -}; - -Triangle.prototype.barycoordFromPoint = function ( point, target ) { - - console.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' ); - return this.getBarycoord( point, target ); - -}; - -Triangle.prototype.midpoint = function ( target ) { - - console.warn( 'THREE.Triangle: .midpoint() has been renamed to .getMidpoint().' ); - return this.getMidpoint( target ); - -}; - -Triangle.prototypenormal = function ( target ) { - - console.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' ); - return this.getNormal( target ); - -}; - -Triangle.prototype.plane = function ( target ) { - - console.warn( 'THREE.Triangle: .plane() has been renamed to .getPlane().' ); - return this.getPlane( target ); - -}; - -Triangle.barycoordFromPoint = function ( point, a, b, c, target ) { - - console.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' ); - return Triangle.getBarycoord( point, a, b, c, target ); - -}; - -Triangle.normal = function ( a, b, c, target ) { - - console.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' ); - return Triangle.getNormal( a, b, c, target ); - -}; - -// - -Shape.prototype.extractAllPoints = function ( divisions ) { - - console.warn( 'THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.' ); - return this.extractPoints( divisions ); - -}; - -Shape.prototype.extrude = function ( options ) { - - console.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' ); - return new ExtrudeGeometry( this, options ); - -}; - -Shape.prototype.makeGeometry = function ( options ) { - - console.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' ); - return new ShapeGeometry( this, options ); - -}; - -// - -Vector2.prototype.fromAttribute = function ( attribute, index, offset ) { - - console.warn( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' ); - return this.fromBufferAttribute( attribute, index, offset ); - -}; - -Vector2.prototype.distanceToManhattan = function ( v ) { - - console.warn( 'THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' ); - return this.manhattanDistanceTo( v ); - -}; - -Vector2.prototype.lengthManhattan = function () { - - console.warn( 'THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().' ); - return this.manhattanLength(); - -}; - -// - -Vector3.prototype.setEulerFromRotationMatrix = function () { - - console.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' ); - -}; - -Vector3.prototype.setEulerFromQuaternion = function () { - - console.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' ); - -}; - -Vector3.prototype.getPositionFromMatrix = function ( m ) { - - console.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' ); - return this.setFromMatrixPosition( m ); - -}; - -Vector3.prototype.getScaleFromMatrix = function ( m ) { - - console.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' ); - return this.setFromMatrixScale( m ); - -}; - -Vector3.prototype.getColumnFromMatrix = function ( index, matrix ) { - - console.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' ); - return this.setFromMatrixColumn( matrix, index ); - -}; - -Vector3.prototype.applyProjection = function ( m ) { - - console.warn( 'THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.' ); - return this.applyMatrix4( m ); - -}; - -Vector3.prototype.fromAttribute = function ( attribute, index, offset ) { - - console.warn( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' ); - return this.fromBufferAttribute( attribute, index, offset ); - -}; - -Vector3.prototype.distanceToManhattan = function ( v ) { - - console.warn( 'THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' ); - return this.manhattanDistanceTo( v ); - -}; - -Vector3.prototype.lengthManhattan = function () { - - console.warn( 'THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().' ); - return this.manhattanLength(); - -}; - -// - -Vector4.prototype.fromAttribute = function ( attribute, index, offset ) { - - console.warn( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' ); - return this.fromBufferAttribute( attribute, index, offset ); - -}; - -Vector4.prototype.lengthManhattan = function () { - - console.warn( 'THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().' ); - return this.manhattanLength(); - -}; - -// - -Object3D.prototype.getChildByName = function ( name ) { - - console.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' ); - return this.getObjectByName( name ); - -}; - -Object3D.prototype.renderDepth = function () { - - console.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' ); - -}; - -Object3D.prototype.translate = function ( distance, axis ) { - - console.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' ); - return this.translateOnAxis( axis, distance ); - -}; - -Object3D.prototype.getWorldRotation = function () { - - console.error( 'THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.' ); - -}; - -Object3D.prototype.applyMatrix = function ( matrix ) { - - console.warn( 'THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().' ); - return this.applyMatrix4( matrix ); - -}; - -Object.defineProperties( Object3D.prototype, { - - eulerOrder: { - get: function () { - - console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' ); - return this.rotation.order; - - }, - set: function ( value ) { - - console.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' ); - this.rotation.order = value; - - } - }, - useQuaternion: { - get: function () { - - console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' ); - - }, - set: function () { - - console.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' ); - - } - } - -} ); - -Mesh.prototype.setDrawMode = function () { - - console.error( 'THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' ); - -}; - -Object.defineProperties( Mesh.prototype, { - - drawMode: { - get: function () { - - console.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.' ); - return TrianglesDrawMode; - - }, - set: function () { - - console.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' ); - - } - } - -} ); - -SkinnedMesh.prototype.initBones = function () { - - console.error( 'THREE.SkinnedMesh: initBones() has been removed.' ); - -}; - -// - -PerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) { - - console.warn( 'THREE.PerspectiveCamera.setLens is deprecated. ' + - 'Use .setFocalLength and .filmGauge for a photographic setup.' ); - - if ( filmGauge !== undefined ) this.filmGauge = filmGauge; - this.setFocalLength( focalLength ); - -}; - -// - -Object.defineProperties( Light.prototype, { - onlyShadow: { - set: function () { - - console.warn( 'THREE.Light: .onlyShadow has been removed.' ); - - } - }, - shadowCameraFov: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' ); - this.shadow.camera.fov = value; - - } - }, - shadowCameraLeft: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' ); - this.shadow.camera.left = value; - - } - }, - shadowCameraRight: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' ); - this.shadow.camera.right = value; - - } - }, - shadowCameraTop: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' ); - this.shadow.camera.top = value; - - } - }, - shadowCameraBottom: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' ); - this.shadow.camera.bottom = value; - - } - }, - shadowCameraNear: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' ); - this.shadow.camera.near = value; - - } - }, - shadowCameraFar: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' ); - this.shadow.camera.far = value; - - } - }, - shadowCameraVisible: { - set: function () { - - console.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' ); - - } - }, - shadowBias: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' ); - this.shadow.bias = value; - - } - }, - shadowDarkness: { - set: function () { - - console.warn( 'THREE.Light: .shadowDarkness has been removed.' ); - - } - }, - shadowMapWidth: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' ); - this.shadow.mapSize.width = value; - - } - }, - shadowMapHeight: { - set: function ( value ) { - - console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' ); - this.shadow.mapSize.height = value; - - } - } -} ); - -// - -Object.defineProperties( BufferAttribute.prototype, { - - length: { - get: function () { - - console.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' ); - return this.array.length; - - } - }, - dynamic: { - get: function () { - - console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' ); - return this.usage === DynamicDrawUsage; - - }, - set: function ( /* value */ ) { - - console.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' ); - this.setUsage( DynamicDrawUsage ); - - } - } - -} ); - -BufferAttribute.prototype.setDynamic = function ( value ) { - - console.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' ); - this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage ); - return this; - -}; - -BufferAttribute.prototype.copyIndicesArray = function ( /* indices */ ) { - - console.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' ); - -}, - -BufferAttribute.prototype.setArray = function ( /* array */ ) { - - console.error( 'THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' ); - -}; - -// - -BufferGeometry.prototype.addIndex = function ( index ) { - - console.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' ); - this.setIndex( index ); - -}; - -BufferGeometry.prototype.addAttribute = function ( name, attribute ) { - - console.warn( 'THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().' ); - - if ( ! ( attribute && attribute.isBufferAttribute ) && ! ( attribute && attribute.isInterleavedBufferAttribute ) ) { - - console.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' ); - - return this.setAttribute( name, new BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) ); - - } - - if ( name === 'index' ) { - - console.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' ); - this.setIndex( attribute ); - - return this; - - } - - return this.setAttribute( name, attribute ); - -}; - -BufferGeometry.prototype.addDrawCall = function ( start, count, indexOffset ) { - - if ( indexOffset !== undefined ) { - - console.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' ); - - } - - console.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' ); - this.addGroup( start, count ); - -}; - -BufferGeometry.prototype.clearDrawCalls = function () { - - console.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' ); - this.clearGroups(); - -}; - -BufferGeometry.prototype.computeOffsets = function () { - - console.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' ); - -}; - -BufferGeometry.prototype.removeAttribute = function ( name ) { - - console.warn( 'THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute().' ); - - return this.deleteAttribute( name ); - -}; - -BufferGeometry.prototype.applyMatrix = function ( matrix ) { - - console.warn( 'THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().' ); - return this.applyMatrix4( matrix ); - -}; - -Object.defineProperties( BufferGeometry.prototype, { - - drawcalls: { - get: function () { - - console.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' ); - return this.groups; - - } - }, - offsets: { - get: function () { - - console.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' ); - return this.groups; - - } - } - -} ); - -InterleavedBuffer.prototype.setDynamic = function ( value ) { - - console.warn( 'THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.' ); - this.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage ); - return this; - -}; - -InterleavedBuffer.prototype.setArray = function ( /* array */ ) { - - console.error( 'THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' ); - -}; - -// - -ExtrudeGeometry.prototype.getArrays = function () { - - console.error( 'THREE.ExtrudeGeometry: .getArrays() has been removed.' ); - -}; - -ExtrudeGeometry.prototype.addShapeList = function () { - - console.error( 'THREE.ExtrudeGeometry: .addShapeList() has been removed.' ); - -}; - -ExtrudeGeometry.prototype.addShape = function () { - - console.error( 'THREE.ExtrudeGeometry: .addShape() has been removed.' ); - -}; - -// - -Scene.prototype.dispose = function () { - - console.error( 'THREE.Scene: .dispose() has been removed.' ); - -}; - -// - -Uniform.prototype.onUpdate = function () { - - console.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' ); - return this; - -}; - -// - -Object.defineProperties( Material.prototype, { - - wrapAround: { - get: function () { - - console.warn( 'THREE.Material: .wrapAround has been removed.' ); - - }, - set: function () { - - console.warn( 'THREE.Material: .wrapAround has been removed.' ); - - } - }, - - overdraw: { - get: function () { - - console.warn( 'THREE.Material: .overdraw has been removed.' ); - - }, - set: function () { - - console.warn( 'THREE.Material: .overdraw has been removed.' ); - - } - }, - - wrapRGB: { - get: function () { - - console.warn( 'THREE.Material: .wrapRGB has been removed.' ); - return new Color(); - - } - }, - - shading: { - get: function () { - - console.error( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' ); - - }, - set: function ( value ) { - - console.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' ); - this.flatShading = ( value === FlatShading ); - - } - }, - - stencilMask: { - get: function () { - - console.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' ); - return this.stencilFuncMask; - - }, - set: function ( value ) { - - console.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' ); - this.stencilFuncMask = value; - - } - } - -} ); - -Object.defineProperties( ShaderMaterial.prototype, { - - derivatives: { - get: function () { - - console.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' ); - return this.extensions.derivatives; - - }, - set: function ( value ) { - - console.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' ); - this.extensions.derivatives = value; - - } - } - -} ); - -// - -WebGLRenderer.prototype.clearTarget = function ( renderTarget, color, depth, stencil ) { - - console.warn( 'THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.' ); - this.setRenderTarget( renderTarget ); - this.clear( color, depth, stencil ); - -}; - -WebGLRenderer.prototype.animate = function ( callback ) { - - console.warn( 'THREE.WebGLRenderer: .animate() is now .setAnimationLoop().' ); - this.setAnimationLoop( callback ); - -}; - -WebGLRenderer.prototype.getCurrentRenderTarget = function () { - - console.warn( 'THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().' ); - return this.getRenderTarget(); - -}; - -WebGLRenderer.prototype.getMaxAnisotropy = function () { - - console.warn( 'THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().' ); - return this.capabilities.getMaxAnisotropy(); - -}; - -WebGLRenderer.prototype.getPrecision = function () { - - console.warn( 'THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.' ); - return this.capabilities.precision; - -}; - -WebGLRenderer.prototype.resetGLState = function () { - - console.warn( 'THREE.WebGLRenderer: .resetGLState() is now .state.reset().' ); - return this.state.reset(); - -}; - -WebGLRenderer.prototype.supportsFloatTextures = function () { - - console.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \'OES_texture_float\' ).' ); - return this.extensions.get( 'OES_texture_float' ); - -}; - -WebGLRenderer.prototype.supportsHalfFloatTextures = function () { - - console.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \'OES_texture_half_float\' ).' ); - return this.extensions.get( 'OES_texture_half_float' ); - -}; - -WebGLRenderer.prototype.supportsStandardDerivatives = function () { - - console.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \'OES_standard_derivatives\' ).' ); - return this.extensions.get( 'OES_standard_derivatives' ); - -}; - -WebGLRenderer.prototype.supportsCompressedTextureS3TC = function () { - - console.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \'WEBGL_compressed_texture_s3tc\' ).' ); - return this.extensions.get( 'WEBGL_compressed_texture_s3tc' ); - -}; - -WebGLRenderer.prototype.supportsCompressedTexturePVRTC = function () { - - console.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \'WEBGL_compressed_texture_pvrtc\' ).' ); - return this.extensions.get( 'WEBGL_compressed_texture_pvrtc' ); - -}; - -WebGLRenderer.prototype.supportsBlendMinMax = function () { - - console.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \'EXT_blend_minmax\' ).' ); - return this.extensions.get( 'EXT_blend_minmax' ); - -}; - -WebGLRenderer.prototype.supportsVertexTextures = function () { - - console.warn( 'THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.' ); - return this.capabilities.vertexTextures; - -}; - -WebGLRenderer.prototype.supportsInstancedArrays = function () { - - console.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \'ANGLE_instanced_arrays\' ).' ); - return this.extensions.get( 'ANGLE_instanced_arrays' ); - -}; - -WebGLRenderer.prototype.enableScissorTest = function ( boolean ) { - - console.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' ); - this.setScissorTest( boolean ); - -}; - -WebGLRenderer.prototype.initMaterial = function () { - - console.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' ); - -}; - -WebGLRenderer.prototype.addPrePlugin = function () { - - console.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' ); - -}; - -WebGLRenderer.prototype.addPostPlugin = function () { - - console.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' ); - -}; - -WebGLRenderer.prototype.updateShadowMap = function () { - - console.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' ); - -}; - -WebGLRenderer.prototype.setFaceCulling = function () { - - console.warn( 'THREE.WebGLRenderer: .setFaceCulling() has been removed.' ); - -}; - -WebGLRenderer.prototype.allocTextureUnit = function () { - - console.warn( 'THREE.WebGLRenderer: .allocTextureUnit() has been removed.' ); - -}; - -WebGLRenderer.prototype.setTexture = function () { - - console.warn( 'THREE.WebGLRenderer: .setTexture() has been removed.' ); - -}; - -WebGLRenderer.prototype.setTexture2D = function () { - - console.warn( 'THREE.WebGLRenderer: .setTexture2D() has been removed.' ); - -}; - -WebGLRenderer.prototype.setTextureCube = function () { - - console.warn( 'THREE.WebGLRenderer: .setTextureCube() has been removed.' ); - -}; - -WebGLRenderer.prototype.getActiveMipMapLevel = function () { - - console.warn( 'THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().' ); - return this.getActiveMipmapLevel(); - -}; - -Object.defineProperties( WebGLRenderer.prototype, { - - shadowMapEnabled: { - get: function () { - - return this.shadowMap.enabled; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' ); - this.shadowMap.enabled = value; - - } - }, - shadowMapType: { - get: function () { - - return this.shadowMap.type; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' ); - this.shadowMap.type = value; - - } - }, - shadowMapCullFace: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' ); - return undefined; - - }, - set: function ( /* value */ ) { - - console.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' ); - - } - }, - context: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .context has been removed. Use .getContext() instead.' ); - return this.getContext(); - - } - }, - vr: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .vr has been renamed to .xr' ); - return this.xr; - - } - }, - gammaInput: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.' ); - return false; - - }, - set: function () { - - console.warn( 'THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.' ); - - } - }, - gammaOutput: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.' ); - return false; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.' ); - this.outputEncoding = ( value === true ) ? sRGBEncoding : LinearEncoding; - - } - }, - toneMappingWhitePoint: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.' ); - return 1.0; - - }, - set: function () { - - console.warn( 'THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.' ); - - } - }, - -} ); - -Object.defineProperties( WebGLShadowMap.prototype, { - - cullFace: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' ); - return undefined; - - }, - set: function ( /* cullFace */ ) { - - console.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' ); - - } - }, - renderReverseSided: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' ); - return undefined; - - }, - set: function () { - - console.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' ); - - } - }, - renderSingleSided: { - get: function () { - - console.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' ); - return undefined; - - }, - set: function () { - - console.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' ); - - } - } - -} ); - -function WebGLRenderTargetCube( width, height, options ) { - - console.warn( 'THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).' ); - return new WebGLCubeRenderTarget( width, options ); - -} - -// - -Object.defineProperties( WebGLRenderTarget.prototype, { - - wrapS: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' ); - return this.texture.wrapS; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' ); - this.texture.wrapS = value; - - } - }, - wrapT: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' ); - return this.texture.wrapT; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' ); - this.texture.wrapT = value; - - } - }, - magFilter: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' ); - return this.texture.magFilter; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' ); - this.texture.magFilter = value; - - } - }, - minFilter: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' ); - return this.texture.minFilter; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' ); - this.texture.minFilter = value; - - } - }, - anisotropy: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' ); - return this.texture.anisotropy; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' ); - this.texture.anisotropy = value; - - } - }, - offset: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' ); - return this.texture.offset; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' ); - this.texture.offset = value; - - } - }, - repeat: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' ); - return this.texture.repeat; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' ); - this.texture.repeat = value; - - } - }, - format: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' ); - return this.texture.format; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' ); - this.texture.format = value; - - } - }, - type: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' ); - return this.texture.type; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' ); - this.texture.type = value; - - } - }, - generateMipmaps: { - get: function () { - - console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' ); - return this.texture.generateMipmaps; - - }, - set: function ( value ) { - - console.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' ); - this.texture.generateMipmaps = value; - - } - } - -} ); - -// - -Audio.prototype.load = function ( file ) { - - console.warn( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' ); - const scope = this; - const audioLoader = new AudioLoader(); - audioLoader.load( file, function ( buffer ) { - - scope.setBuffer( buffer ); - - } ); - return this; - -}; - - -AudioAnalyser.prototype.getData = function () { - - console.warn( 'THREE.AudioAnalyser: .getData() is now .getFrequencyData().' ); - return this.getFrequencyData(); - -}; - -// - -CubeCamera.prototype.updateCubeMap = function ( renderer, scene ) { - - console.warn( 'THREE.CubeCamera: .updateCubeMap() is now .update().' ); - return this.update( renderer, scene ); - -}; - -CubeCamera.prototype.clear = function ( renderer, color, depth, stencil ) { - - console.warn( 'THREE.CubeCamera: .clear() is now .renderTarget.clear().' ); - return this.renderTarget.clear( renderer, color, depth, stencil ); - -}; - -ImageUtils.crossOrigin = undefined; - -ImageUtils.loadTexture = function ( url, mapping, onLoad, onError ) { - - console.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' ); - - const loader = new TextureLoader(); - loader.setCrossOrigin( this.crossOrigin ); - - const texture = loader.load( url, onLoad, undefined, onError ); - - if ( mapping ) texture.mapping = mapping; - - return texture; - -}; - -ImageUtils.loadTextureCube = function ( urls, mapping, onLoad, onError ) { - - console.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' ); - - const loader = new CubeTextureLoader(); - loader.setCrossOrigin( this.crossOrigin ); - - const texture = loader.load( urls, onLoad, undefined, onError ); - - if ( mapping ) texture.mapping = mapping; - - return texture; - -}; - -ImageUtils.loadCompressedTexture = function () { - - console.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' ); - -}; - -ImageUtils.loadCompressedTextureCube = function () { - - console.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' ); - -}; - -// - -function CanvasRenderer() { - - console.error( 'THREE.CanvasRenderer has been removed' ); - -} - -// - -function JSONLoader() { - - console.error( 'THREE.JSONLoader has been removed.' ); - -} - -// - -const SceneUtils = { - - createMultiMaterialObject: function ( /* geometry, materials */ ) { - - console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); - - }, - - detach: function ( /* child, parent, scene */ ) { - - console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); - - }, - - attach: function ( /* child, scene, parent */ ) { - - console.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' ); - - } - -}; - -// - -function LensFlare() { - - console.error( 'THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js' ); - -} - -if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) { - - /* eslint-disable no-undef */ - __THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: { - revision: REVISION, - } } ) ); - /* eslint-enable no-undef */ - -} - -if ( typeof window !== 'undefined' ) { - - if ( window.__THREE__ ) { - - console.warn( 'WARNING: Multiple instances of Three.js being imported.' ); - - } else { - - window.__THREE__ = REVISION; - - } - -} - -export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightProbe, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, AxisHelper, BackSide, BasicDepthPacking, BasicShadowMap, BinaryTextureLoader, Bone, BooleanKeyframeTrack, BoundingBoxHelper, Box2, Box3, Box3Helper, BoxGeometry as BoxBufferGeometry, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasRenderer, CanvasTexture, CatmullRomCurve3, CineonToneMapping, CircleGeometry as CircleBufferGeometry, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, CompressedTexture, CompressedTextureLoader, ConeGeometry as ConeBufferGeometry, ConeGeometry, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubeUVRefractionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry as CylinderBufferGeometry, CylinderGeometry, Cylindrical, DataTexture, DataTexture2DArray, DataTexture3D, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry as DodecahedronBufferGeometry, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicBufferAttribute, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EdgesHelper, EllipseCurve, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry as ExtrudeBufferGeometry, ExtrudeGeometry, FaceColors, FileLoader, FlatShading, Float16BufferAttribute, Float32Attribute, Float32BufferAttribute, Float64Attribute, Float64BufferAttribute, FloatType, Fog, FogExp2, Font, FontLoader, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GammaEncoding, GreaterDepth, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, HemisphereLightProbe, IcosahedronGeometry as IcosahedronBufferGeometry, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, ImmediateRenderObject, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16Attribute, Int16BufferAttribute, Int32Attribute, Int32BufferAttribute, Int8Attribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, JSONLoader, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry as LatheBufferGeometry, LatheGeometry, Layers, LensFlare, LessDepth, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LinePieces, LineSegments, LineStrip, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearToneMapping, Loader, LoaderUtils, LoadingManager, LogLuvEncoding, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils as Math, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshFaceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiMaterial, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverDepth, NeverStencilFunc, NoBlending, NoColors, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry as OctahedronBufferGeometry, OctahedronGeometry, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, ParametricGeometry as ParametricBufferGeometry, ParametricGeometry, Particle, ParticleBasicMaterial, ParticleSystem, ParticleSystemMaterial, Path, PerspectiveCamera, Plane, PlaneGeometry as PlaneBufferGeometry, PlaneGeometry, PlaneHelper, PointCloud, PointCloudMaterial, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry as PolyhedronBufferGeometry, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDEncoding, RGBEEncoding, RGBEFormat, RGBFormat, RGBIntegerFormat, RGBM16Encoding, RGBM7Encoding, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry as RingBufferGeometry, RingGeometry, SRGB8_ALPHA8_ASTC_10x10_Format, SRGB8_ALPHA8_ASTC_10x5_Format, SRGB8_ALPHA8_ASTC_10x6_Format, SRGB8_ALPHA8_ASTC_10x8_Format, SRGB8_ALPHA8_ASTC_12x10_Format, SRGB8_ALPHA8_ASTC_12x12_Format, SRGB8_ALPHA8_ASTC_4x4_Format, SRGB8_ALPHA8_ASTC_5x4_Format, SRGB8_ALPHA8_ASTC_5x5_Format, SRGB8_ALPHA8_ASTC_6x5_Format, SRGB8_ALPHA8_ASTC_6x6_Format, SRGB8_ALPHA8_ASTC_8x5_Format, SRGB8_ALPHA8_ASTC_8x6_Format, SRGB8_ALPHA8_ASTC_8x8_Format, Scene, SceneUtils, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry as ShapeBufferGeometry, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, SmoothShading, Sphere, SphereGeometry as SphereBufferGeometry, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry as TetrahedronBufferGeometry, TetrahedronGeometry, TextGeometry as TextBufferGeometry, TextGeometry, Texture, TextureLoader, TorusGeometry as TorusBufferGeometry, TorusGeometry, TorusKnotGeometry as TorusKnotBufferGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry as TubeBufferGeometry, TubeGeometry, UVMapping, Uint16Attribute, Uint16BufferAttribute, Uint32Attribute, Uint32BufferAttribute, Uint8Attribute, Uint8BufferAttribute, Uint8ClampedAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShort565Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, Vertex, VertexColors, VideoTexture, WebGL1Renderer, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLMultisampleRenderTarget, WebGLRenderTarget, WebGLRenderTargetCube, WebGLRenderer, WebGLUtils, WireframeGeometry, WireframeHelper, WrapAroundEnding, XHRLoader, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, sRGBEncoding }; diff --git a/lib/tasks/server_files/three/examples/js/libs/draco/README.md b/lib/tasks/server_files/three/examples/js/libs/draco/README.md deleted file mode 100644 index 6dfa1d3a9..000000000 --- a/lib/tasks/server_files/three/examples/js/libs/draco/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Draco 3D Data Compression - -Draco is an open-source library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. - -[Website](https://google.github.io/draco/) | [GitHub](https://github.com/google/draco) - -## Contents - -This folder contains three utilities: - -* `draco_decoder.js` — Emscripten-compiled decoder, compatible with any modern browser. -* `draco_decoder.wasm` — WebAssembly decoder, compatible with newer browsers and devices. -* `draco_wasm_wrapper.js` — JavaScript wrapper for the WASM decoder. - -Each file is provided in two variations: - -* **Default:** Latest stable builds, tracking the project's [master branch](https://github.com/google/draco). -* **glTF:** Builds targeted by the [glTF mesh compression extension](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression), tracking the [corresponding Draco branch](https://github.com/google/draco/tree/gltf_2.0_draco_extension). - -Either variation may be used with `THREE.DRACOLoader`: - -```js -var dracoLoader = new THREE.DRACOLoader(); -dracoLoader.setDecoderPath('path/to/decoders/'); -dracoLoader.setDecoderConfig({type: 'js'}); // (Optional) Override detection of WASM support. -``` - -Further [documentation on GitHub](https://github.com/google/draco/tree/master/javascript/example#static-loading-javascript-decoder). - -## License - -[Apache License 2.0](https://github.com/google/draco/blob/master/LICENSE) diff --git a/lib/tasks/server_files/three/examples/js/libs/draco/draco_decoder.js b/lib/tasks/server_files/three/examples/js/libs/draco/draco_decoder.js deleted file mode 100644 index 1aa9ed197..000000000 --- a/lib/tasks/server_files/three/examples/js/libs/draco/draco_decoder.js +++ /dev/null @@ -1,52 +0,0 @@ - -var DracoDecoderModule = (function() { - var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; - if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; - return ( -function(DracoDecoderModule) { - DracoDecoderModule = DracoDecoderModule || {}; - -var Module=typeof DracoDecoderModule!=="undefined"?DracoDecoderModule:{};var isRuntimeInitialized=false;var isModuleParsed=false;Module["onRuntimeInitialized"]=function(){isRuntimeInitialized=true;if(isModuleParsed){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}};Module["onModuleParsed"]=function(){isModuleParsed=true;if(isRuntimeInitialized){if(typeof Module["onModuleLoaded"]==="function"){Module["onModuleLoaded"](Module)}}};function isVersionSupported(versionString){if(typeof versionString!=="string")return false;const version=versionString.split(".");if(version.length<2||version.length>3)return false;if(version[0]==1&&version[1]>=0&&version[1]<=3)return true;if(version[0]!=0||version[1]>10)return false;return true}Module["isVersionSupported"]=isVersionSupported;var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram="./this.program";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_HAS_NODE=false;var ENVIRONMENT_IS_SHELL=false;ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_HAS_NODE=typeof process==="object"&&typeof process.versions==="object"&&typeof process.versions.node==="string";ENVIRONMENT_IS_NODE=ENVIRONMENT_HAS_NODE&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;var nodeFS;var nodePath;if(ENVIRONMENT_IS_NODE){scriptDirectory=__dirname+"/";read_=function shell_read(filename,binary){var ret=tryParseAsDataURI(filename);if(ret){return binary?ret:ret.toString()}if(!nodeFS)nodeFS=require("fs");if(!nodePath)nodePath=require("path");filename=nodePath["normalize"](filename);return nodeFS["readFileSync"](filename,binary?null:"utf8")};readBinary=function readBinary(filename){var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}assert(ret.buffer);return ret};if(process["argv"].length>1){thisProgram=process["argv"][1].replace(/\\/g,"/")}arguments_=process["argv"].slice(2);process["on"]("uncaughtException",function(ex){if(!(ex instanceof ExitStatus)){throw ex}});process["on"]("unhandledRejection",abort);quit_=function(status){process["exit"](status)};Module["inspect"]=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL){if(typeof read!="undefined"){read_=function shell_read(f){var data=tryParseAsDataURI(f);if(data){return intArrayToString(data)}return read(f)}}readBinary=function readBinary(f){var data;data=tryParseAsDataURI(f);if(data){return data}if(typeof readbuffer==="function"){return new Uint8Array(readbuffer(f))}data=read(f,"binary");assert(typeof data==="object");return data};if(typeof scriptArgs!="undefined"){arguments_=scriptArgs}else if(typeof arguments!="undefined"){arguments_=arguments}if(typeof quit==="function"){quit_=function(status){quit(status)}}if(typeof print!=="undefined"){if(typeof console==="undefined")console={};console.log=print;console.warn=console.error=typeof printErr!=="undefined"?printErr:print}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1)}else{scriptDirectory=""}{read_=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}setWindowTitle=function(title){document.title=title}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var STACK_ALIGN=16;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end>_emscripten_get_heap_size()){abort()}HEAP32[DYNAMICTOP_PTR>>2]=end;return ret}function getNativeTypeSize(type){switch(type){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(type[type.length-1]==="*"){return 4}else if(type[0]==="i"){var bits=parseInt(type.substr(1));assert(bits%8===0,"getNativeTypeSize invalid bits "+bits+", type "+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}function convertJsFunctionToWasm(func,sig){return func}function addFunctionWasm(func,sig){var table=wasmTable;var ret=table.length;try{table.grow(1)}catch(err){if(!err instanceof RangeError){throw err}throw"Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."}try{table.set(ret,func)}catch(err){if(!err instanceof TypeError){throw err}assert(typeof sig!=="undefined","Missing signature argument to addFunction");var wrapped=convertJsFunctionToWasm(func,sig);table.set(ret,wrapped)}return ret}function removeFunctionWasm(index){}var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module["dynCall_"+sig].apply(null,[ptr].concat(args))}else{return Module["dynCall_"+sig].call(null,ptr)}}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime;if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];var WebAssembly={Memory:function(opts){return{buffer:new ArrayBuffer(opts["initial"]*65536),grow:function(amount){var ret=__growWasmMemory(amount);return ret}}},Table:function(opts){var ret=new Array(opts["initial"]);ret.grow=function(by){if(ret.length>=381+0){abort("Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH.")}ret.push(null)};ret.set=function(i,func){ret[i]=func};ret.get=function(i){return ret[i]};return ret},Module:function(binary){return{}},Instance:function(module,info){var decodeBase64=typeof atob==="function"?atob:function(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i>2]=0;q[c>>2]=0;q[c+4>>2]=0;d=dm(b);if(d>>>0<4294967280){a:{b:{if(d>>>0>=11){f=d+16&-16;e=Mm(f);q[c+8>>2]=f|-2147483648;q[c>>2]=e;q[c+4>>2]=d;break b}o[c+11|0]=d;e=c;if(!d){break a}}Cn(e,b,d)}o[d+e|0]=0;a=ga(a,c);if(o[c+11|0]<=-1){An(q[c>>2])}T=c+16|0;return(a|0)!=0}Pm();F()}function ga(a,b){var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;a=q[a+4>>2];if(a){h=r[b+11|0];i=h<<24>>24<0;h=i?q[b+4>>2]:h;l=i?q[b>>2]:b;while(1){b=a+16|0;g=r[a+27|0];i=g<<24>>24<0;j=i?q[a+20>>2]:g;m=j>>>0>>0;a:{b:{c:{d:{e:{f:{g=m?j:h;if(g){k=i?q[b>>2]:b;n=cm(l,k,g);if(n){break f}}if(h>>>0>>0){break a}if(!g){break d}k=i?q[b>>2]:b;break e}if((n|0)<=-1){break a}}b=cm(k,l,g);if(b){break c}}if(m){break b}return 1}if((b|0)<=-1){break b}return 1}a=a+4|0}a=q[a>>2];if(a){continue}break}}return 0}function ha(a,b){var p=0,r=0,s=0,t=0;p=T-16|0;T=p;q[p+12>>2]=0;q[p+8>>2]=0;q[p>>2]=0;q[p+4>>2]=0;r=dm(b);if(r>>>0<4294967280){a:{b:{if(r>>>0>=11){t=r+16&-16;s=Mm(t);q[p+8>>2]=t|-2147483648;q[p>>2]=s;q[p+4>>2]=r;break b}o[p+11|0]=r;s=p;if(!r){break a}}Cn(s,b,r)}o[r+s|0]=0;Vk(a,p,p+12|0);a=q[p+12>>2];if(o[p+11|0]<=-1){An(q[p>>2])}T=p+16|0;return a}Pm();F()}function ia(a,b,u){var v=0,w=0,x=0,y=0;v=T-32|0;T=v;q[v+24>>2]=0;q[v+16>>2]=0;q[v+20>>2]=0;w=dm(b);if(w>>>0<4294967280){a:{b:{if(w>>>0>=11){y=w+16&-16;x=Mm(y);q[v+24>>2]=y|-2147483648;q[v+16>>2]=x;q[v+20>>2]=w;break b}o[v+27|0]=w;x=v+16|0;if(!w){break a}}Cn(x,b,w)}o[w+x|0]=0;q[v+8>>2]=0;q[v>>2]=0;q[v+4>>2]=0;Wk(a,v+16|0,v);a=q[u>>2];if(a){q[u+4>>2]=a;An(a);q[u+8>>2]=0;q[u>>2]=0;q[u+4>>2]=0}q[u>>2]=q[v>>2];q[u+4>>2]=q[v+4>>2];q[u+8>>2]=q[v+8>>2];if(o[v+27|0]<=-1){An(q[v+16>>2])}T=v+32|0;return}Pm();F()}function ja(a,b){var u=0,z=0,A=0,B=0,C=0;u=T-32|0;T=u;q[u+24>>2]=0;q[u+28>>2]=0;q[u+16>>2]=0;q[u+8>>2]=0;q[u+12>>2]=0;z=dm(b);if(z>>>0<4294967280){a:{b:{if(z>>>0>=11){B=z+16&-16;A=Mm(B);q[u+16>>2]=B|-2147483648;q[u+8>>2]=A;q[u+12>>2]=z;break b}o[u+19|0]=z;A=u+8|0;if(!z){break a}}Cn(A,b,z)}o[z+A|0]=0;Xk(a,u+8|0,u+24|0);C=v[u+24>>3];if(o[u+19|0]<=-1){An(q[u+8>>2])}T=u+32|0;return C}Pm();F()}function ka(a,b,D){var E=0,G=0,H=0,I=0;E=T-16|0;T=E;q[E+8>>2]=0;q[E>>2]=0;q[E+4>>2]=0;G=dm(D);if(G>>>0<4294967280){a:{b:{if(G>>>0>=11){I=G+16&-16;H=Mm(I);q[E+8>>2]=I|-2147483648;q[E>>2]=H;q[E+4>>2]=G;break b}o[E+11|0]=G;H=E;if(!G){break a}}Cn(H,D,G)}o[G+H|0]=0;a=a+16|0;D=0;c:{if(!Yk(b,E,a)){break c}D=q[a>>2];if(o[a+11|0]<=-1){break c}D=a}if(o[E+11|0]<=-1){An(q[E>>2])}T=E+16|0;return D}Pm();F()}function la(a,b,D){var F=0,J=0,K=0,L=0;a:{if(q[a+12>>2]==(b|0)){break a}F=q[a>>2];K=a+4|0;J=q[K>>2];if((F|0)!=(J|0)){while(1){L=J+ -12|0;if(o[J+ -1|0]<=-1){An(q[L>>2])}J=L;if((J|0)!=(F|0)){continue}break}}q[a+12>>2]=b;q[K>>2]=F;J=q[b>>2];K=b+4|0;if((J|0)==(K|0)){break a}L=a+8|0;while(1){b=J+16|0;b:{if(q[L>>2]!=(F|0)){Rm(F,b);b=a+4|0;q[b>>2]=q[b>>2]+12;break b}ma(a,b)}F=q[J+4>>2];c:{if(!F){b=q[J+8>>2];if(q[b>>2]==(J|0)){break c}J=J+8|0;while(1){F=q[J>>2];J=F+8|0;b=q[F+8>>2];if((F|0)!=q[b>>2]){continue}break}break c}while(1){b=F;F=q[F>>2];if(F){continue}break}}if((b|0)==(K|0)){break a}F=q[a+4>>2];J=b;continue}}F=0;d:{if((D|0)<0){break d}b=q[a+4>>2];a=q[a>>2];if((b-a|0)/12>>>0<=D>>>0){break d}F=a+w(D,12)|0;if(o[F+11|0]>-1){break d}F=q[F>>2]}return F}function ma(a,b){var D=0,M=0,N=0,O=0,P=0;a:{b:{c:{N=q[a>>2];P=(q[a+4>>2]-N|0)/12|0;D=P+1|0;if(D>>>0<357913942){N=(q[a+8>>2]-N|0)/12|0;O=N<<1;D=N>>>0<178956970?O>>>0>>0?D:O:357913941;M=0;d:{if(!D){break d}if(D>>>0>=357913942){break c}M=Mm(w(D,12))}N=M+w(D,12)|0;b=Rm(M+w(P,12)|0,b);P=b+12|0;D=q[a+4>>2];M=q[a>>2];if((D|0)==(M|0)){break b}while(1){D=D+ -12|0;O=q[D+4>>2];b=b+ -12|0;q[b>>2]=q[D>>2];q[b+4>>2]=O;O=D+8|0;q[b+8>>2]=q[O>>2];q[D>>2]=0;q[D+4>>2]=0;q[O>>2]=0;if((D|0)!=(M|0)){continue}break}M=q[a+4>>2];D=q[a>>2];break a}bn();F()}ab(1040);F()}D=M}q[a>>2]=b;q[a+8>>2]=N;q[a+4>>2]=P;if((D|0)!=(M|0)){while(1){a=M+ -12|0;if(o[M+ -1|0]<=-1){An(q[a>>2])}M=a;if((a|0)!=(D|0)){continue}break}}if(D){An(D)}}function na(a){var b=0;ck(a);b=a+16|0;q[b>>2]=0;q[b+4>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+12>>2]=b;q[a+32>>2]=0;q[a+36>>2]=0;return a}function oa(a){var Q=0;Q=T-32|0;T=Q;hh(Q+8|0,a);a=q[Q+24>>2];if(o[Q+23|0]<=-1){An(q[Q+12>>2])}T=Q+32|0;return a}function pa(a,R,S){var U=0;U=T-16|0;T=U;ih(U,a,R,S);q[a+24>>2]=q[U>>2];Tm(a+28|0,U|4);a=a+24|0;if(o[U+15|0]<=-1){An(q[U+4>>2])}T=U+16|0;return a}function qa(a,R,S){var V=0;V=T-16|0;T=V;jh(V,a,R,S);q[a+24>>2]=q[V>>2];Tm(a+28|0,V|4);a=a+24|0;if(o[V+15|0]<=-1){An(q[V+4>>2])}T=V+16|0;return a}function ra(a,R){var S=0,W=0,X=0,Y=0;S=T-32|0;T=S;q[S+24>>2]=0;q[S+16>>2]=0;q[S+20>>2]=0;W=dm(R);if(W>>>0<4294967280){a:{b:{if(W>>>0>=11){Y=W+16&-16;X=Mm(Y);q[S+24>>2]=Y|-2147483648;q[S+16>>2]=X;q[S+20>>2]=W;break b}o[S+27|0]=W;X=S+16|0;if(!W){break a}}Cn(X,R,W)}o[W+X|0]=0;q[S+8>>2]=67108864;q[S>>2]=0;q[S+4>>2]=0;o[S+4|0]=0;q[S>>2]=1701667182;W=q[a+4>>2];R=-1;c:{if(!W){break c}W=Pk(W,S,S+16|0);R=-1;if(!W){break c}R=el(a,q[W+24>>2])}if(o[S+11|0]<=-1){An(q[S>>2])}if(o[S+27|0]<=-1){An(q[S+16>>2])}T=S+32|0;return R}Pm();F()}function sa(a,R,Z){var _=0,$=0,aa=0,ba=0;_=T-32|0;T=_;q[_+24>>2]=0;q[_+16>>2]=0;q[_+20>>2]=0;a:{ba=dm(R);if(ba>>>0<4294967280){b:{c:{if(ba>>>0>=11){$=ba+16&-16;aa=Mm($);q[_+24>>2]=$|-2147483648;q[_+16>>2]=aa;q[_+20>>2]=ba;break c}o[_+27|0]=ba;aa=_+16|0;if(!ba){break b}}Cn(aa,R,ba)}o[aa+ba|0]=0;q[_+8>>2]=0;q[_>>2]=0;q[_+4>>2]=0;$=dm(Z);if($>>>0>=4294967280){break a}d:{e:{if($>>>0>=11){R=$+16&-16;aa=Mm(R);q[_+8>>2]=R|-2147483648;q[_>>2]=aa;q[_+4>>2]=$;break e}o[_+11|0]=$;aa=_;if(!$){break d}}Cn(aa,Z,$)}o[$+aa|0]=0;Z=q[a+4>>2];R=-1;f:{if(!Z){break f}Z=Pk(Z,_+16|0,_);R=-1;if(!Z){break f}R=el(a,q[Z+24>>2])}a=R;if(o[_+11|0]<=-1){An(q[_>>2])}if(o[_+27|0]<=-1){An(q[_+16>>2])}T=_+32|0;return a}Pm();F()}Pm();F()}function ta(a,o,R){var Z=0,ca=0,da=0;Z=T-16|0;T=Z;ca=q[a+96>>2];q[Z+8>>2]=0;q[Z>>2]=0;q[Z+4>>2]=0;a=Mm(12);q[Z>>2]=a;q[Z+4>>2]=a;da=a+12|0;q[Z+8>>2]=da;ca=Cn(a,ca+w(o,12)|0,12)+12|0;q[Z+4>>2]=ca;o=q[R>>2];if(o){q[R+4>>2]=o;An(o);q[R+8>>2]=0;q[R>>2]=0;q[R+4>>2]=0}q[R>>2]=a;q[R+8>>2]=da;q[R+4>>2]=ca;T=Z+16|0;return 1}function ua(a,o){var R=0,ea=0;R=T-96|0;T=R;Dn(R+16|0,0,76);q[R+92>>2]=-1;q[R+8>>2]=0;q[R>>2]=0;q[R+4>>2]=0;a:{if(va(R+16|0,a,R)){a=q[o>>2];if(a){q[o+4>>2]=a;An(a);q[o+8>>2]=0;q[o>>2]=0;q[o+4>>2]=0}q[o>>2]=q[R>>2];q[o+4>>2]=q[R+4>>2];q[o+8>>2]=q[R+8>>2];q[R+8>>2]=0;q[R>>2]=0;q[R+4>>2]=0;ea=q[R+84>>2];break a}a=q[R>>2];if(!a){break a}q[R+4>>2]=a;An(a)}a=q[R+72>>2];if(a){An(a)}a=q[R+48>>2];if(a){q[R+52>>2]=a;An(a)}a=q[R+36>>2];if(a){q[R+40>>2]=a;An(a)}a=q[R+24>>2];if(a){q[R+28>>2]=a;An(a)}a=q[R+20>>2];q[R+20>>2]=0;if(a){wa(R+16|4,a)}T=R+96|0;return ea}function va(a,o,fa){var ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0;ja=T-16|0;T=ja;a:{if(!xa(a,o)){break a}ia=1;ha=q[o+96>>2];oa=o+100|0;ga=q[oa>>2];if((ha|0)==(ga|0)){break a}pa=a+12|0;qa=a+24|0;ra=a+36|0;na=fa+8|0;la=fa+4|0;while(1){if(!(q[q[a+56>>2]+(ma>>>3&536870908)>>2]>>>(ma&31)&1)){ia=w(ma,3);Jk(a,0,ia);sa=q[pa>>2];ka=q[a+8>>2];Jk(a,1,ia+1|0);ha=q[qa>>2];ga=q[a+20>>2];Jk(a,2,ia+2|0);ia=ha-ga>>2;ha=sa-ka|0;ga=ha>>2;ka=ia>>>0>ga>>>0;ka=q[ra>>2]-q[a+32>>2]>>2>>>0>(ka?ia:ga)>>>0?2:ka?1:ha?0:-1;b:{if(q[a+68>>2]<1){break b}ga=q[a+76>>2];q[ja+12>>2]=ga;ha=q[la>>2];c:{if(ha>>>0>2]){q[ha>>2]=ga;q[la>>2]=ha+4;break c}ya(fa,ja+12|0)}ga=ja;ia=q[((ka<<2)+a|0)+44>>2];ha=-1;d:{if((ia|0)<0){break d}ha=(ia>>>0)/3|0;ha=q[(q[q[a>>2]+96>>2]+w(ha,12)|0)+(ia-w(ha,3)<<2)>>2]}q[ga+8>>2]=ha;ga=q[la>>2];e:{if(ga>>>0>2]){q[ga>>2]=ha;q[la>>2]=ga+4;break e}ya(fa,ja+8|0)}ga=q[a+72>>2]+2|0;q[a+72>>2]=ga;if(!(ga&1)){break b}q[ja+4>>2]=ha;ga=q[la>>2];f:{if(ga>>>0>2]){q[ga>>2]=ha;q[la>>2]=ga+4;break f}ya(fa,ja+4|0)}q[a+72>>2]=q[a+72>>2]+1}za(a,ka,fa);ha=q[o+96>>2];ga=q[oa>>2]}ia=1;ma=ma+1|0;if(ma>>>0<(ga-ha|0)/12>>>0){continue}break}}T=ja+16|0;return ia}function wa(a,o){if(o){a=q[o+76>>2];if(a){q[o+80>>2]=a;An(a)}a=q[o- -64>>2];if(a){q[o+68>>2]=a;An(a)}a=q[o+48>>2];if(a){q[o+52>>2]=a;An(a)}a=q[o+24>>2];if(a){q[o+28>>2]=a;An(a)}a=q[o+12>>2];if(a){q[o+16>>2]=a;An(a)}a=q[o>>2];if(a){q[o+4>>2]=a;An(a)}An(o)}}function xa(a,fa){var ta=0,ua=0,va=0;ta=T-16|0;T=ta;q[a+68>>2]=0;q[a+72>>2]=0;q[a>>2]=fa;Ik(ta+8|0,fa);ua=q[ta+8>>2];q[ta+8>>2]=0;va=q[a+4>>2];q[a+4>>2]=ua;a:{if(!va){q[ta+8>>2]=0;break a}ua=a+4|0;wa(ua,va);va=q[ta+8>>2];q[ta+8>>2]=0;if(va){wa(ta+8|0,va)}ua=q[ua>>2]}if(ua){ua=q[fa+100>>2];fa=q[fa+96>>2];o[ta+7|0]=0;bb(a+56|0,(ua-fa|0)/12|0,ta+7|0);a=1}else{a=0}T=ta+16|0;return a}function ya(a,o){var T=0,fa=0,wa=0,xa=0,ya=0,za=0;a:{wa=q[a>>2];ya=q[a+4>>2]-wa|0;T=ya>>2;fa=T+1|0;if(fa>>>0<1073741824){za=T<<2;T=q[a+8>>2]-wa|0;xa=T>>1;fa=T>>2>>>0<536870911?xa>>>0>>0?fa:xa:1073741823;T=0;b:{if(!fa){break b}if(fa>>>0>=1073741824){break a}T=Mm(fa<<2)}xa=za+T|0;q[xa>>2]=q[o>>2];o=T+(fa<<2)|0;fa=xa+4|0;if((ya|0)>=1){Cn(T,wa,ya)}q[a>>2]=T;q[a+8>>2]=o;q[a+4>>2]=fa;if(wa){An(wa)}return}bn();F()}ab(1040);F()}function za(a,o,Aa){var Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;Da=T-16|0;T=Da;q[a+68>>2]=q[a+68>>2]+1;Ba=w(o,12)+a|0;Ba=q[Ba+12>>2]-q[Ba+8>>2]|0;if((Ba|0)>=1){Ia=Ba>>2;Ba=q[((o<<2)+a|0)+44>>2];Ga=Aa+8|0;Ea=Aa+4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;break b}o=o+2|0;break b}Ba=-1;if((o|0)==-1){break a}Ba=o+1|0;o=(Ba>>>0)%3|0?Ba:o+ -2|0}Ba=-1;if((o|0)==-1){break a}Ba=q[q[q[a+4>>2]+12>>2]+(o<<2)>>2]}Ha=Ha+1|0;if((Ha|0)<(Ia|0)){continue}break}}T=Da+16|0}function Aa(a,o,Aa){var Ja=0,Ka=0,La=0;a:{if(t[a+80>>2]>65535){break a}Ka=q[a+96>>2];a=q[a+100>>2]-Ka|0;La=(a|0)/12|0;if((w(La,6)|0)!=(o|0)){break a}if(!a){return 1}a=0;while(1){o=w(a,6)+Aa|0;Ja=w(a,12)+Ka|0;p[o>>1]=q[Ja>>2];p[o+2>>1]=q[Ja+4>>2];p[o+4>>1]=q[Ja+8>>2];Ja=1;a=a+1|0;if(a>>>0>>0){continue}break}}return Ja}function Ba(a,o,Aa){var Ma=0,Na=0,Oa=0;Na=q[a+96>>2];a=q[a+100>>2]-Na|0;Oa=(a|0)/12|0;if((a|0)==(o|0)){if(!o){return 1}a=0;while(1){Ma=w(a,12);o=Ma+Aa|0;Ma=Ma+Na|0;q[o>>2]=q[Ma>>2];q[o+4>>2]=q[Ma+4>>2];q[o+8>>2]=q[Ma+8>>2];Ma=1;a=a+1|0;if(a>>>0>>0){continue}break}}return Ma}function Ca(a,Aa,Pa){var Qa=0,Ra=0,Sa=0,Ta=0;Qa=T-32|0;T=Qa;Ra=o[a+24|0];Ta=q[259];q[Qa+24>>2]=q[258];q[Qa+28>>2]=Ta;Ta=q[257];q[Qa+16>>2]=q[256];q[Qa+20>>2]=Ta;a:{if(Da(a,Aa,Ra,Qa+16|0)){a=0;q[Qa+8>>2]=0;q[Qa>>2]=0;q[Qa+4>>2]=0;Aa=0;if(Ra){if((Ra|0)<=-1){break a}Aa=Ra<<2;Sa=Mm(Aa);q[Qa>>2]=Sa;a=(Ra<<2)+Sa|0;q[Qa+8>>2]=a;Cn(Sa,Qa+16|0,Aa);q[Qa+4>>2]=a;Aa=a}Ra=q[Pa>>2];if(Ra){q[Pa+4>>2]=Ra;An(Ra);q[Pa+8>>2]=0;q[Pa>>2]=0;q[Pa+4>>2]=0;Aa=q[Qa+4>>2];Sa=q[Qa>>2];a=q[Qa+8>>2]}q[Pa>>2]=Sa;q[Pa+8>>2]=a;q[Pa+4>>2]=Aa;Sa=1}T=Qa+32|0;return Sa}bn();F()}function Da(a,Aa,Pa,Ua){var Va=0,Wa=0,Xa=x(0),Ya=0,Za=0;a:{b:{if(!Ua){break b}Va=q[a+28>>2]+ -1|0;if(Va>>>0>10){break b}c:{switch(Va-1|0){default:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;Ya=r[a+32|0];while(1){Xa=x(o[Aa|0]);u[(Wa<<2)+Ua>>2]=Ya?x(Xa/x(127)):Xa;Aa=Aa+1|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 0:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;Ya=r[a+32|0];while(1){Xa=x(r[Aa|0]);u[(Wa<<2)+Ua>>2]=Ya?x(Xa/x(255)):Xa;Aa=Aa+1|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 1:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;Ya=r[a+32|0];while(1){Xa=x(p[Aa>>1]);u[(Wa<<2)+Ua>>2]=Ya?x(Xa/x(32767)):Xa;Aa=Aa+2|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 2:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;Ya=r[a+32|0];while(1){Xa=x(s[Aa>>1]);u[(Wa<<2)+Ua>>2]=Ya?x(Xa/x(65535)):Xa;Aa=Aa+2|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 3:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;Ya=r[a+32|0];while(1){Xa=x(q[Aa>>2]);u[(Wa<<2)+Ua>>2]=Ya?x(Xa*x(4.656612873077393e-10)):Xa;Aa=Aa+4|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 4:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;Ya=r[a+32|0];while(1){Xa=x(t[Aa>>2]);u[(Wa<<2)+Ua>>2]=Ya?x(Xa*x(2.3283064365386963e-10)):Xa;Aa=Aa+4|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 5:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;Ya=r[a+32|0];while(1){Xa=x(+t[Aa>>2]+4294967296*+q[Aa+4>>2]);u[(Wa<<2)+Ua>>2]=Ya?x(Xa*x(1.0842021724855044e-19)):Xa;Aa=Aa+8|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 6:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;Ya=r[a+32|0];while(1){Xa=x(+t[Aa>>2]+4294967296*+t[Aa+4>>2]);u[(Wa<<2)+Ua>>2]=Ya?x(Xa*x(5.421010862427522e-20)):Xa;Aa=Aa+8|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 7:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;while(1){q[(Wa<<2)+Ua>>2]=q[Aa>>2];Aa=Aa+4|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 8:Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;while(1){u[(Wa<<2)+Ua>>2]=v[Aa>>3];Aa=Aa+8|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}break a;case 9:break c}}Za=1;Va=o[a+24|0];if(((Va|0)>(Pa|0)?Pa:Va)<<24>>24>=1){Va=q[q[a>>2]>>2];Aa=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],Aa,0)|0;Aa=Va+Aa|0;while(1){u[(Wa<<2)+Ua>>2]=r[Aa|0]?x(1):x(0);Aa=Aa+1|0;Wa=Wa+1|0;Va=o[a+24|0];if((Wa|0)<((Va|0)>(Pa|0)?Pa:Va)<<24>>24){continue}break}}if((Va|0)>=(Pa|0)){break b}Dn((Va<<2)+Ua|0,0,Pa-Va<<2)}return Za}Dn((Va<<2)+Ua|0,0,Pa-Va<<2);return 1}function Ea(a,Aa,Pa){var Ua=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0;Ua=T-16|0;T=Ua;bb=q[a+80>>2];cb=o[Aa+24|0];a=q[259];q[Ua+8>>2]=q[258];q[Ua+12>>2]=a;a=q[257];q[Ua>>2]=q[256];q[Ua+4>>2]=a;a=w(bb,cb);$a=q[Pa>>2];_a=q[Pa+4>>2]-$a>>2;a:{if(a>>>0>_a>>>0){Fa(Pa,a-_a|0);break a}if(a>>>0>=_a>>>0){break a}q[Pa+4>>2]=$a+(a<<2)}b:{if(!bb){a=1;break b}$a=0;db=Aa+68|0;eb=(cb|0)<1;while(1){a=ab;_a=Aa;if(!r[_a+84|0]){a=q[q[db>>2]+(ab<<2)>>2]}if(!Da(_a,a,o[Aa+24|0],Ua)){a=0;break b}if(!eb){_a=q[Pa>>2];a=0;while(1){q[_a+($a<<2)>>2]=q[(a<<2)+Ua>>2];$a=$a+1|0;a=a+1|0;if((cb|0)!=(a|0)){continue}break}}a=1;ab=ab+1|0;if((bb|0)!=(ab|0)){continue}break}}T=Ua+16|0;return a}function Fa(a,o){var Aa=0,Pa=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0;Pa=q[a+8>>2];fb=a+4|0;Aa=q[fb>>2];if(Pa-Aa>>2>>>0>=o>>>0){a=o<<2;kb=fb,lb=Dn(Aa,0,a)+a|0,q[kb>>2]=lb;return}a:{fb=q[a>>2];hb=Aa-fb|0;Aa=hb>>2;gb=Aa+o|0;if(gb>>>0<1073741824){jb=Aa<<2;Pa=Pa-fb|0;Aa=Pa>>1;Pa=Pa>>2>>>0<536870911?Aa>>>0>>0?gb:Aa:1073741823;Aa=0;b:{if(!Pa){break b}if(Pa>>>0>=1073741824){break a}ib=Mm(Pa<<2);Aa=ib}Dn(jb+Aa|0,0,o<<2);o=Aa+(gb<<2)|0;gb=Aa+(Pa<<2)|0;if((hb|0)>=1){Cn(ib,fb,hb)}q[a>>2]=Aa;q[a+8>>2]=gb;q[a+4>>2]=o;if(fb){An(fb)}return}bn();F()}ab(1040);F()}function Ga(a,mb,nb){var ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0;pb=T-16|0;T=pb;sb=q[a+80>>2];rb=o[mb+24|0];qb=w(sb,rb);a:{a=q[mb+28>>2];b:{if(!(!r[mb+84|0]|((a|0)!=2?(a|0)!=1:0))){rb=q[mb+48>>2];mb=q[q[mb>>2]>>2];q[pb+8>>2]=0;q[pb>>2]=0;q[pb+4>>2]=0;a=0;if(qb){if((qb|0)<=-1){break a}a=Mm(qb);q[pb>>2]=a;ob=a+qb|0;q[pb+8>>2]=ob;Cn(a,mb+rb|0,qb);q[pb+4>>2]=ob}mb=q[nb>>2];if(mb){q[nb+4>>2]=mb;An(mb);q[nb+8>>2]=0;q[nb>>2]=0;q[nb+4>>2]=0}q[nb>>2]=a;q[nb+8>>2]=ob;q[nb+4>>2]=ob;ob=1;break b}q[pb+8>>2]=0;q[pb>>2]=0;q[pb+4>>2]=0;if(rb){if((rb|0)<=-1){break a}ob=Mm(rb);q[pb>>2]=ob;q[pb+4>>2]=ob;q[pb+8>>2]=ob+rb;a=rb;while(1){o[ob|0]=0;ob=q[pb+4>>2]+1|0;q[pb+4>>2]=ob;a=a+ -1|0;if(a){continue}break}}ob=q[nb>>2];a=q[nb+4>>2]-ob|0;c:{if(qb>>>0>a>>>0){Ha(nb,qb-a|0);break c}if(qb>>>0>=a>>>0){break c}q[nb+4>>2]=ob+qb}d:{if(!sb){ob=1;break d}a=0;tb=mb+68|0;ub=(rb|0)<1;qb=0;while(1){ob=qb;vb=mb;if(!r[mb+84|0]){ob=q[q[tb>>2]+(qb<<2)>>2]}if(!Ia(vb,ob,o[mb+24|0],q[pb>>2])){ob=0;break d}ob=0;if(!ub){while(1){o[q[nb>>2]+a|0]=r[q[pb>>2]+ob|0];a=a+1|0;ob=ob+1|0;if((rb|0)!=(ob|0)){continue}break}}ob=1;qb=qb+1|0;if((sb|0)!=(qb|0)){continue}break}}a=q[pb>>2];if(!a){break b}q[pb+4>>2]=a;An(a)}T=pb+16|0;return ob}bn();F()}function Ha(a,mb){var nb=0,wb=0,xb=0,yb=0,zb=0,Ab=0;a:{wb=q[a+8>>2];xb=a+4|0;nb=q[xb>>2];b:{if(wb-nb>>>0>=mb>>>0){while(1){o[nb|0]=0;nb=q[xb>>2]+1|0;q[xb>>2]=nb;mb=mb+ -1|0;if(mb){continue}break b}}yb=q[a>>2];zb=nb-yb|0;nb=zb+mb|0;if((nb|0)<=-1){break a}xb=0;wb=wb-yb|0;Ab=wb<<1;wb=wb>>>0<1073741823?Ab>>>0>>0?nb:Ab:2147483647;if(wb){xb=Mm(wb)}nb=xb+zb|0;Dn(nb,0,mb);wb=wb+xb|0;while(1){nb=nb+1|0;mb=mb+ -1|0;if(mb){continue}break}if((zb|0)>=1){Cn(xb,yb,zb)}q[a>>2]=xb;q[a+8>>2]=wb;q[a+4>>2]=nb;if(!yb){break b}An(yb)}return}bn();F()}function Ia(a,mb,Bb,Cb){var Db=0,Eb=0,Fb=0,Gb=0,Hb=x(0),Ib=0;a:{b:{if(!Cb){break b}Db=q[a+28>>2]+ -1|0;if(Db>>>0>10){break b}c:{d:{e:{switch(Db-1|0){default:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=r[mb|0];mb=mb+1|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}break a;case 0:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=r[mb|0];mb=mb+1|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}break a;case 1:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=r[mb|0];mb=mb+2|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}break a;case 2:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=r[mb|0];mb=mb+2|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}break a;case 3:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=q[mb>>2];mb=mb+4|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}break a;case 4:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=q[mb>>2];mb=mb+4|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}break a;case 5:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=q[mb>>2];mb=mb+8|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}break a;case 6:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=q[mb>>2];mb=mb+8|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}break a;case 7:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24<1){break c}Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){Db=Cb+Eb|0;Hb=u[mb>>2];f:{if(x(y(Hb))(Bb|0)?Bb:Db)<<24>>24){continue}break}break c;case 8:Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24<1){break d}Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){Db=Cb+Eb|0;Ib=v[mb>>3];g:{if(y(Ib)<2147483648){Gb=~~Ib;break g}Gb=-2147483648}o[Db|0]=Gb;mb=mb+8|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}break d;case 9:break e}}Fb=1;Db=o[a+24|0];if(((Db|0)>(Bb|0)?Bb:Db)<<24>>24>=1){Db=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Db+mb|0;while(1){o[Cb+Eb|0]=r[mb|0];mb=mb+1|0;Eb=Eb+1|0;Db=o[a+24|0];if((Eb|0)<((Db|0)>(Bb|0)?Bb:Db)<<24>>24){continue}break}}if((Db|0)>=(Bb|0)){break b}Dn(Cb+Db|0,0,Bb-Db|0);break b}if((Db|0)>=(Bb|0)){break b}break a}if((Db|0)>=(Bb|0)){break b}break a}return Fb}Dn(Cb+Db|0,0,Bb-Db|0);return 1}function Ja(a,mb,Bb){var Cb=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0;Jb=T-16|0;T=Jb;Mb=q[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break b}q[Jb+4>>2]=a;An(a)}T=Jb+16|0;return Cb}bn();F()}function Ka(a,mb,Bb,Qb){var Rb=0,Sb=0,Tb=0,Ub=0,Vb=x(0),Wb=0;a:{b:{if(!Qb){break b}Rb=q[a+28>>2]+ -1|0;if(Rb>>>0>10){break b}c:{d:{e:{switch(Rb-1|0){default:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=r[mb|0];mb=mb+1|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(Bb|0)){break b}break a;case 0:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=r[mb|0];mb=mb+1|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(Bb|0)){break b}break a;case 1:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=r[mb|0];mb=mb+2|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(Bb|0)){break b}break a;case 2:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=r[mb|0];mb=mb+2|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(Bb|0)){break b}break a;case 3:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=q[mb>>2];mb=mb+4|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(Bb|0)){break b}break a;case 4:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=q[mb>>2];mb=mb+4|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(Bb|0)){break b}break a;case 5:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=q[mb>>2];mb=mb+8|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(Bb|0)){break b}break a;case 6:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=q[mb>>2];mb=mb+8|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(Bb|0)){break b}break a;case 7:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24<1){break c}Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){Rb=Qb+Sb|0;Vb=u[mb>>2];f:{if(Vb=x(0)){Ub=~~Vb>>>0;break f}Ub=0}o[Rb|0]=Ub;mb=mb+4|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}break c;case 8:Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24<1){break d}Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){Rb=Qb+Sb|0;Wb=v[mb>>3];g:{if(Wb<4294967296&Wb>=0){Ub=~~Wb>>>0;break g}Ub=0}o[Rb|0]=Ub;mb=mb+8|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}break d;case 9:break e}}Tb=1;Rb=o[a+24|0];if(((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24>=1){Rb=q[q[a>>2]>>2];mb=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],mb,0)|0;mb=Rb+mb|0;while(1){o[Qb+Sb|0]=r[mb|0];mb=mb+1|0;Sb=Sb+1|0;Rb=o[a+24|0];if((Sb|0)<((Rb|0)>(Bb|0)?Bb:Rb)<<24>>24){continue}break}}if((Rb|0)>=(B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=0;break d}if(!bc){Xb=q[Bb>>2];a=0;cc=q[Qb>>2];while(1){p[Xb+(Yb<<1)>>1]=s[cc+(a<<1)>>1];Yb=Yb+1|0;a=a+1|0;if((_b|0)!=(a|0)){continue}break}}a=1;$b=$b+1|0;if((ac|0)!=($b|0)){continue}break}}mb=q[Qb>>2];if(!mb){break b}q[Qb+4>>2]=mb;An(mb)}T=Qb+16|0;return a}bn();F()}function Ma(a,o){var mb=0,Bb=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0;Bb=q[a+8>>2];dc=a+4|0;mb=q[dc>>2];if(Bb-mb>>1>>>0>=o>>>0){a=o<<1;ic=dc,jc=Dn(mb,0,a)+a|0,q[ic>>2]=jc;return}a:{dc=q[a>>2];fc=mb-dc|0;mb=fc>>1;ec=mb+o|0;if((ec|0)>-1){hc=mb<<1;Bb=Bb-dc|0;Bb=Bb>>1>>>0<1073741823?Bb>>>0>>0?ec:Bb:2147483647;mb=0;b:{if(!Bb){break b}if((Bb|0)<=-1){break a}gc=Mm(Bb<<1);mb=gc}Dn(hc+mb|0,0,o<<1);o=mb+(ec<<1)|0;ec=mb+(Bb<<1)|0;if((fc|0)>=1){Cn(gc,dc,fc)}q[a>>2]=mb;q[a+8>>2]=ec;q[a+4>>2]=o;if(dc){An(dc)}return}bn();F()}ab(1040);F()}function Na(a,kc,lc,mc){var nc=0,oc=0,pc=0,qc=0,rc=x(0),sc=0;a:{b:{if(!mc){break b}nc=q[a+28>>2]+ -1|0;if(nc>>>0>10){break b}c:{d:{e:{switch(nc-1|0){default:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=o[kc|0];kc=kc+1|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}break a;case 0:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=r[kc|0];kc=kc+1|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}break a;case 1:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=s[kc>>1];kc=kc+2|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}break a;case 2:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=s[kc>>1];kc=kc+2|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}break a;case 3:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=q[kc>>2];kc=kc+4|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}break a;case 4:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=q[kc>>2];kc=kc+4|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}break a;case 5:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=q[kc>>2];kc=kc+8|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}break a;case 6:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=q[kc>>2];kc=kc+8|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}break a;case 7:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24<1){break c}nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){nc=(oc<<1)+mc|0;rc=u[kc>>2];f:{if(x(y(rc))>1]=qc;kc=kc+4|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}break c;case 8:pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24<1){break d}nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){nc=(oc<<1)+mc|0;sc=v[kc>>3];g:{if(y(sc)<2147483648){qc=~~sc;break g}qc=-2147483648}p[nc>>1]=qc;kc=kc+8|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}break d;case 9:break e}}pc=1;nc=o[a+24|0];if(((nc|0)>(lc|0)?lc:nc)<<24>>24>=1){nc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=nc+kc|0;while(1){p[(oc<<1)+mc>>1]=r[kc|0];kc=kc+1|0;oc=oc+1|0;nc=o[a+24|0];if((oc|0)<((nc|0)>(lc|0)?lc:nc)<<24>>24){continue}break}}if((nc|0)>=(lc|0)){break b}Dn((nc<<1)+mc|0,0,lc-nc<<1);break b}if((nc|0)>=(lc|0)){break b}break a}if((nc|0)>=(lc|0)){break b}break a}return pc}Dn((nc<<1)+mc|0,0,lc-nc<<1);return 1}function Oa(a,kc,lc){var mc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0;mc=T-16|0;T=mc;yc=q[a+80>>2];wc=o[kc+24|0];a=w(yc,wc);a:{tc=q[kc+28>>2];b:{if(!(!r[kc+84|0]|((tc|0)!=4?(tc|0)!=3:0))){xc=q[kc+48>>2];tc=q[q[kc>>2]>>2];q[mc+8>>2]=0;q[mc>>2]=0;q[mc+4>>2]=0;kc=0;a=a<<1;if(a){if((a|0)<=-1){break a}uc=Mm(a);q[mc>>2]=uc;vc=(a>>1<<1)+uc|0;q[mc+8>>2]=vc;kc=Cn(uc,tc+xc|0,a)+a|0;q[mc+4>>2]=kc}a=q[lc>>2];if(a){q[lc+4>>2]=a;An(a);q[lc+8>>2]=0;q[lc>>2]=0;q[lc+4>>2]=0}q[lc>>2]=uc;q[lc+8>>2]=vc;q[lc+4>>2]=kc;a=1;break b}q[mc+8>>2]=0;q[mc>>2]=0;q[mc+4>>2]=0;if(wc){if((wc|0)<=-1){break a}tc=wc<<1;uc=Mm(tc);q[mc>>2]=uc;vc=tc+uc|0;q[mc+8>>2]=vc;Dn(uc,0,tc);q[mc+4>>2]=vc}uc=q[lc>>2];tc=q[lc+4>>2]-uc>>1;c:{if(a>>>0>tc>>>0){Ma(lc,a-tc|0);break c}if(a>>>0>=tc>>>0){break c}q[lc+4>>2]=uc+(a<<1)}d:{if(!yc){a=1;break d}uc=0;vc=kc+68|0;zc=(wc|0)<1;while(1){a=xc;tc=kc;if(!r[kc+84|0]){a=q[q[vc>>2]+(xc<<2)>>2]}if(!Pa(tc,a,o[kc+24|0],q[mc>>2])){a=0;break d}if(!zc){tc=q[lc>>2];a=0;Ac=q[mc>>2];while(1){p[tc+(uc<<1)>>1]=s[Ac+(a<<1)>>1];uc=uc+1|0;a=a+1|0;if((wc|0)!=(a|0)){continue}break}}a=1;xc=xc+1|0;if((yc|0)!=(xc|0)){continue}break}}kc=q[mc>>2];if(!kc){break b}q[mc+4>>2]=kc;An(kc)}T=mc+16|0;return a}bn();F()}function Pa(a,kc,lc,Bc){var Cc=0,Dc=0,Ec=0,Fc=0,Gc=x(0),Hc=0;a:{b:{if(!Bc){break b}Cc=q[a+28>>2]+ -1|0;if(Cc>>>0>10){break b}c:{d:{e:{switch(Cc-1|0){default:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=o[kc|0];kc=kc+1|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}break a;case 0:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=r[kc|0];kc=kc+1|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}break a;case 1:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=s[kc>>1];kc=kc+2|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}break a;case 2:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=s[kc>>1];kc=kc+2|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}break a;case 3:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=q[kc>>2];kc=kc+4|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}break a;case 4:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=q[kc>>2];kc=kc+4|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}break a;case 5:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=q[kc>>2];kc=kc+8|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}break a;case 6:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=q[kc>>2];kc=kc+8|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}break a;case 7:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24<1){break c}Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){Cc=(Dc<<1)+Bc|0;Gc=u[kc>>2];f:{if(Gc=x(0)){Fc=~~Gc>>>0;break f}Fc=0}p[Cc>>1]=Fc;kc=kc+4|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}break c;case 8:Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24<1){break d}Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){Cc=(Dc<<1)+Bc|0;Hc=v[kc>>3];g:{if(Hc<4294967296&Hc>=0){Fc=~~Hc>>>0;break g}Fc=0}p[Cc>>1]=Fc;kc=kc+8|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}break d;case 9:break e}}Ec=1;Cc=o[a+24|0];if(((Cc|0)>(lc|0)?lc:Cc)<<24>>24>=1){Cc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Cc+kc|0;while(1){p[(Dc<<1)+Bc>>1]=r[kc|0];kc=kc+1|0;Dc=Dc+1|0;Cc=o[a+24|0];if((Dc|0)<((Cc|0)>(lc|0)?lc:Cc)<<24>>24){continue}break}}if((Cc|0)>=(lc|0)){break b}Dn((Cc<<1)+Bc|0,0,lc-Cc<<1);break b}if((Cc|0)>=(lc|0)){break b}break a}if((Cc|0)>=(lc|0)){break b}break a}return Ec}Dn((Cc<<1)+Bc|0,0,lc-Cc<<1);return 1}function Qa(a,kc,lc){var Bc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0;Bc=T-16|0;T=Bc;Nc=q[a+80>>2];Kc=o[kc+24|0];Jc=w(Nc,Kc);a:{a=q[kc+28>>2];b:{if(!(!r[kc+84|0]|((a|0)!=6?(a|0)!=5:0))){Mc=q[kc+48>>2];Kc=q[q[kc>>2]>>2];q[Bc+8>>2]=0;q[Bc>>2]=0;q[Bc+4>>2]=0;a=0;kc=Jc<<2;c:{if(!kc){break c}a=kc>>2;if(a>>>0>=1073741824){break a}Ic=Mm(kc);q[Bc>>2]=Ic;q[Bc+4>>2]=Ic;Lc=(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[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=o[kc|0];kc=kc+1|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}break a;case 0:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24>=1){Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=r[kc|0];kc=kc+1|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}break a;case 1:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24>=1){Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=p[kc>>1];kc=kc+2|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}break a;case 2:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24>=1){Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=s[kc>>1];kc=kc+2|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}break a;case 3:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24>=1){Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=q[kc>>2];kc=kc+4|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}break a;case 4:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24>=1){Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=q[kc>>2];kc=kc+4|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}break a;case 5:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24>=1){Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=q[kc>>2];kc=kc+8|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}break a;case 6:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24>=1){Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=q[kc>>2];kc=kc+8|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}break a;case 7:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24<1){break c}Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){Rc=(Sc<<2)+Qc|0;Vc=u[kc>>2];f:{if(x(y(Vc))>2]=Uc;kc=kc+4|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}break c;case 8:Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24<1){break d}Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){Rc=(Sc<<2)+Qc|0;Wc=v[kc>>3];g:{if(y(Wc)<2147483648){Uc=~~Wc;break g}Uc=-2147483648}q[Rc>>2]=Uc;kc=kc+8|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}break d;case 9:break e}}Tc=1;Rc=o[a+24|0];if(((Rc|0)>(lc|0)?lc:Rc)<<24>>24>=1){Rc=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=Rc+kc|0;while(1){q[(Sc<<2)+Qc>>2]=r[kc|0];kc=kc+1|0;Sc=Sc+1|0;Rc=o[a+24|0];if((Sc|0)<((Rc|0)>(lc|0)?lc:Rc)<<24>>24){continue}break}}if((Rc|0)>=(lc|0)){break b}Dn((Rc<<2)+Qc|0,0,lc-Rc<<2);break b}if((Rc|0)>=(lc|0)){break b}break a}if((Rc|0)>=(lc|0)){break b}break a}return Tc}Dn((Rc<<2)+Qc|0,0,lc-Rc<<2);return 1}function Sa(a,kc,lc){var Qc=0,Xc=0,Yc=0,Zc=0,_c=0,$c=0,ad=0,bd=0,cd=0;Qc=T-16|0;T=Qc;ad=q[a+80>>2];Zc=o[kc+24|0];Yc=w(ad,Zc);a:{a=q[k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();F()}function Ta(a,kc,lc,dd){var ed=0,fd=0,gd=0,hd=0,id=x(0),jd=0;a:{b:{if(!dd){break b}ed=q[a+28>>2]+ -1|0;if(ed>>>0>10){break b}c:{d:{e:{switch(ed-1|0){default:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=o[kc|0];kc=kc+1|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}break a;case 0:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=r[kc|0];kc=kc+1|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}break a;case 1:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=p[kc>>1];kc=kc+2|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}break a;case 2:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=s[kc>>1];kc=kc+2|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}break a;case 3:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=q[kc>>2];kc=kc+4|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}break a;case 4:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=q[kc>>2];kc=kc+4|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}break a;case 5:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=q[kc>>2];kc=kc+8|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}break a;case 6:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=q[kc>>2];kc=kc+8|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}break a;case 7:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24<1){break c}ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){ed=(fd<<2)+dd|0;id=u[kc>>2];f:{if(id=x(0)){hd=~~id>>>0;break f}hd=0}q[ed>>2]=hd;kc=kc+4|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}break c;case 8:gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24<1){break d}ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){ed=(fd<<2)+dd|0;jd=v[kc>>3];g:{if(jd<4294967296&jd>=0){hd=~~jd>>>0;break g}hd=0}q[ed>>2]=hd;kc=kc+8|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}break d;case 9:break e}}gd=1;ed=o[a+24|0];if(((ed|0)>(lc|0)?lc:ed)<<24>>24>=1){ed=q[q[a>>2]>>2];kc=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],kc,0)|0;kc=ed+kc|0;while(1){q[(fd<<2)+dd>>2]=r[kc|0];kc=kc+1|0;fd=fd+1|0;ed=o[a+24|0];if((fd|0)<((ed|0)>(lc|0)?lc:ed)<<24>>24){continue}break}}if((ed|0)>=(lc|0)){break b}Dn((ed<<2)+dd|0,0,lc-ed<<2);break b}if((ed|0)>=(lc|0)){break b}break a}if((ed|0)>=(lc|0)){break b}break a}return gd}Dn((ed<<2)+dd|0,0,lc-ed<<2);return 1}function Ua(a,kc,lc,dd,kd){var ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0;md=T-16|0;T=md;lc=lc+ -1|0;a:{if(lc>>>0>8){break a}b:{switch(lc-1|0){default:ld=Va(a,kc,dd,kd);break a;case 1:ld=Wa(a,kc,dd,kd);break a;case 3:ld=Xa(a,kc,dd,kd);break a;case 0:ld=Ya(a,kc,dd,kd);break a;case 2:ld=Za(a,kc,dd,kd);break a;case 4:ld=_a(a,kc,dd,kd);break a;case 5:case 6:break a;case 7:break b}}nd=q[a+80>>2];od=o[kc+24|0];pd=od<<2;if((w(nd,pd)|0)!=(dd|0)){break a}a=0;lc=q[259];q[md+8>>2]=q[258];q[md+12>>2]=lc;lc=q[257];q[md>>2]=q[256];q[md+4>>2]=lc;if(!nd){ld=1;break a}qd=kc+68|0;rd=(od|0)<1;lc=0;while(1){dd=lc;ld=kc;if(!r[kc+84|0]){dd=q[q[qd>>2]+(lc<<2)>>2]}if(!Da(ld,dd,o[kc+24|0],md)){ld=0;break a}if(!rd){Cn((a<<2)+kd|0,md,pd);a=a+od|0}ld=1;lc=lc+1|0;if((nd|0)!=(lc|0)){continue}break}}T=md+16|0;return ld}function Va(a,kc,lc,dd){var kd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0;sd=T-16|0;T=sd;a:{vd=q[a+80>>2];td=o[kc+24|0];b:{if((w(vd,td)|0)!=(lc|0)){break b}if(!(!r[kc+84|0]|q[kc+28>>2]!=1)){Cn(dd,q[q[kc>>2]>>2]+q[kc+48>>2]|0,lc);kd=1;break b}q[sd+8>>2]=0;q[sd>>2]=0;q[sd+4>>2]=0;if(td){if((td|0)<=-1){break a}kd=Mm(td);q[sd>>2]=kd;q[sd+4>>2]=kd;q[sd+8>>2]=kd+td;lc=td;while(1){o[kd|0]=0;kd=q[sd+4>>2]+1|0;q[sd+4>>2]=kd;lc=lc+ -1|0;if(lc){continue}break}}c:{if(!vd){kd=1;break c}lc=0;wd=kc+68|0;xd=(td|0)<1;while(1){a=ud;kd=kc;if(!r[kd+84|0]){a=q[q[wd>>2]+(ud<<2)>>2]}if(!Ia(kd,a,o[kc+24|0],q[sd>>2])){kd=0;break c}if(!xd){kd=0;a=q[sd>>2];while(1){o[lc+dd|0]=r[a+kd|0];lc=lc+1|0;kd=kd+1|0;if((td|0)!=(kd|0)){continue}break}}kd=1;ud=ud+1|0;if((vd|0)!=(ud|0)){continue}break}}a=q[sd>>2];if(!a){break b}q[sd+4>>2]=a;An(a)}T=sd+16|0;return kd}bn();F()}function Wa(a,kc,lc,dd){var yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0;yd=T-16|0;T=yd;a:{Cd=q[a+80>>2];Ad=o[kc+24|0];a=Ad<<1;b:{if((w(Cd,a)|0)!=(lc|0)){break b}if(!(!r[kc+84|0]|q[kc+28>>2]!=3)){Cn(dd,q[q[kc>>2]>>2]+q[kc+48>>2]|0,lc);zd=1;break b}lc=0;q[yd+8>>2]=0;q[yd>>2]=0;q[yd+4>>2]=0;if(Ad){if((Ad|0)<=-1){break a}lc=Mm(a);q[yd>>2]=lc;q[yd+8>>2]=(Ad<<1)+lc;Fd=yd,Gd=Dn(lc,0,a)+a|0,q[Fd+4>>2]=Gd}c:{if(!Cd){zd=1;break c}lc=0;Dd=kc+68|0;Ed=(Ad|0)<1;while(1){a=Bd;zd=kc;if(!r[kc+84|0]){a=q[q[Dd>>2]+(Bd<<2)>>2]}d:{if(!Na(zd,a,o[kc+24|0],q[yd>>2])){zd=0;break d}if(!Ed){zd=0;a=q[yd>>2];while(1){p[(lc<<1)+dd>>1]=s[a+(zd<<1)>>1];lc=lc+1|0;zd=zd+1|0;if((Ad|0)!=(zd|0)){continue}break}}zd=1;Bd=Bd+1|0;if((Cd|0)!=(Bd|0)){continue}}break}lc=q[yd>>2]}if(!lc){break b}q[yd+4>>2]=lc;An(lc)}T=yd+16|0;return zd}bn();F()}function Xa(a,kc,lc,dd){var Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0;Hd=T-16|0;T=Hd;a:{Ld=q[a+80>>2];Jd=o[kc+24|0];a=Jd<<2;b:{if((w(Ld,a)|0)!=(lc|0)){break b}if(!(!r[kc+84|0]|q[kc+28>>2]!=5)){Cn(dd,q[q[kc>>2]>>2]+q[kc+48>>2]|0,lc);Id=1;break b}lc=0;q[Hd+8>>2]=0;q[Hd>>2]=0;q[Hd+4>>2]=0;if(Jd){if((Jd|0)<=-1){break a}lc=Mm(a);q[Hd>>2]=lc;q[Hd+8>>2]=(Jd<<2)+lc;Od=Hd,Pd=Dn(lc,0,a)+a|0,q[Od+4>>2]=Pd}c:{if(!Ld){Id=1;break c}lc=0;Md=kc+68|0;Nd=(Jd|0)<1;while(1){a=Kd;Id=kc;if(!r[kc+84|0]){a=q[q[Md>>2]+(Kd<<2)>>2]}d:{if(!Ra(Id,a,o[kc+24|0],q[Hd>>2])){Id=0;break d}if(!Nd){Id=0;a=q[Hd>>2];while(1){q[(lc<<2)+dd>>2]=q[a+(Id<<2)>>2];lc=lc+1|0;Id=Id+1|0;if((Jd|0)!=(Id|0)){continue}break}}Id=1;Kd=Kd+1|0;if((Ld|0)!=(Kd|0)){continue}}break}lc=q[Hd>>2]}if(!lc){break b}q[Hd+4>>2]=lc;An(lc)}T=Hd+16|0;return Id}bn();F()}function Ya(a,kc,lc,dd){var Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0;Rd=T-16|0;T=Rd;a:{Ud=q[a+80>>2];Sd=o[kc+24|0];b:{if((w(Ud,Sd)|0)!=(lc|0)){break b}if(!(!r[kc+84|0]|q[kc+28>>2]!=2)){Cn(dd,q[q[kc>>2]>>2]+q[kc+48>>2]|0,lc);Qd=1;break b}q[Rd+8>>2]=0;q[Rd>>2]=0;q[Rd+4>>2]=0;if(Sd){if((Sd|0)<=-1){break a}Qd=Mm(Sd);q[Rd>>2]=Qd;q[Rd+4>>2]=Qd;q[Rd+8>>2]=Qd+Sd;lc=Sd;while(1){o[Qd|0]=0;Qd=q[Rd+4>>2]+1|0;q[Rd+4>>2]=Qd;lc=lc+ -1|0;if(lc){continue}break}}c:{if(!Ud){Qd=1;break c}lc=0;Vd=kc+68|0;Wd=(Sd|0)<1;while(1){a=Td;Qd=kc;if(!r[Qd+84|0]){a=q[q[Vd>>2]+(Td<<2)>>2]}if(!Ka(Qd,a,o[kc+24|0],q[Rd>>2])){Qd=0;break c}if(!Wd){Qd=0;a=q[Rd>>2];while(1){o[lc+dd|0]=r[a+Qd|0];lc=lc+1|0;Qd=Qd+1|0;if((Sd|0)!=(Qd|0)){continue}break}}Qd=1;Td=Td+1|0;if((Ud|0)!=(Td|0)){continue}break}}a=q[Rd>>2];if(!a){break b}q[Rd+4>>2]=a;An(a)}T=Rd+16|0;return Qd}bn();F()}function Za(a,kc,lc,dd){var Xd=0,Yd=0,Zd=0,_d=0,$d=0,ae=0,be=0,ce=0,de=0;Xd=T-16|0;T=Xd;a:{$d=q[a+80>>2];Zd=o[kc+24|0];a=Zd<<1;b:{if((w($d,a)|0)!=(lc|0)){break b}if(!(!r[kc+84|0]|q[kc+28>>2]!=4)){Cn(dd,q[q[kc>>2]>>2]+q[kc+48>>2]|0,lc);Yd=1;break b}lc=0;q[Xd+8>>2]=0;q[Xd>>2]=0;q[Xd+4>>2]=0;if(Zd){if((Zd|0)<=-1){break a}lc=Mm(a);q[Xd>>2]=lc;q[Xd+8>>2]=(Zd<<1)+lc;ce=Xd,de=Dn(lc,0,a)+a|0,q[ce+4>>2]=de}c:{if(!$d){Yd=1;break c}lc=0;ae=kc+68|0;be=(Zd|0)<1;while(1){a=_d;Yd=kc;if(!r[kc+84|0]){a=q[q[ae>>2]+(_d<<2)>>2]}d:{if(!Pa(Yd,a,o[kc+24|0],q[Xd>>2])){Yd=0;break d}if(!be){Yd=0;a=q[Xd>>2];while(1){p[(lc<<1)+dd>>1]=s[a+(Yd<<1)>>1];lc=lc+1|0;Yd=Yd+1|0;if((Zd|0)!=(Yd|0)){continue}break}}Yd=1;_d=_d+1|0;if(($d|0)!=(_d|0)){continue}}break}lc=q[Xd>>2]}if(!lc){break b}q[Xd+4>>2]=lc;An(lc)}T=Xd+16|0;return Yd}bn();F()}function _a(a,kc,lc,dd){var ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0;ee=T-16|0;T=ee;a:{ie=q[a+80>>2];ge=o[kc+24|0];a=ge<<2;b:{if((w(ie,a)|0)!=(lc|0)){break b}if(!(!r[kc+84|0]|q[kc+28>>2]!=6)){Cn(dd,q[q[kc>>2]>>2]+q[kc+48>>2]|0,lc);fe=1;break b}lc=0;q[ee+8>>2]=0;q[ee>>2]=0;q[ee+4>>2]=0;if(ge){if((ge|0)<=-1){break a}lc=Mm(a);q[ee>>2]=lc;q[ee+8>>2]=(ge<<2)+lc;le=ee,me=Dn(lc,0,a)+a|0,q[le+4>>2]=me}c:{if(!ie){fe=1;break c}lc=0;je=kc+68|0;ke=(ge|0)<1;while(1){a=he;fe=kc;if(!r[kc+84|0]){a=q[q[je>>2]+(he<<2)>>2]}d:{if(!Ta(fe,a,o[kc+24|0],q[ee>>2])){fe=0;break d}if(!ke){fe=0;a=q[ee>>2];while(1){q[(lc<<2)+dd>>2]=q[a+(fe<<2)>>2];lc=lc+1|0;fe=fe+1|0;if((ge|0)!=(fe|0)){continue}break}}fe=1;he=he+1|0;if((ie|0)!=(he|0)){continue}}break}lc=q[ee>>2]}if(!lc){break b}q[ee+4>>2]=lc;An(lc)}T=ee+16|0;return fe}bn();F()}function $a(a,o){var kc=0,lc=0;kc=q[a+4>>2];if(!kc){return 0}o=q[q[q[a+8>>2]+(o<<2)>>2]+60>>2];if((o|0)<0){return 0}a=q[kc+24>>2];kc=q[kc+28>>2];if((a|0)==(kc|0)){return 0}a:{while(1){lc=q[a>>2];if((o|0)==q[lc+24>>2]){break a}a=a+4|0;if((kc|0)!=(a|0)){continue}break}return 0}return lc}function ab(a){var o=0;o=I(8)|0;q[o>>2]=15856;q[o>>2]=15900;Nm(o+4|0,a);q[o>>2]=15948;J(o|0,15980,1);F()}function bb(a,dd,ne){var oe=0,pe=0,qe=0,re=0,se=0;pe=T-16|0;T=pe;q[a+4>>2]=0;a:{b:{if(!dd){break b}qe=q[a+8>>2];oe=qe<<5;c:{if(oe>>>0>=dd>>>0){q[a+4>>2]=dd;break c}q[pe+8>>2]=0;q[pe>>2]=0;q[pe+4>>2]=0;if((dd|0)<=-1){break a}se=pe;if(oe>>>0<=1073741822){re=dd+31&-32;oe=qe<<6;re=oe>>>0>>0?re:oe}else{re=2147483647}cb(se,re);re=q[a>>2];q[a>>2]=q[pe>>2];q[pe>>2]=re;qe=q[a+4>>2];q[a+4>>2]=dd;q[pe+4>>2]=qe;oe=a+8|0;qe=q[oe>>2];q[oe>>2]=q[pe+8>>2];q[pe+8>>2]=qe;if(!re){break c}An(re)}oe=dd>>>5;qe=oe<<2;a=q[a>>2];if(r[ne|0]){a=Dn(a,255,qe);dd=dd&31;if(!dd){break b}a=a+(oe<<2)|0;q[a>>2]=q[a>>2]|-1>>>32-dd;break b}a=Dn(a,0,qe);dd=dd&31;if(!dd){break b}a=a+(oe<<2)|0;q[a>>2]=q[a>>2]&(-1>>>32-dd^-1)}T=pe+16|0;return}bn();F()}function cb(a,dd){var ne=0,te=0;ne=T-32|0;T=ne;a:{b:{if(q[a+8>>2]<<5>>>0>=dd>>>0){break b}q[ne+24>>2]=0;q[ne+16>>2]=0;q[ne+20>>2]=0;if((dd|0)<=-1){break a}dd=(dd+ -1>>>5)+1|0;te=Mm(dd<<2);q[ne+24>>2]=dd;q[ne+20>>2]=0;q[ne+16>>2]=te;dd=q[a>>2];q[ne+12>>2]=0;q[ne+8>>2]=dd;te=q[a+4>>2];q[ne+4>>2]=te&31;q[ne>>2]=dd+(te>>>3&536870908);db(ne+16|0,ne+8|0,ne);dd=q[a>>2];q[a>>2]=q[ne+16>>2];q[ne+16>>2]=dd;te=q[a+4>>2];q[a+4>>2]=q[ne+20>>2];q[ne+20>>2]=te;a=a+8|0;te=q[a>>2];q[a>>2]=q[ne+24>>2];q[ne+24>>2]=te;if(!dd){break b}An(dd)}T=ne+32|0;return}bn();F()}function db(a,dd,ue){var ve=0,we=0,xe=0,ye=0,ze=0,Ae=0;xe=T-32|0;T=xe;ze=q[ue+4>>2];ve=q[dd+4>>2];Ae=q[ue>>2];ye=q[dd>>2];dd=(ze-ve|0)+(Ae-ye<<3)|0;ue=q[a+4>>2];we=dd+ue|0;q[a+4>>2]=we;a:{if(!(!ue|(we+ -1^ue+ -1)>>>0>31)){a=q[a>>2];break a}a=q[a>>2];if(we>>>0<=32){q[a>>2]=0;break a}q[(we+ -1>>>3&536870908)+a>>2]=0}a=(ue>>>3&536870908)+a|0;ue=ue&31;b:{if((ue|0)==(ve|0)){c:{if((dd|0)<1){break c}d:{if(!ve){ue=0;break d}we=32-ve|0;ue=(dd|0)<(we|0)?dd:we;we=-1<>>we-ue;q[a>>2]=q[a>>2]&(we^-1)|we&q[ye>>2];dd=dd-ue|0;ve=ue+ve|0;ue=ve&31;a=(ve>>>3&536870908)+a|0;ye=ye+4|0}ve=(dd|0)/32|0;we=ve<<2;a=En(a,ye,we)+we|0;ve=dd-(ve<<5)|0;if((ve|0)<1){ve=ue;break c}dd=-1>>>32-ve;q[a>>2]=q[a>>2]&(dd^-1)|dd&q[we+ye>>2]}q[xe+4>>2]=ve;q[xe>>2]=a;break b}q[xe+28>>2]=ve;q[xe+24>>2]=ye;q[xe+20>>2]=ze;q[xe+16>>2]=Ae;q[xe+12>>2]=ue;q[xe+8>>2]=a;eb(xe,xe+24|0,xe+16|0,xe+8|0)}T=xe+32|0}function eb(a,dd,ue,Be){var Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0;De=q[dd>>2];Ce=q[ue+4>>2]+(q[ue>>2]-De<<3)|0;ue=q[dd+4>>2];Ee=Ce-ue|0;a:{if((Ee|0)<=0){ue=q[Be+4>>2];break a}b:{if(!ue){ue=q[Be+4>>2];break b}Ce=q[Be+4>>2];He=32-Ce|0;Ie=32-ue|0;Fe=(Ee|0)<(Ie|0)?Ee:Ie;Ge=He>>>0>>0?He:Fe;Je=q[Be>>2];De=q[De>>2]&(-1<>>Ie-Fe);q[Je>>2]=q[Je>>2]&(-1<>>He-Ge^-1)|(Ce>>>0>ue>>>0?De<>>ue-Ce);Ce=Ce+Ge|0;ue=Ce&31;q[Be+4>>2]=ue;He=Je+(Ce>>>3&536870908)|0;q[Be>>2]=He;Ce=Fe-Ge|0;if((Ce|0)>=1){q[He>>2]=q[He>>2]&(-1>>>32-Ce^-1)|De>>>Ge+q[dd+4>>2];q[Be+4>>2]=Ce;ue=Ce}Ee=Ee-Fe|0;De=q[dd>>2]+4|0;q[dd>>2]=De}Ge=-1<>2];De=q[De>>2];q[Ce>>2]=He&q[Ce>>2]|De<>2]=Ce+4;q[Ce+4>>2]=Ge&q[Ce+4>>2]|De>>>Fe;De=q[dd>>2]+4|0;q[dd>>2]=De;Ie=(Ee|0)>63;Ce=Ee+ -32|0;Ee=Ce;if(Ie){continue}break}}if((Ce|0)<1){break a}dd=q[Be>>2];Ee=(Fe|0)<(Ce|0)?Fe:Ce;Ge=q[dd>>2]&(Ge&-1>>>Fe-Ee^-1);Fe=q[De>>2]&-1>>>32-Ce;q[dd>>2]=Ge|Fe<>2]=ue;De=dd+(De>>>3&536870908)|0;q[Be>>2]=De;dd=Ce-Ee|0;if((dd|0)<1){break a}q[De>>2]=q[De>>2]&(-1>>>32-dd^-1)|Fe>>>Ee;q[Be+4>>2]=dd;ue=dd}dd=q[Be>>2];q[a+4>>2]=ue;q[a>>2]=dd}function fb(a){a=a|0;return q[a>>2]}function gb(a){a=a|0;return!q[a>>2]|0}function hb(a){a=a|0;var dd=0;dd=a+4|0;if(o[a+15|0]<=-1){dd=q[dd>>2]}return dd|0}function ib(a){a=a|0;if(a){if(o[a+15|0]<=-1){An(q[a+4>>2])}An(a)}}function jb(){var a=0;a=Mm(12);q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;return a|0}function kb(ue,Be){ue=ue|0;Be=Be|0;return s[q[ue>>2]+(Be<<1)>>1]}function lb(ue){ue=ue|0;return q[ue+4>>2]-q[ue>>2]>>1}function mb(ue){ue=ue|0;var Be=0;if(ue){Be=q[ue>>2];if(Be){q[ue+4>>2]=Be;An(Be)}An(ue)}}function nb(){return al(Mm(84))|0}function ob(ue){ue=ue|0;return q[ue+12>>2]-q[ue+8>>2]>>2}function pb(ue){ue=ue|0;return q[ue+80>>2]}function qb(ue){ue=ue|0;if(ue){n[q[q[ue>>2]+4>>2]](ue)}}function rb(ue,Ke){ue=ue|0;Ke=Ke|0;return r[q[ue>>2]+Ke|0]}function sb(ue){ue=ue|0;return q[ue+4>>2]-q[ue>>2]|0}function tb(ue,Ke){ue=ue|0;Ke=Ke|0;return q[q[ue>>2]+(Ke<<2)>>2]}function ub(ue){ue=ue|0;return q[ue+4>>2]-q[ue>>2]>>2}function vb(){var ue=0;ue=Mm(8);q[ue+4>>2]=-1;q[ue>>2]=1116;return ue|0}function wb(Ke,Le){Ke=Ke|0;Le=Le|0;return n[q[q[Ke>>2]+12>>2]](Ke,Le)|0}function xb(Ke){Ke=Ke|0;return q[Ke+4>>2]}function yb(){return rd(Mm(96))|0}function zb(Ke){Ke=Ke|0;return q[Ke+88>>2]}function Ab(Ke){Ke=Ke|0;return q[Ke+56>>2]}function Bb(Ke){Ke=Ke|0;return q[Ke+28>>2]}function Cb(q){q=q|0;return o[q+24|0]}function Db(q){q=q|0;return r[q+32|0]}function Eb(Ke){Ke=Ke|0;return q[Ke+40>>2]}function Fb(Ke){Ke=Ke|0;return q[Ke+48>>2]}function Gb(Ke){Ke=Ke|0;return q[Ke+60>>2]}function Hb(Ke){Ke=Ke|0;var Le=0,Me=0;if(Ke){Le=Ke+88|0;Me=q[Le>>2];q[Le>>2]=0;if(Me){Le=q[Me+8>>2];if(Le){q[Me+12>>2]=Le;An(Le)}An(Me)}Me=q[Ke+68>>2];if(Me){q[Ke+72>>2]=Me;An(Me)}Le=Ke- -64|0;Me=q[Le>>2];q[Le>>2]=0;if(Me){Le=q[Me>>2];if(Le){q[Me+4>>2]=Le;An(Le)}An(Me)}An(Ke)}}function Ib(){var Ke=0;Ke=Mm(40);q[Ke>>2]=-1;Uj(Ke+8|0);return Ke|0}function Jb(Ne){Ne=Ne|0;var Oe=0;if(Ne){Oe=q[Ne+8>>2];if(Oe){q[Ne+12>>2]=Oe;An(Oe)}An(Ne)}}function Kb(){var Ne=0;Ne=Mm(24);q[Ne+4>>2]=-1;q[Ne>>2]=1232;q[Ne+8>>2]=0;q[Ne+12>>2]=0;q[Ne+16>>2]=0;q[Ne+20>>2]=0;return Ne|0}function Lb(Pe,Qe){Pe=Pe|0;Qe=Qe|0;return x(u[q[Pe+8>>2]+(Qe<<2)>>2])}function Mb(q){q=q|0;return x(u[q+20>>2])}function Nb(Pe,Qe){Pe=Pe|0;Qe=Qe|0;return o[q[Pe>>2]+Qe|0]}function Ob(){var Pe=0;Pe=Mm(28);q[Pe>>2]=0;q[Pe+4>>2]=0;q[Pe+24>>2]=0;q[Pe+16>>2]=0;q[Pe+20>>2]=0;q[Pe+8>>2]=0;q[Pe+12>>2]=0;return Pe|0}function Pb(q,Qe,Re){q=q|0;Qe=Qe|0;Re=Re|0;return fa(Qe,Re)|0}function Qb(q,Qe,Re){q=q|0;Qe=Qe|0;Re=Re|0;return ha(Qe,Re)|0}function Rb(q,Qe,Re,Se){q=q|0;Qe=Qe|0;Re=Re|0;Se=Se|0;ia(Qe,Re,Se)}function Sb(q,Qe,Re){q=q|0;Qe=Qe|0;Re=Re|0;return+ja(Qe,Re)}function Tb(q,Qe,Re){q=q|0;Qe=Qe|0;Re=Re|0;return ka(q,Qe,Re)|0}function Ub(Qe,Re){Qe=Qe|0;Re=Re|0;return q[Re+8>>2]}function Vb(q,Qe,Re){q=q|0;Qe=Qe|0;Re=Re|0;return la(q,Qe,Re)|0}function Wb(Qe){Qe=Qe|0;var Re=0,Se=0,Te=0,Ue=0,Ve=0;if(Qe){if(o[Qe+27|0]<=-1){An(q[Qe+16>>2])}Se=q[Qe>>2];if(Se){Re=Se;Ve=Qe+4|0;Te=q[Ve>>2];Ue=Re;a:{if((Te|0)==(Re|0)){break a}while(1){Re=Te+ -12|0;if(o[Te+ -1|0]<=-1){An(q[Re>>2])}Te=Re;if((Re|0)!=(Se|0)){continue}break}Ue=q[Qe>>2]}Re=Ue;q[Ve>>2]=Se;An(Re)}An(Qe)}}function Xb(Qe,We){Qe=Qe|0;We=We|0;return p[q[Qe>>2]+(We<<1)>>1]}function Yb(Qe,We){Qe=Qe|0;We=We|0;return x(u[q[Qe>>2]+(We<<2)>>2])}function Zb(){return nd(Mm(64))|0}function _b(q){q=q|0;if(q){An(q)}}function $b(){return Yj(Mm(40))|0}function ac(Qe,We,Xe){Qe=Qe|0;We=We|0;Xe=Xe|0;q[Qe+16>>2]=0;q[Qe+20>>2]=0;q[Qe>>2]=We;q[Qe+8>>2]=Xe;q[Qe+12>>2]=0}function bc(){return na(Mm(40))|0}function cc(q,Qe){q=q|0;Qe=Qe|0;return oa(Qe)|0}function dc(q,Qe,We){q=q|0;Qe=Qe|0;We=We|0;return pa(q,Qe,We)|0}function ec(q,Qe,We){q=q|0;Qe=Qe|0;We=We|0;return qa(q,Qe,We)|0}function fc(q,Qe,We){q=q|0;Qe=Qe|0;We=We|0;return bl(Qe,We)|0}function gc(q,Qe,We){q=q|0;Qe=Qe|0;We=We|0;return ra(Qe,We)|0}function hc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return sa(Qe,We,Xe)|0}function ic(Qe,We,Xe){Qe=Qe|0;We=We|0;Xe=Xe|0;return q[q[We+8>>2]+(Xe<<2)>>2]}function jc(q,Qe,We){q=q|0;Qe=Qe|0;We=We|0;return dl(Qe,We)|0}function kc(Qe,We){Qe=Qe|0;We=We|0;return q[We+4>>2]}function lc(q,Qe,We){q=q|0;Qe=Qe|0;We=We|0;return $a(Qe,We)|0}function mc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return ta(Qe,We,Xe)|0}function nc(q,Qe,We){q=q|0;Qe=Qe|0;We=We|0;return ua(Qe,We)|0}function oc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Aa(Qe,We,Xe)|0}function pc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Ba(Qe,We,Xe)|0}function qc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Ca(Qe,We,Xe)|0}function rc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Ea(Qe,We,Xe)|0}function sc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Qa(Qe,We,Xe)|0}function tc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Ga(Qe,We,Xe)|0}function uc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Ja(Qe,We,Xe)|0}function vc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return La(Qe,We,Xe)|0}function wc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Oa(Qe,We,Xe)|0}function xc(q,Qe,We,Xe){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;return Sa(Qe,We,Xe)|0}function yc(q,Qe,We,Xe,Ye,Ze){q=q|0;Qe=Qe|0;We=We|0;Xe=Xe|0;Ye=Ye|0;Ze=Ze|0;return Ua(Qe,We,Xe,Ye,Ze)|0}function zc(q,Qe){q=q|0;Qe=Qe|0;kh(q,Qe)}function Ac(Qe){Qe=Qe|0;if(Qe){if(o[Qe+39|0]<=-1){An(q[Qe+28>>2])}Bc(Qe+12|0,q[Qe+16>>2]);Cc(Qe,q[Qe+4>>2]);An(Qe)}}function Bc(Qe,We){if(We){Bc(Qe,q[We>>2]);Bc(Qe,q[We+4>>2]);Cc(We+20|0,q[We+24>>2]);An(We)}}function Cc(Qe,We){if(We){Cc(Qe,q[We>>2]);Cc(Qe,q[We+4>>2]);if(o[We+39|0]<=-1){An(q[We+28>>2])}if(o[We+27|0]<=-1){An(q[We+16>>2])}An(We)}}function Dc(){return vk(Mm(108))|0}function Ec(Qe){Qe=Qe|0;return(q[Qe+100>>2]-q[Qe+96>>2]|0)/12|0}function Fc(){var Qe=0,We=0,Xe=0;We=Mm(24);Xe=We+4|0;Qe=Xe;q[Qe>>2]=0;q[Qe+4>>2]=0;Qe=We+16|0;q[Qe>>2]=0;q[Qe+4>>2]=0;q[We>>2]=Xe;q[We+12>>2]=Qe;return We|0}function Gc(Ye){Ye=Ye|0;if(Ye){Hc(Ye+12|0,q[Ye+16>>2]);Ic(Ye,q[Ye+4>>2]);An(Ye)}}function Hc(Ye,Ze){var _e=0;if(Ze){Hc(Ye,q[Ze>>2]);Hc(Ye,q[Ze+4>>2]);_e=Ze+28|0;Ye=q[_e>>2];q[_e>>2]=0;if(Ye){Hc(Ye+12|0,q[Ye+16>>2]);Ic(Ye,q[Ye+4>>2]);An(Ye)}if(o[Ze+27|0]<=-1){An(q[Ze+16>>2])}An(Ze)}}function Ic(Ye,Ze){if(Ze){Ic(Ye,q[Ze>>2]);Ic(Ye,q[Ze+4>>2]);Ye=q[Ze+28>>2];if(Ye){q[Ze+32>>2]=Ye;An(Ye)}if(o[Ze+27|0]<=-1){An(q[Ze+16>>2])}An(Ze)}}function Jc(){return 0}function Kc(){return-1}function Lc(){return-2}function Mc(){return-3}function Nc(){return-4}function Oc(){return-5}function Pc(){return 1}function Qc(){return 2}function Rc(){return 3}function Sc(){return 4}function Tc(){return 5}function Uc(){return 6}function Vc(){return 7}function Wc(){return 8}function Xc(){return 9}function Yc(){return 10}function Zc(){return 11}function _c(){return 12}function $c(Ye,Ze){Ye=Ye|0;Ze=Ze|0;var $e=0;Ze=q[Ze+88>>2];if(!(!Ze|q[Ze>>2]!=2)){$e=Ye;Ye=q[Ze+8>>2];q[$e+4>>2]=r[Ye|0]|r[Ye+1|0]<<8|(r[Ye+2|0]<<16|r[Ye+3|0]<<24);$e=1}return $e|0}function ad(Ye,Ze){Ye=Ye|0;Ze=Ze|0;var af=0,bf=0;q[Ze>>2]=2;af=q[Ze+8>>2];bf=q[Ze+12>>2]-af|0;if(bf>>>0<=4294967291){Ze=Ze+8|0;Xj(Ze,bf+4|0);af=q[Ze>>2]}Ze=af+bf|0;Ye=r[Ye+4|0]|r[Ye+5|0]<<8|(r[Ye+6|0]<<16|r[Ye+7|0]<<24);o[Ze|0]=Ye;o[Ze+1|0]=Ye>>>8;o[Ze+2|0]=Ye>>>16;o[Ze+3|0]=Ye>>>24}function bd(q){q=q|0;return q|0}function cd(q){q=q|0;An(q)}function dd(q){q=q|0;return 2}function ed(Ye,Ze){Ye=Ye|0;Ze=Ze|0;var cf=0,df=0,ef=0,ff=0,gf=0,hf=0;ef=q[Ze+88>>2];if(!(!ef|q[ef>>2]!=1)){ff=ef+8|0;ef=q[ff>>2];cf=ef;q[Ye+4>>2]=r[cf|0]|r[cf+1|0]<<8|(r[cf+2|0]<<16|r[cf+3|0]<<24);gf=Ye+8|0;hf=q[Ye+8>>2];df=q[Ye+12>>2]-hf>>2;cf=o[Ze+24|0];a:{if(df>>>0>>0){Fa(gf,cf-df|0);ef=q[ff>>2];cf=r[Ze+24|0];break a}if(df>>>0<=cf>>>0){break a}q[Ye+12>>2]=hf+(cf<<2)}ff=1;Ze=ef;df=r[Ze+4|0]|r[Ze+5|0]<<8|(r[Ze+6|0]<<16|r[Ze+7|0]<<24);if(cf<<24>>24>=1){hf=cf&255;gf=q[gf>>2];Ze=0;cf=4;while(1){q[gf+(Ze<<2)>>2]=df;cf=cf+4|0;df=ef+cf|0;df=r[df|0]|r[df+1|0]<<8|(r[df+2|0]<<16|r[df+3|0]<<24);Ze=Ze+1|0;if(Ze>>>0>>0){continue}break}}q[Ye+20>>2]=df}return ff|0}function fd(Ye,Ze){Ye=Ye|0;Ze=Ze|0;var jf=0,kf=0,lf=0,mf=0,nf=0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+qf|0:pf;uf=qf-Ze|0;if(uf){En(rf,Ze,uf)}if(sf>>>0>tf>>>0){Ze=pf-qf|0;if((Ze|0)<1){break b}Ye=Ye+4|0;Cn(q[Ye>>2],qf,Ze);q[Ye>>2]=Ze+q[Ye>>2];return}q[Ye+4>>2]=rf+(uf>>2<<2);return}if(rf){q[Ye+4>>2]=rf;An(rf);q[Ye+8>>2]=0;q[Ye>>2]=0;q[Ye+4>>2]=0;qf=0}if(sf>>>0>=1073741824){break a}pf=qf>>1;pf=qf>>2>>>0<536870911?pf>>>0>>0?sf:pf:1073741823;if(pf>>>0>=1073741824){break a}rf=pf<<2;pf=Mm(rf);q[Ye>>2]=pf;sf=Ye+4|0;q[sf>>2]=pf;q[Ye+8>>2]=pf+rf;if((tf|0)<1){break b}vf=sf,wf=Cn(pf,Ze,tf)+tf|0,q[vf>>2]=wf}return}bn();F()}function id(Ye){Ye=Ye|0;var Ze=0;q[Ye>>2]=1232;Ze=q[Ye+8>>2];if(Ze){q[Ye+12>>2]=Ze;An(Ze)}return Ye|0}function jd(Ye){Ye=Ye|0;var pf=0;q[Ye>>2]=1232;pf=q[Ye+8>>2];if(pf){q[Ye+12>>2]=pf;An(pf)}An(Ye)}function kd(q){q=q|0;return 1}function ld(Ye,xf){var yf=0;yf=Mm(40);q[yf>>2]=-1;Uj(yf+8|0);n[q[q[Ye>>2]+16>>2]](Ye,yf);Ye=q[xf+88>>2];q[xf+88>>2]=yf;if(Ye){xf=q[Ye+8>>2];if(xf){q[Ye+12>>2]=xf;An(xf)}An(Ye)}return 1}function md(Ye,xf,zf){var Af=0,Bf=0,Cf=0,Df=0,Ef=0,Ff=0;Cf=q[Ye+8>>2];Af=q[Ye+4>>2];if(Cf-Af>>2>>>0>=xf>>>0){while(1){q[Af>>2]=q[zf>>2];Af=Af+4|0;xf=xf+ -1|0;if(xf){continue}break}q[Ye+4>>2]=Af;return}a:{Df=q[Ye>>2];Ef=Af-Df|0;Ff=Ef>>2;Af=Ff+xf|0;if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ye+16>>2];ag=q[ng>>2]-$f>>2;f:{if((Tf|0)<(ag|0)){break f}q[cg+12>>2]=-1;Tf=Tf+1|0;if(Tf>>>0>ag>>>0){Ad(lg,Tf-ag|0,cg+12|0);$f=q[lg>>2];break f}if(Tf>>>0>=ag>>>0){break f}q[ng>>2]=(Tf<<2)+$f}q[$f+bg>>2]=kg;ag=1;kg=kg+1|0;if((kg|0)!=(eg|0)){continue}break a}break}ag=0}T=cg+96|0;return ag|0}function zd(Ye,xf,pg){var qg=0,rg=0,sg=0,tg=0;a:{if(Ye>>>0>5){break a}sg=q[pg+16>>2];qg=q[pg+12>>2];rg=q[pg+20>>2];if((qg|0)<(rg|0)?1:(qg|0)<=(rg|0)?t[pg+8>>2]>sg>>>0?0:1:0){break a}qg=r[sg+q[pg>>2]|0];sg=sg+1|0;if(sg>>>0<1){rg=rg+1|0}q[pg+16>>2]=sg;q[pg+20>>2]=rg;rg=xf;if(qg&128){if(!zd(Ye+1|0,xf,pg)){break a}Ye=q[xf>>2]<<7;q[xf>>2]=Ye;qg=Ye|qg&127}q[rg>>2]=qg;tg=1}return tg}function Ad(Ye,xf,pg){var ug=0,vg=0,wg=0,xg=0,yg=0,zg=0;wg=q[Ye+8>>2];ug=q[Ye+4>>2];if(wg-ug>>2>>>0>=xf>>>0){while(1){q[ug>>2]=q[pg>>2];ug=ug+4|0;xf=xf+ -1|0;if(xf){continue}break}q[Ye+4>>2]=ug;return}a:{xg=q[Ye>>2];yg=ug-xg|0;zg=yg>>2;ug=zg+xf|0;if(ug>>>0<1073741824){wg=wg-xg|0;vg=wg>>1;ug=wg>>2>>>0<536870911?vg>>>0>>0?ug:vg:1073741823;vg=0;b:{if(!ug){break b}if(ug>>>0>=1073741824){break a}vg=Mm(ug<<2)}wg=vg+(ug<<2)|0;ug=vg+(zg<<2)|0;while(1){q[ug>>2]=q[pg>>2];ug=ug+4|0;xf=xf+ -1|0;if(xf){continue}break}if((yg|0)>=1){Cn(vg,xg,yg)}q[Ye>>2]=vg;q[Ye+8>>2]=wg;q[Ye+4>>2]=ug;if(xg){An(xg)}return}bn();F()}ab(1520);F()}function Bd(Ye){Ye=Ye|0;var xf=0;q[Ye>>2]=1384;xf=q[Ye+16>>2];if(xf){q[Ye+20>>2]=xf;An(xf)}xf=q[Ye+4>>2];if(xf){q[Ye+8>>2]=xf;An(xf)}return Ye|0}function Cd(q){q=q|0;F()}function Dd(Ye,pg){Ye=Ye|0;pg=pg|0;var Ag=0;a:{if(!n[q[q[Ye>>2]+36>>2]](Ye,pg)){break a}if(!n[q[q[Ye>>2]+40>>2]](Ye,pg)){break a}Ag=n[q[q[Ye>>2]+44>>2]](Ye)|0}return Ag|0}function Ed(Ye,pg){Ye=Ye|0;pg=pg|0;return q[q[Ye+4>>2]+(pg<<2)>>2]}function Fd(Ye){Ye=Ye|0;return q[Ye+8>>2]-q[Ye+4>>2]>>2}function Gd(q,Ye){q=q|0;Ye=Ye|0;return 0}function Hd(q,Ye){q=q|0;Ye=Ye|0;return 1}function Id(Ye){wd(Ye);q[Ye+36>>2]=0;q[Ye+40>>2]=0;q[Ye>>2]=1596;q[Ye+44>>2]=0;q[Ye+48>>2]=0;q[Ye+52>>2]=0;q[Ye+56>>2]=0;q[Ye+60>>2]=0;q[Ye+64>>2]=0;q[Ye+68>>2]=0}function Jd(Ye,pg){Ye=Ye|0;pg=pg|0;var Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0;Cg=T-704|0;T=Cg;Dg=1;a:{b:{if(s[pg+38>>1]<515){break b}Dg=0;Eg=q[pg+16>>2];Hg=q[pg+12>>2];Bg=q[pg+20>>2];if((Hg|0)<(Bg|0)?1:(Hg|0)<=(Bg|0)?t[pg+8>>2]>Eg>>>0?0:1:0){break b}Jg=r[Eg+q[pg>>2]|0];Eg=Eg+1|0;if(Eg>>>0<1){Bg=Bg+1|0}q[pg+16>>2]=E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+ -4>>2];Bg=q[Cg+656>>2];q[Cg+656>>2]=0;if(!Bg){break d}Hb(Bg)}Fg=q[Eg+28>>2];Dg=bk(Fg);Bg=q[Cg+688>>2]+w(Ig,20)|0;Mg=o[Eg+24|0];q[Bg+16>>2]=Mg;q[Bg+12>>2]=(Dg|0)>0?Dg:0;q[Bg+8>>2]=Fg;q[Bg+4>>2]=Gg;q[Bg>>2]=Eg;Ig=Ig+1|0;Gg=Gg+Mg|0;continue}break}Dg=0;Ye=Ld(Cg+656|0,Cg+688|0);h:{if(Jg>>>0>6){break h}i:{j:{switch(Jg-1|0){default:Bg=Od(Cg,Gg);pg=Md(Bg,pg,Ye);Nd(Bg);if(pg){break i}break h;case 0:Bg=Od(Cg,Gg);pg=Pd(Bg,pg,Ye);Nd(Bg);if(pg){break i}break h;case 1:Bg=Sd(Cg,Gg);pg=Qd(Bg,pg,Ye);Rd(Bg);if(pg){break i}break h;case 2:Bg=Sd(Cg,Gg);pg=Td(Bg,pg,Ye);Rd(Bg);if(pg){break i}break h;case 3:Bg=Wd(Cg,Gg);pg=Ud(Bg,pg,Ye);Vd(Bg);if(pg){break i}break h;case 4:Bg=Wd(Cg,Gg);pg=Xd(Bg,pg,Ye);Vd(Bg);if(pg){break i}break h;case 5:break j}}Bg=Wd(Cg,Gg);pg=Yd(Bg,pg,Ye);Vd(Bg);if(!pg){break h}}Dg=1}pg=q[Ye+16>>2];if(pg){q[Ye+20>>2]=pg;An(pg)}pg=q[Ye>>2];if(!pg){break c}q[Ye+4>>2]=pg;An(pg)}Ye=q[Cg+688>>2];if(!Ye){break b}q[Cg+692>>2]=Ye;An(Ye)}T=Cg+704|0;return Dg|0}bn();F()}function Kd(Ye,pg){var Rg=0,Sg=0,Tg=0,Ug=0,Vg=0;a:{b:{c:{Tg=q[Ye>>2];Ug=q[Ye+4>>2]-Tg>>2;Rg=Ug+1|0;if(Rg>>>0<1073741824){Tg=q[Ye+8>>2]-Tg|0;Vg=Tg>>1;Rg=Tg>>2>>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zg+16>>2],q[Zg+12>>2]);pg=pg>>>0>>0?Zg:pg;Xg=Xg+1|0;if(Xg>>>0>>0){continue}break}if(!pg){q[Ye+12>>2]=0;return Ye}Ha(Ye,pg);pg=q[Ye>>2]}else{pg=0}q[_g+12>>2]=pg;return Ye}bn();F()}function Md(Ye,pg,ah){var bh=0,ch=0,dh=0,eh=0,fh=0,gh=0;ch=q[pg+12>>2];a:{dh=q[pg+20>>2];eh=q[pg+16>>2];bh=eh+4|0;if(bh>>>0<4){dh=dh+1|0}if((ch|0)<(dh|0)?1:(ch|0)<=(dh|0)?t[pg+8>>2]>=bh>>>0?0:1:0){break a}bh=eh+q[pg>>2]|0;bh=r[bh|0]|r[bh+1|0]<<8|(r[bh+2|0]<<16|r[bh+3|0]<<24);q[Ye>>2]=bh;ch=q[pg+20>>2];eh=ch;fh=q[pg+16>>2];dh=fh+4|0;if(dh>>>0<4){ch=ch+1|0}q[pg+16>>2]=dh;q[pg+20>>2]=ch;if(bh>>>0>32){break a}ch=q[pg+12>>2];bh=fh+8|0;if(bh>>>0<8){eh=eh+1|0}if((ch|0)<(eh|0)?1:(ch|0)<=(eh|0)?t[pg+8>>2]>=bh>>>0?0:1:0){break a}bh=dh+q[pg>>2]|0;ch=r[bh|0]|r[bh+1|0]<<8|(r[bh+2|0]<<16|r[bh+3|0]<<24);q[Ye+4>>2]=ch;dh=q[pg+20>>2];eh=q[pg+16>>2]+4|0;if(eh>>>0<4){dh=dh+1|0}q[pg+16>>2]=eh;q[pg+20>>2]=dh;if(!ch){gh=1;break a}q[Ye+8>>2]=0;if(!$g(Ye+16|0,pg)){break a}if(!$g(Ye+36|0,pg)){break a}if(!$g(Ye+56|0,pg)){break a}if(!$g(Ye+76|0,pg)){break a}return Zd(Ye,q[Ye+4>>2],ah)}return gh}function Nd(Ye){var pg=0,$g=0,ah=0,hh=0,ih=0;ah=q[Ye+132>>2];if(ah){ih=Ye+136|0;pg=q[ih>>2];$g=ah;a:{if((ah|0)==(pg|0)){break a}while(1){$g=pg+ -12|0;hh=q[$g>>2];if(hh){q[pg+ -8>>2]=hh;An(hh)}pg=$g;if((pg|0)!=(ah|0)){continue}break}$g=q[Ye+132>>2]}q[ih>>2]=ah;An($g)}ah=q[Ye+120>>2];if(ah){ih=Ye+124|0;pg=q[ih>>2];$g=ah;b:{if((ah|0)==(pg|0)){break b}while(1){$g=pg+ -12|0;hh=q[$g>>2];if(hh){q[pg+ -8>>2]=hh;An(hh)}pg=$g;if((pg|0)!=(ah|0)){continue}break}$g=q[Ye+120>>2]}q[ih>>2]=ah;An($g)}pg=q[Ye+108>>2];if(pg){q[Ye+112>>2]=pg;An(pg)}pg=q[Ye+96>>2];if(pg){q[Ye+100>>2]=pg;An(pg)}_g(Ye+76|0);_g(Ye+56|0);_g(Ye+36|0);_g(Ye+16|0)}function Od(Ye,jh){var kh=0,lh=0,mh=0,nh=0;mh=T-16|0;T=mh;q[Ye+12>>2]=jh;q[Ye+8>>2]=0;q[Ye>>2]=0;q[Ye+4>>2]=0;Zg(Ye+16|0);Zg(Ye+36|0);Zg(Ye+56|0);Zg(Ye+76|0);q[Ye+104>>2]=0;q[Ye+96>>2]=0;q[Ye+100>>2]=0;a:{b:{c:{if(jh){if(jh>>>0>=1073741824){break c}kh=jh<<2;lh=Mm(kh);q[Ye+96>>2]=lh;q[Ye+100>>2]=lh;q[Ye+104>>2]=lh+kh;Dn(lh,0,kh);kh=jh;while(1){lh=lh+4|0;kh=kh+ -1|0;if(kh){continue}break}q[Ye+100>>2]=lh}q[Ye+108>>2]=0;q[Ye+112>>2]=0;q[Ye+116>>2]=0;if(jh){if(jh>>>0>=1073741824){break b}kh=jh<<2;lh=Mm(kh);q[Ye+108>>2]=lh;q[Ye+112>>2]=lh;q[Ye+116>>2]=lh+kh;Dn(lh,0,kh);kh=jh;while(1){lh=lh+4|0;kh=kh+ -1|0;if(kh){continue}break}q[Ye+112>>2]=lh}q[mh+8>>2]=0;q[mh>>2]=0;q[mh+4>>2]=0;if(jh){if(jh>>>0>=1073741824){break a}kh=jh<<2;lh=Mm(kh);q[mh>>2]=lh;q[mh+4>>2]=lh;q[mh+8>>2]=lh+kh;Dn(lh,0,kh);kh=jh;while(1){lh=lh+4|0;kh=kh+ -1|0;if(kh){continue}break}q[mh+4>>2]=lh}nh=jh<<5|1;_d(Ye+120|0,nh,mh);kh=q[mh>>2];if(kh){q[mh+4>>2]=kh;An(kh)}q[mh+8>>2]=0;q[mh>>2]=0;q[mh+4>>2]=0;if(jh){if(jh>>>0>=1073741824){break a}kh=jh<<2;lh=Mm(kh);q[mh>>2]=lh;q[mh+4>>2]=lh;q[mh+8>>2]=lh+kh;Dn(lh,0,kh);while(1){lh=lh+4|0;jh=jh+ -1|0;if(jh){continue}break}q[mh+4>>2]=lh}_d(Ye+132|0,nh,mh);jh=q[mh>>2];if(jh){q[mh+4>>2]=jh;An(jh)}T=mh+16|0;return Ye}bn();F()}bn();F()}bn();F()}function Pd(Ye,jh,oh){var ph=0,qh=0,rh=0,sh=0,th=0,uh=0;qh=q[jh+12>>2];a:{rh=q[jh+20>>2];sh=q[jh+16>>2];ph=sh+4|0;if(ph>>>0<4){rh=rh+1|0}if((qh|0)<(rh|0)?1:(qh|0)<=(rh|0)?t[jh+8>>2]>=ph>>>0?0:1:0){break a}ph=sh+q[jh>>2]|0;ph=r[ph|0]|r[ph+1|0]<<8|(r[ph+2|0]<<16|r[ph+3|0]<<24);q[Ye>>2]=ph;qh=q[jh+20>>2];sh=qh;th=q[jh+16>>2];rh=th+4|0;if(rh>>>0<4){qh=qh+1|0}q[jh+16>>2]=rh;q[jh+20>>2]=qh;if(ph>>>0>32){break a}qh=q[jh+12>>2];ph=th+8|0;if(ph>>>0<8){sh=sh+1|0}if((qh|0)<(sh|0)?1:(qh|0)<=(sh|0)?t[jh+8>>2]>=ph>>>0?0:1:0){break a}ph=rh+q[jh>>2]|0;qh=r[ph|0]|r[ph+1|0]<<8|(r[ph+2|0]<<16|r[ph+3|0]<<24);q[Ye+4>>2]=qh;rh=q[jh+20>>2];sh=q[jh+16>>2]+4|0;if(sh>>>0<4){rh=rh+1|0}q[jh+16>>2]=sh;q[jh+20>>2]=rh;if(!qh){uh=1;break a}q[Ye+8>>2]=0;if(!$g(Ye+16|0,jh)){break a}if(!$g(Ye+36|0,jh)){break a}if(!$g(Ye+56|0,jh)){break a}if(!$g(Ye+76|0,jh)){break a}return $d(Ye,q[Ye+4>>2],oh)}return uh}function Qd(Ye,jh,oh){var vh=0,wh=0,xh=0,yh=0,zh=0,Ah=0;wh=q[jh+12>>2];a:{xh=q[jh+20>>2];yh=q[jh+16>>2];vh=yh+4|0;if(vh>>>0<4){xh=xh+1|0}if((wh|0)<(xh|0)?1:(wh|0)<=(xh|0)?t[jh+8>>2]>=vh>>>0?0:1:0){break a}vh=yh+q[jh>>2]|0;vh=r[vh|0]|r[vh+1|0]<<8|(r[vh+2|0]<<16|r[vh+3|0]<<24);q[Ye>>2]=vh;wh=q[jh+20>>2];yh=wh;zh=q[jh+16>>2];xh=zh+4|0;if(xh>>>0<4){wh=wh+1|0}q[jh+16>>2]=xh;q[jh+20>>2]=wh;if(vh>>>0>32){break a}wh=q[jh+12>>2];vh=zh+8|0;if(vh>>>0<8){yh=yh+1|0}if((wh|0)<(yh|0)?1:(wh|0)<=(yh|0)?t[jh+8>>2]>=vh>>>0?0:1:0){break a}vh=xh+q[jh>>2]|0;wh=r[vh|0]|r[vh+1|0]<<8|(r[vh+2|0]<<16|r[vh+3|0]<<24);q[Ye+4>>2]=wh;xh=q[jh+20>>2];yh=q[jh+16>>2]+4|0;if(yh>>>0<4){xh=xh+1|0}q[jh+16>>2]=yh;q[jh+20>>2]=xh;if(!wh){Ah=1;break a}q[Ye+8>>2]=0;if(!bh(Ye+16|0,jh)){break a}if(!$g(Ye+32|0,jh)){break a}if(!$g(Ye+52|0,jh)){break a}if(!$g(Ye+72|0,jh)){break a}return ae(Ye,q[Ye+4>>2],oh)}return Ah}function Rd(Ye){var jh=0,oh=0,Bh=0,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eh+8>>2]>=Qh>>>0?0:1:0){break a}Qh=Sh+q[Eh>>2]|0;Rh=r[Qh|0]|r[Qh+1|0]<<8|(r[Qh+2|0]<<16|r[Qh+3|0]<<24);q[Ye+4>>2]=Rh;Sh=q[Eh+20>>2];Th=q[Eh+16>>2]+4|0;if(Th>>>0<4){Sh=Sh+1|0}q[Eh+16>>2]=Th;q[Eh+20>>2]=Sh;if(!Rh){Vh=1;break a}q[Ye+8>>2]=0;Qh=0;while(1){if(!bh(((Qh<<4)+Ye|0)+16|0,Eh)){break a}Qh=Qh+1|0;if((Qh|0)!=32){continue}break}if(!bh(Ye+528|0,Eh)){break a}if(!$g(Ye+544|0,Eh)){break a}if(!$g(Ye+564|0,Eh)){break a}if(!$g(Ye+584|0,Eh)){break a}return ce(Ye,q[Ye+4>>2],Jh)}return Vh}function Vd(Ye){var Eh=0,Jh=0,Wh=0,Xh=0,Yh=0;Wh=q[Ye+640>>2];if(Wh){Yh=Ye+644|0;Eh=q[Yh>>2];Jh=Wh;a:{if((Wh|0)==(Eh|0)){break a}while(1){Jh=Eh+ -12|0;Xh=q[Jh>>2];if(Xh){q[Eh+ -8>>2]=Xh;An(Xh)}Eh=Jh;if((Eh|0)!=(Wh|0)){continue}break}Jh=q[Ye+640>>2]}q[Yh>>2]=Wh;An(Jh)}Wh=q[Ye+628>>2];if(Wh){Yh=Ye+632|0;Eh=q[Yh>>2];Jh=Wh;b:{if((Wh|0)==(Eh|0)){break b}while(1){Jh=Eh+ -12|0;Xh=q[Jh>>2];if(Xh){q[Eh+ -8>>2]=Xh;An(Xh)}Eh=Jh;if((Eh|0)!=(Wh|0)){continue}break}Jh=q[Ye+628>>2]}q[Yh>>2]=Wh;An(Jh)}Eh=q[Ye+616>>2];if(Eh){q[Ye+620>>2]=Eh;An(Eh)}Eh=q[Ye+604>>2];if(Eh){q[Ye+608>>2]=Eh;An(Eh)}_g(Ye+584|0);_g(Ye+564|0);_g(Ye+544|0)}function Wd(Ye,Zh){var _h=0,$h=0,ai=0,bi=0;ai=T-16|0;T=ai;q[Ye+12>>2]=Zh;q[Ye+8>>2]=0;q[Ye>>2]=0;q[Ye+4>>2]=0;de(Ye+16|0);ah(Ye+528|0);Zg(Ye+544|0);Zg(Ye+564|0);Zg(Ye+584|0);q[Ye+612>>2]=0;q[Ye+604>>2]=0;q[Ye+608>>2]=0;a:{b:{c:{if(Zh){if(Zh>>>0>=1073741824){break c}_h=Zh<<2;$h=Mm(_h);q[Ye+604>>2]=$h;q[Ye+608>>2]=$h;q[Ye+612>>2]=$h+_h;Dn($h,0,_h);_h=Zh;while(1){$h=$h+4|0;_h=_h+ -1|0;if(_h){continue}break}q[Ye+608>>2]=$h}q[Ye+616>>2]=0;q[Ye+620>>2]=0;q[Ye+624>>2]=0;if(Zh){if(Zh>>>0>=1073741824){break b}_h=Zh<<2;$h=Mm(_h);q[Ye+616>>2]=$h;q[Ye+620>>2]=$h;q[Ye+624>>2]=$h+_h;Dn($h,0,_h);_h=Zh;while(1){$h=$h+4|0;_h=_h+ -1|0;if(_h){continue}break}q[Ye+620>>2]=$h}q[ai+8>>2]=0;q[ai>>2]=0;q[ai+4>>2]=0;if(Zh){if(Zh>>>0>=1073741824){break a}_h=Zh<<2;$h=Mm(_h);q[ai>>2]=$h;q[ai+4>>2]=$h;q[ai+8>>2]=$h+_h;Dn($h,0,_h);_h=Zh;while(1){$h=$h+4|0;_h=_h+ -1|0;if(_h){continue}break}q[ai+4>>2]=$h}bi=Zh<<5|1;_d(Ye+628|0,bi,ai);_h=q[ai>>2];if(_h){q[ai+4>>2]=_h;An(_h)}q[ai+8>>2]=0;q[ai>>2]=0;q[ai+4>>2]=0;if(Zh){if(Zh>>>0>=1073741824){break a}_h=Zh<<2;$h=Mm(_h);q[ai>>2]=$h;q[ai+4>>2]=$h;q[ai+8>>2]=$h+_h;Dn($h,0,_h);while(1){$h=$h+4|0;Zh=Zh+ -1|0;if(Zh){continue}break}q[ai+4>>2]=$h}_d(Ye+640|0,bi,ai);Zh=q[ai>>2];if(Zh){q[ai+4>>2]=Zh;An(Zh)}T=ai+16|0;return Ye}bn();F()}bn();F()}bn();F()}function Xd(Ye,Zh,ci){var di=0,ei=0,fi=0,gi=0,hi=0,ii=0;ei=q[Zh+12>>2];a:{fi=q[Zh+20>>2];gi=q[Zh+16>>2];di=gi+4|0;if(di>>>0<4){fi=fi+1|0}if((ei|0)<(fi|0)?1:(ei|0)<=(fi|0)?t[Zh+8>>2]>=di>>>0?0:1:0){break a}di=gi+q[Zh>>2]|0;di=r[di|0]|r[di+1|0]<<8|(r[di+2|0]<<16|r[di+3|0]<<24);q[Ye>>2]=di;ei=q[Zh+20>>2];gi=ei;hi=q[Zh+16>>2];fi=hi+4|0;if(fi>>>0<4){ei=ei+1|0}q[Zh+16>>2]=fi;q[Zh+20>>2]=ei;if(di>>>0>32){break a}ei=q[Zh+12>>2];di=hi+8|0;if(di>>>0<8){gi=gi+1|0}if((ei|0)<(gi|0)?1:(ei|0)<=(gi|0)?t[Zh+8>>2]>=di>>>0?0:1:0){break a}di=fi+q[Zh>>2]|0;ei=r[di|0]|r[di+1|0]<<8|(r[di+2|0]<<16|r[di+3|0]<<24);q[Ye+4>>2]=ei;fi=q[Zh+20>>2];gi=q[Zh+16>>2]+4|0;if(gi>>>0<4){fi=fi+1|0}q[Zh+16>>2]=gi;q[Zh+20>>2]=fi;if(!ei){ii=1;break a}q[Ye+8>>2]=0;di=0;while(1){if(!bh(((di<<4)+Ye|0)+16|0,Zh)){break a}di=di+1|0;if((di|0)!=32){continue}break}if(!bh(Ye+528|0,Zh)){break a}if(!$g(Ye+544|0,Zh)){break a}if(!$g(Ye+564|0,Zh)){break a}if(!$g(Ye+584|0,Zh)){break a}return ee(Ye,q[Ye+4>>2],ci)}return ii}function Yd(Ye,Zh,ci){var ji=0,ki=0,li=0,mi=0,ni=0,oi=0;ki=q[Zh+12>>2];a:{li=q[Zh+20>>2];mi=q[Zh+16>>2];ji=mi+4|0;if(ji>>>0<4){li=li+1|0}if((ki|0)<(li|0)?1:(ki|0)<=(li|0)?t[Zh+8>>2]>=ji>>>0?0:1:0){break a}ji=mi+q[Zh>>2]|0;ji=r[ji|0]|r[ji+1|0]<<8|(r[ji+2|0]<<16|r[ji+3|0]<<24);q[Ye>>2]=ji;ki=q[Zh+20>>2];mi=ki;ni=q[Zh+16>>2];li=ni+4|0;if(li>>>0<4){ki=ki+1|0}q[Zh+16>>2]=li;q[Zh+20>>2]=ki;if(ji>>>0>32){break a}ki=q[Zh+12>>2];ji=ni+8|0;if(ji>>>0<8){mi=mi+1|0}if((ki|0)<(mi|0)?1:(ki|0)<=(mi|0)?t[Zh+8>>2]>=ji>>>0?0:1:0){break a}ji=li+q[Zh>>2]|0;ki=r[ji|0]|r[ji+1|0]<<8|(r[ji+2|0]<<16|r[ji+3|0]<<24);q[Ye+4>>2]=ki;li=q[Zh+20>>2];mi=q[Zh+16>>2]+4|0;if(mi>>>0<4){li=li+1|0}q[Zh+16>>2]=mi;q[Zh+20>>2]=li;if(!ki){oi=1;break a}q[Ye+8>>2]=0;ji=0;while(1){if(!bh(((ji<<4)+Ye|0)+16|0,Zh)){break a}ji=ji+1|0;if((ji|0)!=32){continue}break}if(!bh(Ye+528|0,Zh)){break a}if(!$g(Ye+544|0,Zh)){break a}if(!$g(Ye+564|0,Zh)){break a}if(!$g(Ye+584|0,Zh)){break a}return fe(Ye,q[Ye+4>>2],ci)}return oi}function Zd(Ye,Zh,ci){var pi=0,qi=0,ri=0,si=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,zi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0,Gi=0,Hi=0,Ii=0,Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0;si=T-32|0;T=si;qi=q[Ye+12>>2];q[si+16>>2]=0;q[si+8>>2]=0;q[si+12>>2]=0;a:{if(qi){if(qi>>>0>=1073741824){break a}pi=qi<<2;ri=Mm(pi);q[si+8>>2]=ri;q[si+12>>2]=ri;q[si+16>>2]=pi+ri;ui=Dn(ri,0,pi);pi=qi;while(1){ui=ui+4|0;pi=pi+ -1|0;if(pi){continue}break}q[si+12>>2]=ui}ti=q[Ye+120>>2];pi=q[ti>>2];if(pi){q[ti+4>>2]=pi;An(pi);q[ti+8>>2]=0;q[ti>>2]=0;q[ti+4>>2]=0;qi=q[Ye+12>>2];ui=q[si+12>>2];ri=q[si+8>>2]}q[ti>>2]=ri;q[ti+4>>2]=ui;q[ti+8>>2]=q[si+16>>2];ui=0;q[si+16>>2]=0;q[si+8>>2]=0;q[si+12>>2]=0;pi=0;b:{if(qi){if(qi>>>0>=1073741824){break b}ri=qi<<2;pi=Mm(ri);q[si+8>>2]=pi;q[si+12>>2]=pi;q[si+16>>2]=pi+ri;ui=Dn(pi,0,ri);while(1){ui=ui+4|0;qi=qi+ -1|0;if(qi){continue}break}q[si+12>>2]=ui}ti=q[Ye+132>>2];ri=q[ti>>2];if(ri){q[ti+4>>2]=ri;An(ri);q[ti+8>>2]=0;q[ti>>2]=0;q[ti+4>>2]=0;ui=q[si+12>>2];pi=q[si+8>>2]}q[ti>>2]=pi;q[ti+4>>2]=ui;q[ti+8>>2]=q[si+16>>2];qi=si+24|0;q[qi>>2]=0;q[qi+4>>2]=0;ri=si+16|0;q[ri>>2]=0;q[ri+4>>2]=0;q[si+8>>2]=0;q[si+12>>2]=0;re(si+8|0);ti=q[si+12>>2];pi=0;c:{if((ti|0)==q[ri>>2]){break c}ri=q[qi>>2]+q[si+28>>2]|0;pi=(ri>>>0)/341|0;pi=q[ti+(pi<<2)>>2]+w(ri-w(pi,341)|0,12)|0}q[pi+4>>2]=0;q[pi+8>>2]=0;q[pi>>2]=Zh;pi=1;ri=q[si+28>>2];qi=ri+1|0;q[si+28>>2]=qi;d:{if(qi>>>0>>0){break d}Li=Ye+132|0;Ki=Ye+120|0;Gi=ci+20|0;Mi=Ye+108|0;Ni=Ye+96|0;Hi=Ye+48|0;Ii=Ye+28|0;Oi=Ye+80|0;while(1){pi=q[si+12>>2];vi=q[si+24>>2];wi=qi+ -1|0;ti=vi+wi|0;ri=(ti>>>0)/341|0;ri=q[pi+(ri<<2)>>2]+w(ti-w(ri,341)|0,12)|0;Ai=q[ri+8>>2];ti=q[ri+4>>2];zi=q[ri>>2];q[si+28>>2]=wi;ri=q[si+16>>2];pi=ri-pi|0;if(((pi?w(pi>>2,341)+ -1|0:0)-(qi+vi|0)|0)+1>>>0>=682){An(q[ri+ -4>>2]);q[si+16>>2]=q[si+16>>2]+ -4}pi=0;if(zi>>>0>Zh>>>0){break d}ri=q[Ki>>2];Bi=w(Ai,12);Ei=Bi+q[Li>>2]|0;ui=ml(Ye,Ei,ti);if(ui>>>0>=t[Ye+12>>2]){break d}Fi=ri+Bi|0;e:{f:{Ci=ui<<2;ti=q[Ye>>2]-q[Ci+q[Ei>>2]>>2]|0;if(!ti){if(!zi){break f}xi=0;while(1){ti=0;qi=q[ci+16>>2];g:{if((qi|0)==q[Gi>>2]){break g}while(1){qi=w(ti,20)+qi|0;ri=q[Fi>>2]+(q[qi+4>>2]<<2)|0;yi=q[qi>>2];ui=q[qi+12>>2];h:{if(ui>>>0>3){break h}pi=q[ci+12>>2];vi=qi+16|0;if(!q[vi>>2]){ri=pi;break h}wi=qi+12|0;qi=0;while(1){pi=Cn(pi,(qi<<2)+ri|0,ui);ui=q[wi>>2];pi=pi+ui|0;qi=qi+1|0;if(qi>>>0>2]){continue}break}ri=q[ci+12>>2]}qi=q[ci+28>>2];qi=r[yi+84|0]?qi:q[q[yi+68>>2]+(qi<<2)>>2];if(qi>>>0>=t[yi+80>>2]){break g}pi=q[yi+40>>2];Cn(q[q[yi>>2]>>2]+w(pi,qi)|0,ri,pi);ti=ti+1|0;qi=q[ci+16>>2];if(ti>>>0<(q[Gi>>2]-qi|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;xi=xi+1|0;if((zi|0)!=(xi|0)){continue}break}break f}i:{j:{k:{l:{if(zi>>>0<=2){ri=q[Mi>>2];q[ri>>2]=ui;pi=1;qi=q[Ye+12>>2];if(qi>>>0>1){break l}break i}if(t[Ye+8>>2]>t[Ye+4>>2]){break d}pi=q[Ki>>2];xi=Ai+1|0;yi=w(xi,12);ri=pi+yi|0;if((ri|0)!=(Fi|0)){hd(ri,q[Fi>>2],q[Fi+4>>2]);pi=q[Ki>>2]}pi=Ci+q[pi+yi>>2]|0;q[pi>>2]=q[pi>>2]+(1<>2];ti=32-wi|0;m:{if((vi|0)<=(ti|0)){ti=q[Ii>>2];if((ti|0)==q[Ye+20>>2]){pi=0;break m}pi=q[ti>>2];ri=vi+wi|0;q[Ye+32>>2]=ri;pi=pi<>>32-vi;if((ri|0)!=32){break m}q[Ye+32>>2]=0;q[Ii>>2]=ti+4;break m}qi=q[Ii>>2];pi=qi+4|0;if((pi|0)==q[Ye+20>>2]){pi=0;break m}ri=q[qi>>2];q[Ii>>2]=pi;pi=vi-ti|0;q[Ye+32>>2]=pi;pi=q[qi+4>>2]>>>32-pi|ri<>>32-vi}ri=(zi>>>1)-pi|0;pi=zi-ri|0;n:{if((pi|0)==(ri|0)){pi=ri;break n}vi=q[Ye+88>>2];if((vi|0)==q[Oi>>2]){break k}wi=q[vi>>2];qi=q[Ye+92>>2];ti=qi+1|0;q[Ye+92>>2]=ti;qi=wi&-2147483648>>>qi;o:{if((ti|0)==32){q[Ye+92>>2]=0;q[Ye+88>>2]=vi+4;if(qi){break o}break k}if(!qi){break k}}}ti=pi;pi=ri;break j}while(1){ui=(qi+ -1|0)==(ui|0)?0:ui+1|0;q[ri+(pi<<2)>>2]=ui;pi=pi+1|0;qi=q[Ye+12>>2];if(pi>>>0>>0){continue}break}break i}ti=ri}vi=q[Li>>2];wi=vi+Bi|0;qi=q[wi>>2];ri=qi+Ci|0;q[ri>>2]=q[ri>>2]+1;hd(vi+yi|0,qi,q[wi+4>>2]);if(pi){ri=q[si+28>>2]+q[si+24>>2]|0;vi=q[si+16>>2];qi=q[si+12>>2];wi=vi-qi|0;if((ri|0)==((wi?w(wi>>2,341)+ -1|0:0)|0)){re(si+8|0);qi=q[si+12>>2];vi=q[si+16>>2];ri=q[si+24>>2]+q[si+28>>2]|0}if((qi|0)==(vi|0)){ri=0}else{Ei=qi;qi=(ri>>>0)/341|0;ri=q[Ei+(qi<<2)>>2]+w(ri-w(qi,341)|0,12)|0}q[ri+8>>2]=Ai;q[ri+4>>2]=ui;q[ri>>2]=pi;q[si+28>>2]=q[si+28>>2]+1}if(!ti){break f}pi=q[si+28>>2]+q[si+24>>2]|0;ri=q[si+16>>2];qi=q[si+12>>2];wi=ri-qi|0;if((pi|0)==((wi?w(wi>>2,341)+ -1|0:0)|0)){re(si+8|0);ri=q[si+16>>2];qi=q[si+12>>2];pi=q[si+24>>2]+q[si+28>>2]|0}if((qi|0)==(ri|0)){pi=0}else{ri=(pi>>>0)/341|0;pi=q[(ri<<2)+qi>>2]+w(pi-w(ri,341)|0,12)|0}q[pi+8>>2]=xi;q[pi+4>>2]=ui;q[pi>>2]=ti;qi=q[si+28>>2]+1|0;q[si+28>>2]=qi;break e}if(!zi){break f}Ai=0;while(1){if(qi){ui=q[Ni>>2];xi=q[Mi>>2];vi=q[Fi>>2];wi=q[Ei>>2];qi=0;while(1){Bi=xi+(qi<<2)|0;q[ui+(q[Bi>>2]<<2)>>2]=0;pi=q[Bi>>2]<<2;Di=q[Ye>>2]-q[pi+wi>>2]|0;p:{if(!Di){break p}Ji=pi+ui|0;Ci=q[Ye+52>>2];ti=32-Ci|0;if((Di|0)<=(ti|0)){ri=q[Hi>>2];if((ri|0)==q[Ye+40>>2]){q[Ji>>2]=0;break p}q[Ji>>2]=q[ri>>2]<>>32-Di;pi=Di+q[Ye+52>>2]|0;q[Ye+52>>2]=pi;if((pi|0)!=32){break p}q[Ye+52>>2]=0;q[Hi>>2]=ri+4;break p}yi=q[Hi>>2];pi=yi+4|0;if((pi|0)==q[Ye+40>>2]){q[Ji>>2]=0;break p}ri=q[yi>>2];q[Hi>>2]=pi;pi=Di-ti|0;q[Ye+52>>2]=pi;q[Ji>>2]=q[yi+4>>2]>>>32-pi|ri<>>32-Di}ri=q[Bi>>2]<<2;pi=ri+ui|0;q[pi>>2]=q[pi>>2]|q[ri+vi>>2];qi=qi+1|0;if(qi>>>0>2]){continue}break}}ti=0;qi=q[ci+16>>2];q:{if((qi|0)==q[Gi>>2]){break q}while(1){qi=w(ti,20)+qi|0;ri=q[Ni>>2]+(q[qi+4>>2]<<2)|0;xi=q[qi>>2];ui=q[qi+12>>2];r:{if(ui>>>0>3){break r}pi=q[ci+12>>2];vi=qi+16|0;if(!q[vi>>2]){ri=pi;break r}wi=qi+12|0;qi=0;while(1){pi=Cn(pi,(qi<<2)+ri|0,ui);ui=q[wi>>2];pi=pi+ui|0;qi=qi+1|0;if(qi>>>0>2]){continue}break}ri=q[ci+12>>2]}qi=q[ci+28>>2];qi=r[xi+84|0]?qi:q[q[xi+68>>2]+(qi<<2)>>2];if(qi>>>0>=t[xi+80>>2]){break q}pi=q[xi+40>>2];Cn(q[q[xi>>2]>>2]+w(pi,qi)|0,ri,pi);ti=ti+1|0;qi=q[ci+16>>2];if(ti>>>0<(q[Gi>>2]-qi|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;Ai=Ai+1|0;if((Ai|0)==(zi|0)){break f}qi=q[Ye+12>>2];continue}}qi=q[si+28>>2]}if(qi){continue}break}pi=1}se(si+8|0);qi=q[si+12>>2];Ye=q[si+16>>2];s:{if((qi|0)==(Ye|0)){break s}while(1){An(q[qi>>2]);qi=qi+4|0;if((Ye|0)!=(qi|0)){continue}break}Zh=q[si+16>>2];Ye=q[si+12>>2];if((Zh|0)==(Ye|0)){break s}q[si+16>>2]=Zh+(((Zh-Ye|0)+ -4>>>2^-1)<<2)}Ye=q[si+8>>2];if(Ye){An(Ye)}T=si+32|0;return pi}bn();F()}bn();F()}function _d(Ye,Zh,ci){var Pi=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0)){continue}break}break f}i:{j:{k:{l:{if(aj>>>0<=2){Zi=q[pj>>2];q[Zi>>2]=$i;Xi=1;Yi=q[Ye+12>>2];if(Yi>>>0>1){break l}break i}if(t[Ye+8>>2]>t[Ye+4>>2]){break d}Zi=Xi;Xi=Yi+12|0;hd(Zi+Xi|0,q[fj>>2],q[fj+4>>2]);Xi=bj+q[Xi+q[nj>>2]>>2]|0;q[Xi>>2]=q[Xi>>2]+(1<>2];cj=32-Zi|0;m:{if((Xi|0)<=(cj|0)){fj=q[lj>>2];if((fj|0)==q[Ye+20>>2]){Zi=0;break m}cj=q[fj>>2];dj=Xi+Zi|0;q[Ye+32>>2]=dj;Zi=cj<>>32-Xi;if((dj|0)!=32){break m}q[Ye+32>>2]=0;q[lj>>2]=fj+4;break m}fj=q[lj>>2];dj=fj+4|0;if((dj|0)==q[Ye+20>>2]){Zi=0;break m}gj=q[fj>>2];q[lj>>2]=dj;cj=Xi-cj|0;q[Ye+32>>2]=cj;Zi=q[fj+4>>2]>>>32-cj|gj<>>32-Xi}fj=ej+1|0;Xi=(aj>>>1)-Zi|0;Zi=aj-Xi|0;n:{if((Zi|0)==(Xi|0)){Zi=Xi;break n}aj=q[Ye+88>>2];if((aj|0)==q[sj>>2]){break k}cj=q[aj>>2];dj=q[Ye+92>>2];gj=dj+1|0;q[Ye+92>>2]=gj;cj=cj&-2147483648>>>dj;o:{if((gj|0)==32){q[Ye+92>>2]=0;q[Ye+88>>2]=aj+4;if(cj){break o}break k}if(!cj){break k}}}aj=Zi;Zi=Xi;break j}while(1){$i=(Yi+ -1|0)==($i|0)?0:$i+1|0;q[Zi+(Xi<<2)>>2]=$i;Xi=Xi+1|0;Yi=q[Ye+12>>2];if(Xi>>>0>>0){continue}break}break i}aj=Xi}hj=bj;Xi=q[oj>>2];Yi=Xi+Yi|0;bj=q[Yi>>2];cj=hj+bj|0;q[cj>>2]=q[cj>>2]+1;hd(Xi+w(fj,12)|0,bj,q[Yi+4>>2]);if(Zi){Xi=q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){break p}q[Ye+52>>2]=0;q[kj>>2]=dj+4;break p}dj=q[kj>>2];rj=dj+4|0;if((rj|0)==q[Ye+40>>2]){q[Zi>>2]=0;break p}hj=q[dj>>2];q[kj>>2]=rj;ij=Xi-ij|0;q[Ye+52>>2]=ij;q[Zi>>2]=q[dj+4>>2]>>>32-ij|hj<>>32-Xi}Xi=q[ej>>2]<<2;Zi=Xi+$i|0;q[Zi>>2]=q[Zi>>2]|q[Xi+tj>>2];Yi=Yi+1|0;if(Yi>>>0>2]){continue}break}}ej=0;Yi=q[ci+16>>2];q:{if((Yi|0)==q[jj>>2]){break q}while(1){Yi=w(ej,20)+Yi|0;Zi=q[qj>>2]+(q[Yi+4>>2]<<2)|0;bj=q[Yi>>2];$i=q[Yi+12>>2];r:{if($i>>>0>3){break r}Xi=q[ci+12>>2];dj=Yi+16|0;if(!q[dj>>2]){Zi=Xi;break r}mj=Yi+12|0;Yi=0;while(1){Xi=Cn(Xi,(Yi<<2)+Zi|0,$i);$i=q[mj>>2];Xi=Xi+$i|0;Yi=Yi+1|0;if(Yi>>>0>2]){continue}break}Zi=q[ci+12>>2]}Yi=q[ci+28>>2];Yi=r[bj+84|0]?Yi:q[q[bj+68>>2]+(Yi<<2)>>2];if(Yi>>>0>=t[bj+80>>2]){break q}Xi=q[bj+40>>2];Cn(q[q[bj>>2]>>2]+w(Xi,Yi)|0,Zi,Xi);ej=ej+1|0;Yi=q[ci+16>>2];if(ej>>>0<(q[jj>>2]-Yi|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;cj=cj+1|0;if((cj|0)==(aj|0)){break f}Yi=q[Ye+12>>2];continue}}Yi=q[_i+28>>2]}if(Yi){continue}break}Zi=1}se(_i+8|0);Yi=q[_i+12>>2];Ye=q[_i+16>>2];s:{if((Yi|0)==(Ye|0)){break s}while(1){An(q[Yi>>2]);Yi=Yi+4|0;if((Ye|0)!=(Yi|0)){continue}break}Ye=q[_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1){vj=w(zj,20)+vj|0;xj=q[Kj>>2]+(q[vj+4>>2]<<2)|0;Ej=q[vj>>2];Aj=q[vj+12>>2];g:{if(Aj>>>0>3){break g}wj=q[ci+12>>2];Bj=vj+16|0;if(!q[Bj>>2]){xj=wj;break g}Cj=vj+12|0;vj=0;while(1){wj=Cn(wj,(vj<<2)+xj|0,Aj);Aj=q[Cj>>2];wj=wj+Aj|0;vj=vj+1|0;if(vj>>>0>2]){continue}break}xj=q[ci+12>>2]}vj=q[ci+28>>2];vj=r[Ej+84|0]?vj:q[q[Ej+68>>2]+(vj<<2)>>2];if(vj>>>0>=t[Ej+80>>2]){break f}wj=q[Ej+40>>2];Cn(q[q[Ej>>2]>>2]+w(wj,vj)|0,xj,wj);zj=zj+1|0;vj=q[ci+16>>2];if(zj>>>0<(q[Lj>>2]-vj|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;Dj=Dj+1|0;if((Fj|0)!=(Dj|0)){continue}break}break e}h:{i:{j:{k:{if(Fj>>>0<=2){xj=q[Rj>>2];q[xj>>2]=Aj;wj=1;vj=q[Ye+12>>2];if(vj>>>0>1){break k}break h}if(t[Ye+8>>2]>t[Ye+4>>2]){break d}wj=q[Oj>>2];Dj=Gj+1|0;Ej=w(Dj,12);xj=wj+Ej|0;if((xj|0)!=(Kj|0)){hd(xj,q[Kj>>2],q[Kj+4>>2]);wj=q[Oj>>2]}wj=Ij+q[wj+Ej>>2]|0;q[wj>>2]=q[wj>>2]+(1<>2]=0;eh(Uj,z(Fj)^31,yj+4|0);xj=(Fj>>>1)-q[yj+4>>2]|0;wj=Fj-xj|0;l:{if((wj|0)==(xj|0)){wj=xj;break l}Bj=q[Ye+84>>2];if((Bj|0)==q[Vj>>2]){break j}Cj=q[Bj>>2];vj=q[Ye+88>>2];zj=vj+1|0;q[Ye+88>>2]=zj;vj=Cj&-2147483648>>>vj;m:{if((zj|0)==32){q[Ye+88>>2]=0;q[Ye+84>>2]=Bj+4;if(vj){break m}break j}if(!vj){break j}}}zj=wj;wj=xj;break i}while(1){Aj=(vj+ -1|0)==(Aj|0)?0:Aj+1|0;q[xj+(wj<<2)>>2]=Aj;wj=wj+1|0;vj=q[Ye+12>>2];if(wj>>>0>>0){continue}break}break h}zj=xj}Bj=q[Qj>>2];Cj=Bj+Hj|0;vj=q[Cj>>2];xj=vj+Ij|0;q[xj>>2]=q[xj>>2]+1;hd(Bj+Ej|0,vj,q[Cj+4>>2]);if(wj){xj=q[yj+28>>2]+q[yj+24>>2]|0;Bj=q[yj+16>>2];vj=q[yj+12>>2];Cj=Bj-vj|0;if((xj|0)==((Cj?w(Cj>>2,341)+ -1|0:0)|0)){re(yj+8|0);vj=q[yj+12>>2];Bj=q[yj+16>>2];xj=q[yj+24>>2]+q[yj+28>>2]|0}if((vj|0)==(Bj|0)){xj=0}else{Bj=vj;vj=(xj>>>0)/341|0;xj=q[Bj+(vj<<2)>>2]+w(xj-w(vj,341)|0,12)|0}q[xj+8>>2]=Gj;q[xj+4>>2]=Aj;q[xj>>2]=wj;q[yj+28>>2]=q[yj+28>>2]+1}if(!zj){break e}wj=q[yj+28>>2]+q[yj+24>>2]|0;xj=q[yj+16>>2];vj=q[yj+12>>2];Cj=xj-vj|0;if((wj|0)==((Cj?w(Cj>>2,341)+ -1|0:0)|0)){re(yj+8|0);xj=q[yj+16>>2];vj=q[yj+12>>2];wj=q[yj+24>>2]+q[yj+28>>2]|0}if((vj|0)==(xj|0)){wj=0}else{xj=(wj>>>0)/341|0;wj=q[(xj<<2)+vj>>2]+w(wj-w(xj,341)|0,12)|0}q[wj+8>>2]=Dj;q[wj+4>>2]=Aj;q[wj>>2]=zj;q[yj+28>>2]=q[yj+28>>2]+1;break e}if(!Fj){break e}Gj=0;while(1){if(vj){Aj=q[Sj>>2];Dj=q[Rj>>2];Bj=q[Kj>>2];Cj=q[Pj>>2];vj=0;while(1){Hj=Dj+(vj<<2)|0;q[Aj+(q[Hj>>2]<<2)>>2]=0;wj=q[Hj>>2]<<2;Jj=q[Ye>>2]-q[wj+Cj>>2]|0;n:{if(!Jj){break n}Nj=wj+Aj|0;Ij=q[Ye+48>>2];zj=32-Ij|0;if((Jj|0)<=(zj|0)){xj=q[Mj>>2];if((xj|0)==q[Tj>>2]){q[Nj>>2]=0;break n}q[Nj>>2]=q[xj>>2]<>>32-Jj;wj=Jj+q[Ye+48>>2]|0;q[Ye+48>>2]=wj;if((wj|0)!=32){break n}q[Ye+48>>2]=0;q[Mj>>2]=xj+4;break n}Ej=q[Mj>>2];wj=Ej+4|0;if((wj|0)==q[Tj>>2]){q[Nj>>2]=0;break n}xj=q[Ej>>2];q[Mj>>2]=wj;wj=Jj-zj|0;q[Ye+48>>2]=wj;q[Nj>>2]=q[Ej+4>>2]>>>32-wj|xj<>>32-Jj}xj=q[Hj>>2]<<2;wj=xj+Aj|0;q[wj>>2]=q[wj>>2]|q[xj+Bj>>2];vj=vj+1|0;if(vj>>>0>2]){continue}break}}zj=0;vj=q[ci+16>>2];o:{if((vj|0)==q[Lj>>2]){break o}while(1){vj=w(zj,20)+vj|0;xj=q[Sj>>2]+(q[vj+4>>2]<<2)|0;Dj=q[vj>>2];Aj=q[vj+12>>2];p:{if(Aj>>>0>3){break p}wj=q[ci+12>>2];Bj=vj+16|0;if(!q[Bj>>2]){xj=wj;break p}Cj=vj+12|0;vj=0;while(1){wj=Cn(wj,(vj<<2)+xj|0,Aj);Aj=q[Cj>>2];wj=wj+Aj|0;vj=vj+1|0;if(vj>>>0>2]){continue}break}xj=q[ci+12>>2]}vj=q[ci+28>>2];vj=r[Dj+84|0]?vj:q[q[Dj+68>>2]+(vj<<2)>>2];if(vj>>>0>=t[Dj+80>>2]){break o}wj=q[Dj+40>>2];Cn(q[q[Dj>>2]>>2]+w(wj,vj)|0,xj,wj);zj=zj+1|0;vj=q[ci+16>>2];if(zj>>>0<(q[Lj>>2]-vj|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2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)|0)+1>>>0>=682){An(q[Wj+ -4>>2]);q[Zj+16>>2]=q[Zj+16>>2]+ -4}if($j>>>0>Zh>>>0){Yj=0;break d}Yj=0;Wj=q[Ye+12>>2];_j=(_j|0)==(Wj+ -1|0)?0:_j+1|0;if(_j>>>0>=Wj>>>0){break d}Wj=q[kk>>2];Xj=w(ck,12);ek=Wj+Xj|0;e:{ak=_j<<2;fk=Xj+q[lk>>2]|0;bk=q[Ye>>2]-q[ak+q[fk>>2]>>2]|0;if(!bk){if(!$j){break e}bk=0;while(1){ck=0;Xj=q[ci+16>>2];f:{if((Xj|0)==q[hk>>2]){break f}while(1){Xj=w(ck,20)+Xj|0;Yj=q[ek>>2]+(q[Xj+4>>2]<<2)|0;ak=q[Xj>>2];_j=q[Xj+12>>2];g:{if(_j>>>0>3){break g}Wj=q[ci+12>>2];dk=Xj+16|0;if(!q[dk>>2]){Yj=Wj;break g}fk=Xj+12|0;Xj=0;while(1){Wj=Cn(Wj,(Xj<<2)+Yj|0,_j);_j=q[fk>>2];Wj=Wj+_j|0;Xj=Xj+1|0;if(Xj>>>0>2]){continue}break}Yj=q[ci+12>>2]}Xj=q[ci+28>>2];Xj=r[ak+84|0]?Xj:q[q[ak+68>>2]+(Xj<<2)>>2];if(Xj>>>0>=t[ak+80>>2]){break f}Wj=q[ak+40>>2];Cn(q[q[ak>>2]>>2]+w(Wj,Xj)|0,Yj,Wj);ck=ck+1|0;Xj=q[ci+16>>2];if(ck>>>0<(q[hk>>2]-Xj|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;bk=bk+1|0;if(($j|0)!=(bk|0)){continue}break}break e}h:{i:{j:{k:{if($j>>>0<=2){Yj=q[mk>>2];q[Yj>>2]=_j;Wj=1;Xj=q[Ye+12>>2];if(Xj>>>0>1){break k}break h}if(t[Ye+8>>2]>t[Ye+4>>2]){break d}Yj=Wj;Wj=Xj+12|0;hd(Yj+Wj|0,q[ek>>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+16|0;if(!q[dk>>2]){Yj=Wj;break p}jk=Xj+12|0;Xj=0;while(1){Wj=Cn(Wj,(Xj<<2)+Yj|0,_j);_j=q[jk>>2];Wj=Wj+_j|0;Xj=Xj+1|0;if(Xj>>>0>2]){continue}break}Yj=q[ci+12>>2]}Xj=q[ci+28>>2];Xj=r[ak+84|0]?Xj:q[q[ak+68>>2]+(Xj<<2)>>2];if(Xj>>>0>=t[ak+80>>2]){break o}Wj=q[ak+40>>2];Cn(q[q[ak>>2]>>2]+w(Wj,Xj)|0,Yj,Wj);ck=ck+1|0;Xj=q[ci+16>>2];if(ck>>>0<(q[hk>>2]-Xj|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;bk=bk+1|0;if((bk|0)==($j|0)){break e}Xj=q[Ye+12>>2];continue}}Xj=q[Zj+28>>2];if(Xj){continue}break}Yj=1}se(Zj+8|0);Xj=q[Zj+12>>2];Ye=q[Zj+16>>2];q:{if((Xj|0)==(Ye|0)){break q}while(1){An(q[Xj>>2]);Xj=Xj+4|0;if((Ye|0)!=(Xj|0)){continue}break}Ye=q[Zj+16>>2];Zh=q[Zj+12>>2];if((Ye|0)==(Zh|0)){break q}q[Zj+16>>2]=Ye+(((Ye-Zh|0)+ -4>>>2^-1)<<2)}Ye=q[Zj+8>>2];if(Ye){An(Ye)}T=Zj+32|0;return Yj}bn();F()}bn();F()}function ce(Ye,Zh,ci){var vk=0,wk=0,xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0,Fk=0,Gk=0,Hk=0,Ik=0,Jk=0,Kk=0,Lk=0,Mk=0,Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0;yk=T-32|0;T=yk;vk=q[Ye+12>>2];q[yk+16>>2]=0;q[yk+8>>2]=0;q[yk+12>>2]=0;a:{if(vk){if(vk>>>0>=1073741824){break a}wk=vk<<2;xk=Mm(wk);q[yk+8>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[Jk>>2]-vk|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;Gk=Gk+1|0;if((zk|0)!=(Gk|0)){continue}break}break f}i:{j:{k:{l:{if(zk>>>0<=2){xk=q[Nk>>2];q[xk>>2]=Ak;wk=1;vk=q[Ye+12>>2];if(vk>>>0>1){break l}break i}if(t[Ye+8>>2]>t[Ye+4>>2]){break d}xk=q[Lk>>2];Ek=Ck+1|0;Gk=w(Ek,12);wk=xk+Gk|0;if((wk|0)!=(Dk|0)){hd(wk,q[Dk>>2],q[Dk+4>>2]);xk=q[Lk>>2]}xk=Fk+q[xk+Gk>>2]|0;q[xk>>2]=q[xk>>2]+(1<>>1)-wk|0;vk=zk-wk|0;m:{if((vk|0)==(wk|0)){vk=wk;break m}xk=q[Ye+596>>2];if((xk|0)==q[Rk>>2]){break k}zk=q[xk>>2];Dk=q[Ye+600>>2];Hk=Dk+1|0;q[Ye+600>>2]=Hk;zk=zk&-2147483648>>>Dk;n:{if((Hk|0)==32){q[Ye+600>>2]=0;q[Ye+596>>2]=xk+4;if(zk){break n}break k}if(!zk){break k}}}xk=vk;vk=wk;break j}while(1){Ak=(vk+ -1|0)==(Ak|0)?0:Ak+1|0;q[xk+(wk<<2)>>2]=Ak;wk=wk+1|0;vk=q[Ye+12>>2];if(wk>>>0>>0){continue}break}break i}xk=wk}wk=q[Mk>>2];zk=wk+Bk|0;Dk=q[zk>>2];Bk=Dk+Fk|0;q[Bk>>2]=q[Bk>>2]+1;hd(wk+Gk|0,Dk,q[zk+4>>2]);if(vk){Dk=q[yk+28>>2]+q[yk+24>>2]|0;Bk=q[yk+16>>2];wk=q[yk+12>>2];zk=Bk-wk|0;if((Dk|0)==((zk?w(zk>>2,341)+ -1|0:0)|0)){re(yk+8|0);Dk=q[yk+24>>2]+q[yk+28>>2]|0;Bk=q[yk+16>>2];wk=q[yk+12>>2]}zk=0;o:{if((wk|0)==(Bk|0)){break o}zk=w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<2;wk=xk+Ak|0;q[wk>>2]=q[wk>>2]|q[xk+Sk>>2];vk=vk+1|0;if(vk>>>0>2]){continue}break}}Ck=0;vk=q[ci+16>>2];q:{if((vk|0)==q[Jk>>2]){break q}while(1){vk=w(Ck,20)+vk|0;xk=q[Ok>>2]+(q[vk+4>>2]<<2)|0;Bk=q[vk>>2];Ak=q[vk+12>>2];r:{if(Ak>>>0>3){break r}wk=q[ci+12>>2];Ek=vk+16|0;if(!q[Ek>>2]){xk=wk;break r}Hk=vk+12|0;vk=0;while(1){wk=Cn(wk,(vk<<2)+xk|0,Ak);Ak=q[Hk>>2];wk=wk+Ak|0;vk=vk+1|0;if(vk>>>0>2]){continue}break}xk=q[ci+12>>2]}vk=q[ci+28>>2];vk=r[Bk+84|0]?vk:q[q[Bk+68>>2]+(vk<<2)>>2];if(vk>>>0>=t[Bk+80>>2]){break q}wk=vk;vk=q[Bk+40>>2];Cn(q[q[Bk>>2]>>2]+w(wk,vk)|0,xk,vk);Ck=Ck+1|0;vk=q[ci+16>>2];if(Ck>>>0<(q[Jk>>2]-vk|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;Fk=Fk+1|0;if((Fk|0)==(zk|0)){break f}vk=q[Ye+12>>2];continue}}vk=q[yk+28>>2]}if(vk){continue}break}wk=1}se(yk+8|0);vk=q[yk+12>>2];Ye=q[yk+16>>2];s:{if((vk|0)==(Ye|0)){break s}while(1){An(q[vk>>2]);vk=vk+4|0;if((Ye|0)!=(vk|0)){continue}break}Ye=q[yk+16>>2];Zh=q[yk+12>>2];if((Ye|0)==(Zh|0)){break s}q[yk+16>>2]=Ye+(((Ye-Zh|0)+ -4>>>2^-1)<<2)}Ye=q[yk+8>>2];if(Ye){An(Ye)}T=yk+32|0;return wk}bn();F()}bn();F()}function de(q){ah(q);ah(q+16|0);ah(q+32|0);ah(q+48|0);ah(q- -64|0);ah(q+80|0);ah(q+96|0);ah(q+112|0);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?Vk:q[q[al+68>>2]+(Vk<<2)>>2];if(Vk>>>0>=t[al+80>>2]){break q}Wk=Vk;Vk=q[al+40>>2];Cn(q[q[al>>2]>>2]+w(Wk,Vk)|0,Xk,Vk);$k=$k+1|0;Vk=q[ci+16>>2];if($k>>>0<(q[gl>>2]-Vk|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;bl=bl+1|0;if((bl|0)==(_k|0)){break f}Vk=q[Ye+12>>2];continue}}Vk=q[Yk+28>>2]}if(Vk){continue}break}Xk=1}se(Yk+8|0);Vk=q[Yk+12>>2];Ye=q[Yk+16>>2];s:{if((Vk|0)==(Ye|0)){break s}while(1){An(q[Vk>>2]);Vk=Vk+4|0;if((Ye|0)!=(Vk|0)){continue}break}Ye=q[Yk+16>>2];Zh=q[Yk+12>>2];if((Ye|0)==(Zh|0)){break s}q[Yk+16>>2]=Ye+(((Ye-Zh|0)+ -4>>>2^-1)<<2)}Ye=q[Yk+8>>2];if(Ye){An(Ye)}T=Yk+32|0;return Xk}bn();F()}bn();F()}function fe(Ye,Zh,ci){var tl=0,ul=0,vl=0,wl=0,xl=0,yl=0,zl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0,Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0;wl=T-32|0;T=wl;tl=q[Ye+12>>2];q[wl+16>>2]=0;q[wl+8>>2]=0;q[wl+12>>2]=0;a:{if(tl){if(tl>>>0>=1073741824){break a}ul=tl<<2;vl=Mm(ul);q[wl+8>>2]=vl;q[wl+12>>2]=vl;q[wl+16>>2]=ul+vl;yl=Dn(vl,0,ul);ul=tl;while(1){yl=yl+4|0;ul=ul+ -1|0;if(ul){continue}break}q[wl+12>>2]=yl}ul=q[Ye+628>>2];xl=q[ul>>2];if(xl){q[ul+4>>2]=xl;An(xl);q[ul+8>>2]=0;q[ul>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=q[vl>>2];q[wl+28>>2]=yl;vl=q[wl+16>>2];yl=vl-Bl|0;if(((yl?w(yl>>2,341)+ -1|0:0)-(tl+ul|0)|0)+1>>>0>=682){An(q[vl+ -4>>2]);q[wl+16>>2]=q[wl+16>>2]+ -4}ul=0;if(xl>>>0>Zh>>>0){break d}vl=q[Jl>>2];zl=w(Al,12);Dl=zl+q[Kl>>2]|0;yl=nl(Ye,xl,Dl);if(yl>>>0>=t[Ye+12>>2]){break d}Bl=vl+zl|0;e:{f:{El=yl<<2;tl=q[Ye>>2]-q[El+q[Dl>>2]>>2]|0;if(!tl){if(!xl){break f}Dl=0;while(1){Al=0;tl=q[ci+16>>2];g:{if((tl|0)==q[Hl>>2]){break g}while(1){tl=w(Al,20)+tl|0;vl=q[Bl>>2]+(q[tl+4>>2]<<2)|0;zl=q[tl>>2];yl=q[tl+12>>2];h:{if(yl>>>0>3){break h}ul=q[ci+12>>2];El=tl+16|0;if(!q[El>>2]){vl=ul;break h}Cl=tl+12|0;tl=0;while(1){ul=Cn(ul,(tl<<2)+vl|0,yl);yl=q[Cl>>2];ul=ul+yl|0;tl=tl+1|0;if(tl>>>0>2]){continue}break}vl=q[ci+12>>2]}tl=q[ci+28>>2];tl=r[zl+84|0]?tl:q[q[zl+68>>2]+(tl<<2)>>2];if(tl>>>0>=t[zl+80>>2]){break g}ul=tl;tl=q[zl+40>>2];Cn(q[q[zl>>2]>>2]+w(ul,tl)|0,vl,tl);Al=Al+1|0;tl=q[ci+16>>2];if(Al>>>0<(q[Hl>>2]-tl|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;Dl=Dl+1|0;if((xl|0)!=(Dl|0)){continue}break}break f}i:{j:{k:{l:{if(xl>>>0<=2){vl=q[Ll>>2];q[vl>>2]=yl;ul=1;tl=q[Ye+12>>2];if(tl>>>0>1){break l}break i}if(t[Ye+8>>2]>t[Ye+4>>2]){break d}vl=q[Jl>>2];Cl=Al+1|0;Dl=w(Cl,12);ul=vl+Dl|0;if((ul|0)!=(Bl|0)){hd(ul,q[Bl>>2],q[Bl+4>>2]);vl=q[Jl>>2]}vl=El+q[vl+Dl>>2]|0;q[vl>>2]=q[vl>>2]+(1<>>1)-ul|0;tl=xl-ul|0;m:{if((tl|0)==(ul|0)){tl=ul;break m}vl=q[Ye+596>>2];if((vl|0)==q[Pl>>2]){break k}xl=q[vl>>2];Bl=q[Ye+600>>2];Fl=Bl+1|0;q[Ye+600>>2]=Fl;xl=xl&-2147483648>>>Bl;n:{if((Fl|0)==32){q[Ye+600>>2]=0;q[Ye+596>>2]=vl+4;if(xl){break n}break k}if(!xl){break k}}}vl=tl;tl=ul;break j}while(1){yl=(tl+ -1|0)==(yl|0)?0:yl+1|0;q[vl+(ul<<2)>>2]=yl;ul=ul+1|0;tl=q[Ye+12>>2];if(ul>>>0>>0){continue}break}break i}vl=ul}ul=q[Kl>>2];xl=ul+zl|0;Bl=q[xl>>2];zl=Bl+El|0;q[zl>>2]=q[zl>>2]+1;hd(ul+Dl|0,Bl,q[xl+4>>2]);if(tl){Bl=q[wl+28>>2]+q[wl+24>>2]|0;zl=q[wl+16>>2];ul=q[wl+12>>2];xl=zl-ul|0;if((Bl|0)==((xl?w(xl>>2,341)+ -1|0:0)|0)){re(wl+8|0);Bl=q[wl+24>>2]+q[wl+28>>2]|0;zl=q[wl+16>>2];ul=q[wl+12>>2]}xl=0;o:{if((ul|0)==(zl|0)){break o}xl=ul;ul=(Bl>>>0)/341|0;xl=q[xl+(ul<<2)>>2]+w(Bl-w(ul,341)|0,12)|0}q[xl+8>>2]=Al;q[xl+4>>2]=yl;q[xl>>2]=tl;q[wl+28>>2]=q[wl+28>>2]+1}if(!vl){break f}ul=q[wl+28>>2]+q[wl+24>>2]|0;xl=q[wl+16>>2];tl=q[wl+12>>2];Al=xl-tl|0;if((ul|0)==((Al?w(Al>>2,341)+ -1|0:0)|0)){re(wl+8|0);xl=q[wl+16>>2];ul=q[wl+24>>2]+q[wl+28>>2]|0;tl=q[wl+12>>2]}if((tl|0)==(xl|0)){tl=0}else{xl=tl;tl=(ul>>>0)/341|0;tl=q[xl+(tl<<2)>>2]+w(ul-w(tl,341)|0,12)|0}q[tl+8>>2]=Cl;q[tl+4>>2]=yl;q[tl>>2]=vl;tl=q[wl+28>>2]+1|0;q[wl+28>>2]=tl;break e}if(!xl){break f}El=0;while(1){if(tl){yl=q[Ml>>2];Fl=q[Ll>>2];Ql=q[Bl>>2];Rl=q[Dl>>2];tl=0;while(1){Al=Fl+(tl<<2)|0;q[yl+(q[Al>>2]<<2)>>2]=0;ul=q[Al>>2]<<2;vl=q[Ye>>2]-q[ul+Rl>>2]|0;p:{if(!vl){break p}ul=ul+yl|0;zl=q[Ye+560>>2];Gl=32-zl|0;if((vl|0)<=(Gl|0)){Cl=q[Il>>2];if((Cl|0)==q[Nl>>2]){q[ul>>2]=0;break p}q[ul>>2]=q[Cl>>2]<>>32-vl;vl=vl+q[Ye+560>>2]|0;q[Ye+560>>2]=vl;if((vl|0)!=32){break p}q[Ye+560>>2]=0;q[Il>>2]=Cl+4;break p}Cl=q[Il>>2];Ol=Cl+4|0;if((Ol|0)==q[Nl>>2]){q[ul>>2]=0;break p}Sl=q[Cl>>2];q[Il>>2]=Ol;Gl=vl-Gl|0;q[Ye+560>>2]=Gl;q[ul>>2]=q[Cl+4>>2]>>>32-Gl|Sl<>>32-vl}vl=q[Al>>2]<<2;ul=vl+yl|0;q[ul>>2]=q[ul>>2]|q[vl+Ql>>2];tl=tl+1|0;if(tl>>>0>2]){continue}break}}Al=0;tl=q[ci+16>>2];q:{if((tl|0)==q[Hl>>2]){break q}while(1){tl=w(Al,20)+tl|0;vl=q[Ml>>2]+(q[tl+4>>2]<<2)|0;zl=q[tl>>2];yl=q[tl+12>>2];r:{if(yl>>>0>3){break r}ul=q[ci+12>>2];Cl=tl+16|0;if(!q[Cl>>2]){vl=ul;break r}Fl=tl+12|0;tl=0;while(1){ul=Cn(ul,(tl<<2)+vl|0,yl);yl=q[Fl>>2];ul=ul+yl|0;tl=tl+1|0;if(tl>>>0>2]){continue}break}vl=q[ci+12>>2]}tl=q[ci+28>>2];tl=r[zl+84|0]?tl:q[q[zl+68>>2]+(tl<<2)>>2];if(tl>>>0>=t[zl+80>>2]){break q}ul=tl;tl=q[zl+40>>2];Cn(q[q[zl>>2]>>2]+w(ul,tl)|0,vl,tl);Al=Al+1|0;tl=q[ci+16>>2];if(Al>>>0<(q[Hl>>2]-tl|0)/20>>>0){continue}break}}q[ci+28>>2]=q[ci+28>>2]+1;q[Ye+8>>2]=q[Ye+8>>2]+1;El=El+1|0;if((El|0)==(xl|0)){break f}tl=q[Ye+12>>2];continue}}tl=q[wl+28>>2]}if(tl){continue}break}ul=1}se(wl+8|0);tl=q[wl+12>>2];Ye=q[wl+16>>2];s:{if((tl|0)==(Ye|0)){break s}while(1){An(q[tl>>2]);tl=tl+4|0;if((Ye|0)!=(tl|0)){continue}break}Ye=q[wl+16>>2];Zh=q[wl+12>>2];if((Ye|0)==(Zh|0)){break s}q[wl+16>>2]=Ye+(((Ye-Zh|0)+ -4>>>2^-1)<<2)}Ye=q[wl+8>>2];if(Ye){An(Ye)}T=wl+32|0;return ul}bn();F()}bn();F()}function ge(Ye,Zh){Ye=Ye|0;Zh=Zh|0;var ci=0,Tl=0,Ul=0,Vl=0,Wl=0,Xl=0,Zl=0,_l=0,$l=0,am=0,bm=0,cm=0,dm=0,em=0,fm=0,gm=0,hm=0,im=0,jm=0;Ul=T-720|0;T=Ul;a:{b:{c:{d:{if(s[Zh+38>>1]>=515){q[Ul+680>>2]=0;q[Ul+672>>2]=0;q[Ul+676>>2]=0;cm=Ye+36|0;am=Ul+24|0;$l=Ye+40|0;dm=Ye+60|0;fm=Ye+44|0;while(1){if((Wl|0)>=(n[q[q[Ye>>2]+24>>2]](Ye)|0)){gm=1;ci=Ye+52|0;if(q[ci>>2]==q[Ye+48>>2]){break b}Wl=0;while(1){if(he(1,Ul+16|0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h){break l}break k;case 1:ci=Sd(Ul+16|0,Xl);Zh=Qd(ci,Zh,Ye);Rd(ci);if(Zh){break l}break k;case 2:ci=Sd(Ul+16|0,Xl);Zh=Td(ci,Zh,Ye);Rd(ci);if(Zh){break l}break k;case 3:ci=Wd(Ul+16|0,Xl);Zh=Ud(ci,Zh,Ye);Vd(ci);if(Zh){break l}break k;case 4:ci=Wd(Ul+16|0,Xl);Zh=Xd(ci,Zh,Ye);Vd(ci);if(Zh){break l}break k;case 5:break m}}ci=Wd(Ul+16|0,Xl);Zh=Yd(ci,Zh,Ye);Vd(ci);if(!Zh){break k}}Wl=0}Zh=q[Ye+16>>2];if(Zh){q[Ye+20>>2]=Zh;An(Zh)}Zh=q[Ye>>2];if(Zh){q[Ye+4>>2]=Zh;An(Zh)}if(Wl){break h}}gm=1}Ye=q[Ul+704>>2];if(!Ye){break a}q[Ul+708>>2]=Ye;An(Ye);break a}bn();F()}bn();F()}Ye=q[Ul+672>>2];if(!Ye){break a}q[Ul+676>>2]=Ye;An(Ye)}T=Ul+720|0;return gm|0}function he(Ye,Zh,Yl){var km=0,lm=0,mm=0,nm=0;a:{if(Ye>>>0>5){break a}mm=q[Yl+16>>2];km=q[Yl+12>>2];lm=q[Yl+20>>2];if((km|0)<(lm|0)?1:(km|0)<=(lm|0)?t[Yl+8>>2]>mm>>>0?0:1:0){break a}km=r[mm+q[Yl>>2]|0];mm=mm+1|0;if(mm>>>0<1){lm=lm+1|0}q[Yl+16>>2]=mm;q[Yl+20>>2]=lm;lm=Zh;if(km&128){if(!he(Ye+1|0,Zh,Yl)){break a}Ye=q[Zh>>2]<<7;q[Zh>>2]=Ye;km=Ye|km&127}q[lm>>2]=km;nm=1}return nm}function ie(Ye,Zh){var Yl=0,om=0,pm=0,qm=0,rm=0,sm=0,tm=0;a:{b:{c:{om=q[Ye>>2];rm=(q[Ye+4>>2]-om|0)/24|0;Yl=rm+1|0;if(Yl>>>0<178956971){om=(q[Ye+8>>2]-om|0)/24|0;sm=om<<1;om=om>>>0<89478485?sm>>>0>>0?Yl:sm:178956970;pm=0;d:{if(!om){break d}if(om>>>0>=178956971){break c}pm=Mm(w(om,24))}Yl=pm+w(rm,24)|0;ve(Yl,Zh);rm=pm+w(om,24)|0;sm=Yl+24|0;Zh=q[Ye+4>>2];pm=q[Ye>>2];if((Zh|0)==(pm|0)){break b}while(1){Yl=Yl+ -24|0;q[Yl>>2]=1232;om=q[Zh+ -20>>2];qm=Yl+16|0;q[qm>>2]=0;q[Yl+8>>2]=0;q[Yl+12>>2]=0;q[Yl+4>>2]=om;om=Zh+ -16|0;q[Yl+8>>2]=q[om>>2];q[Yl+12>>2]=q[Zh+ -12>>2];tm=qm;qm=Zh+ -8|0;q[tm>>2]=q[qm>>2];q[qm>>2]=0;q[om>>2]=0;q[om+4>>2]=0;q[Yl+20>>2]=q[Zh+ -4>>2];Zh=Zh+ -24|0;if((pm|0)!=(Zh|0)){continue}break}pm=q[Ye+4>>2];Zh=q[Ye>>2];break a}bn();F()}ab(1780);F()}Zh=pm}q[Ye>>2]=Yl;q[Ye+8>>2]=rm;q[Ye+4>>2]=sm;if((Zh|0)!=(pm|0)){while(1){pm=pm+ -24|0;n[q[q[pm>>2]>>2]](pm)|0;if((Zh|0)!=(pm|0)){continue}break}}if(Zh){An(Zh)}}function je(Ye,Zh,um){var vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0,Cm=0,Dm=0,Em=0;wm=T-32|0;T=wm;q[wm+24>>2]=0;q[wm+16>>2]=0;q[wm+20>>2]=0;zm=q[Zh+12>>2];xm=zm;ym=q[Zh+20>>2];Am=ym;Bm=q[Zh+16>>2];vm=Bm+4|0;if(vm>>>0<4){ym=ym+1|0}Dm=q[Zh+8>>2];Cm=vm;a:{if((xm|0)<(ym|0)?1:(xm|0)<=(ym|0)?Dm>>>0>=vm>>>0?0:1:0){break a}xm=q[Zh>>2];vm=Bm+xm|0;vm=r[vm|0]|r[vm+1|0]<<8|(r[vm+2|0]<<16|r[vm+3|0]<<24);q[Zh+16>>2]=Cm;q[Zh+20>>2]=ym;b:{c:{vm=vm+ -2|0;if(vm>>>0<=1){if(vm-1){break c}if((zm|0)<(ym|0)?1:(zm|0)<=(ym|0)?Dm>>>0>Cm>>>0?0:1:0){break a}xm=o[xm+Cm|0];vm=Bm+5|0;if(vm>>>0<5){Am=Am+1|0}q[Zh+16>>2]=vm;q[Zh+20>>2]=Am;q[Ye+8>>2]=xm;if((xm|0)==1){if(ol(Ye,Zh,wm+16|0)){break b}break a}Gl(1848,23,q[3794]);break a}Gl(1872,24,q[3794]);break a}if(!ol(Ye,Zh,wm+16|0)){break a}}q[wm+8>>2]=q[wm+16>>2];q[wm>>2]=q[wm+20>>2];ke(wm+8|0,wm,Ye,um);Em=1}Ye=q[wm+16>>2];if(Ye){q[wm+20>>2]=Ye;An(Ye)}T=wm+32|0;return Em}function ke(Ye,Zh,um,Fm){var Gm=0,Hm=0,Im=0,Jm=x(0),Km=0,Lm=0,Mm=0,Nm=0;Gm=T-32|0;T=Gm;Hm=q[um>>2];Jm=u[um+4>>2];Lm=hk(Gm+24|0);Hm=-1<>2];if((um|0)!=q[Zh>>2]){Ye=q[Fm+28>>2];Mm=Fm+16|0;while(1){Im=q[um>>2];Km=q[um+4>>2];Jm=u[Lm>>2];u[Gm+16>>2]=Jm*x(q[um+8>>2]-Hm|0);u[Gm+12>>2]=Jm*x(Km-Hm|0);u[Gm+8>>2]=Jm*x(Im-Hm|0);Km=q[Mm>>2];Im=q[Km>>2];if(!r[Im+84|0]){Ye=q[q[Im+68>>2]+(Ye<<2)>>2]}Nm=Ye;Ye=q[Im+40>>2];Cn(q[q[Im>>2]>>2]+w(Nm,Ye)|0,(Gm+8|0)+(q[Km+4>>2]<<2)|0,Ye);Ye=q[Fm+28>>2]+1|0;q[Fm+28>>2]=Ye;um=um+12|0;if((um|0)!=q[Zh>>2]){continue}break}}T=Gm+32|0}function le(Ye){Ye=Ye|0;var Zh=0,um=0,Fm=0,Om=0,Pm=0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An(Fm)}if(!Zh){break f}break d;case 0:case 2:case 4:case 5:case 6:break f;case 7:break g}}Sm=q[q[Zm>>2]+(Rm<<2)>>2];Vm=q[_m>>2];Zh=n[q[q[Ye>>2]+28>>2]](Ye)|0;Pm=q[Qm+56>>2];Tm=q[Zh+40>>2];Zh=Mm(32);q[Om+16>>2]=Zh;q[Om+20>>2]=24;q[Om+24>>2]=-2147483616;o[Zh+24|0]=0;Fm=r[1726]|r[1727]<<8|(r[1728]<<16|r[1729]<<24);um=r[1722]|r[1723]<<8|(r[1724]<<16|r[1725]<<24);o[Zh+16|0]=um;o[Zh+17|0]=um>>>8;o[Zh+18|0]=um>>>16;o[Zh+19|0]=um>>>24;o[Zh+20|0]=Fm;o[Zh+21|0]=Fm>>>8;o[Zh+22|0]=Fm>>>16;o[Zh+23|0]=Fm>>>24;Fm=r[1718]|r[1719]<<8|(r[1720]<<16|r[1721]<<24);um=r[1714]|r[1715]<<8|(r[1716]<<16|r[1717]<<24);o[Zh+8|0]=um;o[Zh+9|0]=um>>>8;o[Zh+10|0]=um>>>16;o[Zh+11|0]=um>>>24;o[Zh+12|0]=Fm;o[Zh+13|0]=Fm>>>8;o[Zh+14|0]=Fm>>>16;o[Zh+15|0]=Fm>>>24;Fm=r[1710]|r[1711]<<8|(r[1712]<<16|r[1713]<<24);um=r[1706]|r[1707]<<8|(r[1708]<<16|r[1709]<<24);o[Zh|0]=um;o[Zh+1|0]=um>>>8;o[Zh+2|0]=um>>>16;o[Zh+3|0]=um>>>24;o[Zh+4|0]=Fm;o[Zh+5|0]=Fm>>>8;o[Zh+6|0]=Fm>>>16;o[Zh+7|0]=Fm>>>24;k:{l:{Fm=Tm+16|0;um=Fm;Zh=q[um>>2];if(!Zh){break l}while(1){Um=q[Zh+16>>2]<(Pm|0);um=Um?um:Zh;Zh=q[(Um<<2)+Zh>>2];if(Zh){continue}break}if((um|0)==(Fm|0)|(Pm|0)>2]){break l}Zh=um+20|0;if(!ga(Zh,Om+16|0)){break l}Zh=gk(Zh,Om+16|0);break k}Zh=gk(Tm,Om+16|0)}if(o[Om+27|0]<=-1){An(q[Om+16>>2])}Fm=Rm+1|0;m:{if(Zh){ud(Qm,Sm);break m}Zh=Vm+w(Rm,24)|0;um=q[Zh+4>>2];Rm=o[Qm+24|0];Vm=Rm<<2;Pm=Mm((Rm|0)!=(Rm&1073741823)?-1:Vm);if(!ik(hk(Om+16|0),u[Zh+20>>2],-1<>2]){$m=q[q[Sm>>2]>>2]+q[Sm+48>>2]|0;an=Zh+8|0;Um=0;Tm=0;um=0;while(1){if((Rm|0)>=1){cn=q[an>>2];Zh=0;dn=u[Om+16>>2];while(1){Ym=Zh<<2;u[Ym+Pm>>2]=x(dn*x(q[$m+(um<<2)>>2]))+u[cn+Ym>>2];um=um+1|0;Zh=Zh+1|0;if((Rm|0)!=(Zh|0)){continue}break}}Cn(q[q[Qm- -64>>2]>>2]+Tm|0,Pm,Vm);Tm=Tm+Vm|0;Um=Um+1|0;if(Um>>>0>2]){continue}break}}An(Pm)}Rm=Fm}Zh=1;Xm=Xm+1|0;if((Xm|0)<(n[q[q[Ye>>2]+24>>2]](Ye)|0)){continue}break c}break}An(Pm)}Zh=0}T=Om+32|0;return Zh|0}bn();F()}bn();F()}function me(Ye,en,fn){var gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0,tn=0,un=0,vn=0;hn=T-16|0;T=hn;gn=o[en+24|0];q[hn+8>>2]=0;q[hn>>2]=0;q[hn+4>>2]=0;a:{b:{if(gn){if((gn|0)<=-1){break b}jn=gn<<2;kn=Mm(jn);q[hn>>2]=kn;ln=jn+kn|0;q[hn+8>>2]=ln;Dn(kn,0,jn);q[hn+4>>2]=ln;pn=Mm(jn);jn=Dn(pn,0,jn)}else{jn=0}if(!q[en+80>>2]){break a}sn=en+40|0;un=en+48|0;vn=Ye+48|0;while(1){tn=q[en>>2];mn=q[tn>>2];qn=q[un>>2];Ye=q[sn>>2];ln=$n(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=Ye;if(!Fn&Ye>>>0>=t[en+80>>2]|Fn>>>0>0){break a}wn=r[en+24|0];continue}}bn();F()}if(yn){An(Hn)}if(zn){q[xn+4>>2]=zn;An(zn)}T=xn+16|0;return 1}function oe(Ye,en,fn){var Dn=0,On=0,Pn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0;On=T-32|0;T=On;Dn=o[en+24|0];q[On+24>>2]=0;q[On+16>>2]=0;q[On+20>>2]=0;a:{b:{c:{if(Dn){if((Dn|0)<=-1){break c}Pn=Mm(Dn);q[On+16>>2]=Pn;q[On+20>>2]=Pn;q[On+24>>2]=Dn+Pn;while(1){o[Pn|0]=0;Pn=q[On+20>>2]+1|0;q[On+20>>2]=Pn;Dn=Dn+ -1|0;if(Dn){continue}break}Pn=r[en+24|0]}q[On+8>>2]=0;q[On>>2]=0;q[On+4>>2]=0;if(Pn&255){if(Pn<<24>>24<=-1){break b}Pn=Pn<<24>>24;Dn=Mm(Pn);q[On>>2]=Dn;q[On+4>>2]=Dn;q[On+8>>2]=Dn+Pn;while(1){o[Dn|0]=0;Dn=q[On+4>>2]+1|0;q[On+4>>2]=Dn;Pn=Pn+ -1|0;if(Pn){continue}break}}if(!q[en+80>>2]){Dn=q[On>>2];break a}Pn=en+40|0;Un=en+48|0;Tn=en+24|0;while(1){Vn=q[On+16>>2];Wn=q[q[en>>2]>>2];Dn=q[Pn>>2];Qn=q[Un>>2]+$n(Dn,q[Pn+4>>2],Rn,Sn)|0;Dn=Cn(Vn,Wn+Qn|0,Dn);d:{if(o[Tn|0]<1){break d}Qn=Ye+48|0;o[q[On>>2]]=r[Dn|0]+r[q[Qn>>2]+(fn<<2)|0];Dn=1;if(o[Tn|0]<2){break d}while(1){o[q[On>>2]+Dn|0]=r[q[On+16>>2]+Dn|0]+r[q[Qn>>2]+(fn+Dn<<2)|0];Dn=Dn+1|0;if((Dn|0)>2];Dn=q[On>>2];Cn(q[q[en>>2]>>2]+w(Qn,Rn)|0,Dn,Qn);Rn=Rn+1|0;if(Rn>>>0<1){Sn=Sn+1|0}Qn=Rn;if(!Sn&Qn>>>0>2]|Sn>>>0<0){continue}break}break a}bn();F()}bn();F()}if(Dn){q[On+4>>2]=Dn;An(Dn)}Ye=q[On+16>>2];if(Ye){q[On+20>>2]=Ye;An(Ye)}T=On+32|0;return 1}function pe(Ye){Ye=Ye|0;var bn=0,en=0,fn=0,Cn=0;q[Ye>>2]=1596;bn=q[Ye+60>>2];if(bn){Cn=Ye- -64|0;en=q[Cn>>2];fn=bn;a:{if((bn|0)==(en|0)){break a}while(1){en=en+ -4|0;fn=q[en>>2];q[en>>2]=0;if(fn){Hb(fn)}if((bn|0)!=(en|0)){continue}break}fn=q[Ye+60>>2]}q[Cn>>2]=bn;An(fn)}bn=q[Ye+48>>2];if(bn){q[Ye+52>>2]=bn;An(bn)}bn=q[Ye+36>>2];if(bn){Cn=Ye+40|0;en=q[Cn>>2];fn=bn;b:{if((bn|0)==(en|0)){break b}while(1){en=en+ -24|0;n[q[q[en>>2]>>2]](en)|0;if((bn|0)!=(en|0)){continue}break}fn=q[Ye+36>>2]}q[Cn>>2]=bn;An(fn)}q[Ye>>2]=1384;bn=q[Ye+16>>2];if(bn){q[Ye+20>>2]=bn;An(bn)}bn=q[Ye+4>>2];if(bn){q[Ye+8>>2]=bn;An(bn)}return Ye|0}function qe(q){q=q|0;An(pe(q))}function re(Ye){var Xn=0,Yn=0,Zn=0,_n=0,$n=0,ao=0,bo=0,co=0,eo=0,fo=0,go=0,ho=0;ao=T-32|0;T=ao;a:{b:{Xn=Ye+16|0;Yn=q[Xn>>2];if(Yn>>>0>=341){q[Xn>>2]=Yn+ -341;Xn=Ye+4|0;Yn=q[Xn>>2];eo=q[Yn>>2];Yn=Yn+4|0;q[Xn>>2]=Yn;co=Ye+8|0;Zn=q[co>>2];Xn=q[Ye+12>>2];c:{if((Zn|0)!=(Xn|0)){break c}_n=q[Ye>>2];if(Yn>>>0>_n>>>0){Zn=Zn-Yn|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ko=q[Ye+4>>2];no=q[Ye+8>>2];a:{if((ko|0)==(no|0)){mo=Ye+20|0;break a}lo=(io<<2)+ko|0;io=q[lo>>2]+w(jo-w(io,341)|0,12)|0;mo=Ye+20|0;jo=jo+q[mo>>2]|0;oo=(jo>>>0)/341|0;jo=q[(oo<<2)+ko>>2]+w(jo-w(oo,341)|0,12)|0;if((io|0)==(jo|0)){break a}while(1){io=io+12|0;if((io-q[lo>>2]|0)==4092){io=q[lo+4>>2];lo=lo+4|0}if((io|0)!=(jo|0)){continue}break}}q[mo>>2]=0;io=no-ko>>2;if(io>>>0>2){while(1){An(q[ko>>2]);ko=q[Ye+4>>2]+4|0;q[Ye+4>>2]=ko;io=q[Ye+8>>2]-ko>>2;if(io>>>0>2){continue}break}}io=io+ -1|0;if(io>>>0<=1){q[Ye+16>>2]=io-1|0?170:341}}function te(Ye,po){var qo=0,ro=0,so=0,to=0,uo=0,vo=0,wo=0;a:{so=q[Ye+8>>2];qo=q[Ye+12>>2];b:{if((so|0)!=(qo|0)){qo=so;break b}ro=q[Ye+4>>2];to=q[Ye>>2];if(ro>>>0>to>>>0){so=so-ro|0;vo=so>>2;to=((ro-to>>2)+1|0)/-2<<2;uo=to+ro|0;qo=Ye;if(so){En(uo,ro,so);ro=q[Ye+4>>2]}q[qo+4>>2]=ro+to;qo=uo+(vo<<2)|0;q[Ye+8>>2]=qo;break b}qo=qo-to|0;qo=qo?qo>>1:1;if(qo>>>0>=1073741824){break a}uo=qo<<2;vo=Mm(uo);wo=uo+vo|0;uo=vo+(qo&-4)|0;qo=uo;if((ro|0)!=(so|0)){qo=uo;while(1){q[qo>>2]=q[ro>>2];qo=qo+4|0;ro=ro+4|0;if((so|0)!=(ro|0)){continue}break}to=q[Ye>>2]}q[Ye+8>>2]=qo;q[Ye+4>>2]=uo;q[Ye>>2]=vo;q[Ye+12>>2]=wo;if(!to){break b}An(to);qo=q[Ye+8>>2]}q[qo>>2]=q[po>>2];q[Ye+8>>2]=q[Ye+8>>2]+4;return}ab(1780);F()}function ue(Ye,po){var xo=0,yo=0,zo=0,Ao=0,Bo=0,Co=0;a:{zo=q[Ye+4>>2];yo=q[Ye>>2];b:{if((zo|0)!=(yo|0)){xo=zo;break b}Ao=q[Ye+8>>2];xo=q[Ye+12>>2];if(Ao>>>0>>0){Bo=((xo-Ao>>2)+1|0)/2<<2;xo=Bo+Ao|0;yo=Ao-zo|0;if(yo){xo=xo-yo|0;En(xo,zo,yo);Ao=q[Ye+8>>2]}q[Ye+4>>2]=xo;q[Ye+8>>2]=Ao+Bo;break b}xo=xo-yo|0;xo=xo?xo>>1:1;if(xo>>>0>=1073741824){break a}yo=xo<<2;Bo=Mm(yo);Co=yo+Bo|0;xo=Bo+(xo+3&-4)|0;c:{if((zo|0)==(Ao|0)){yo=xo;break c}yo=xo;while(1){q[yo>>2]=q[zo>>2];yo=yo+4|0;zo=zo+4|0;if((Ao|0)!=(zo|0)){continue}break}zo=q[Ye>>2]}q[Ye+8>>2]=yo;q[Ye+4>>2]=xo;q[Ye>>2]=Bo;q[Ye+12>>2]=Co;if(!zo){break b}An(zo);xo=q[Ye+4>>2]}q[xo+ -4>>2]=q[po>>2];q[Ye+4>>2]=q[Ye+4>>2]+ -4;return}ab(1780);F()}function ve(Ye,An){var po=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0;q[Ye>>2]=1232;po=q[An+4>>2];q[Ye+16>>2]=0;q[Ye+8>>2]=0;q[Ye+12>>2]=0;q[Ye+4>>2]=po;a:{po=q[An+12>>2]-q[An+8>>2]|0;b:{if(!po){break b}Do=po>>2;if(Do>>>0>=1073741824){break a}po=Mm(po);q[Ye+8>>2]=po;Eo=Ye+12|0;q[Eo>>2]=po;q[Ye+16>>2]=po+(Do<<2);Fo=q[An+8>>2];Do=q[An+12>>2]-Fo|0;if((Do|0)<1){break b}Go=Eo,Ho=Cn(po,Fo,Do)+Do|0,q[Go>>2]=Ho}q[Ye+20>>2]=q[An+20>>2];return}bn();F()}function we(Ye){q[Ye+12>>2]=-1;q[Ye+16>>2]=0;q[Ye+4>>2]=0;q[Ye+8>>2]=0;q[Ye>>2]=1908}function xe(Ye,An,Io){Ye=Ye|0;An=An|0;Io=Io|0;q[Ye+4>>2]=An;An=q[q[q[An+4>>2]+8>>2]+(Io<<2)>>2];q[Ye+12>>2]=Io;q[Ye+8>>2]=An;return 1}function ye(Ye,An){Ye=Ye|0;An=An|0;q[Ye+12>>2]=-1;q[Ye+8>>2]=An;return 1}function ze(Ye,An,Io){Ye=Ye|0;An=An|0;Io=Io|0;var Jo=0,Ko=0;Jo=q[Ye+8>>2];a:{if(o[Jo+24|0]<1){break a}if(!td(Jo,q[An+4>>2]-q[An>>2]>>2)){break a}Ko=n[q[q[Ye>>2]+32>>2]](Ye,An,Io)|0}return Ko|0}function Ae(q,Ye,An){q=q|0;Ye=Ye|0;An=An|0;return 1}function Be(Ye){var An=0,Io=0,Lo=0,Mo=0,No=0,Oo=0,Po=0,Qo=0;a:{Lo=q[Ye+8>>2];if(r[Lo+84|0]){break a}An=q[Ye+16>>2];if(!An|!r[An+84|0]){break a}Io=q[Lo+72>>2];Mo=q[Lo+68>>2];o[An+84|0]=0;Io=Io-Mo>>2;No=q[An+68>>2];Mo=q[An+72>>2]-No>>2;b:{if(Io>>>0>Mo>>>0){md(An+68|0,Io-Mo|0,1992);Lo=q[Ye+8>>2];break b}if(Io>>>0>=Mo>>>0){break b}q[An+72>>2]=No+(Io<<2)}An=0;Mo=r[Lo+84|0];Oo=Lo+72|0;Po=Ye+16|0;Qo=Lo+68|0;while(1){if(An>>>0>=(Mo?0:q[Oo>>2]-q[Lo+68>>2]>>2)>>>0){break a}Io=An;No=q[q[Po>>2]+68>>2]+(An<<2)|0;if(!Mo){Io=q[q[Qo>>2]+(An<<2)>>2]}q[No>>2]=Io;An=An+1|0;continue}}return q[Ye+16>>2]}function Ce(Ye,Ro){Ye=Ye|0;Ro=Ro|0;var So=0,To=0,Uo=0;if((n[q[q[Ro>>2]+20>>2]](Ro)|0)>=1){while(1){So=bl(q[q[Ye+4>>2]+4>>2],n[q[q[Ro>>2]+24>>2]](Ro,To)|0);if((So|0)==-1){return 0}a:{Uo=q[Ye+4>>2];if(r[Uo+36|0]<=1){if(n[q[q[Ro>>2]+28>>2]](Ro,q[q[q[Uo+4>>2]+8>>2]+(So<<2)>>2])){break a}return 0}So=Pj(Uo,So);if(!So){return 0}if(n[q[q[Ro>>2]+28>>2]](Ro,So)){break a}return 0}To=To+1|0;if((To|0)<(n[q[q[Ro>>2]+20>>2]](Ro)|0)){continue}break}}return 1}function De(Ye,Ro,Vo){Ye=Ye|0;Ro=Ro|0;Vo=Vo|0;var Wo=0,Xo=0,Yo=0,Zo=0,_o=0,$o=0,ap=0,bp=0,cp=0,dp=0,ep=0;Wo=q[Ro+4>>2];Xo=q[Ro>>2];Ro=q[q[Ye+8>>2]+40>>2];Yo=Ro;Zo=Mm((Ro|0)>-1?Ro:-1);Wo=Wo-Xo|0;if((Wo|0)>=1){dp=Wo>>2;while(1){$o=q[Vo+12>>2];Wo=ep+q[Vo+20>>2]|0;ap=q[Vo+16>>2];_o=Ro+ap|0;if(_o>>>0>>0){Wo=Wo+1|0}Xo=Wo;if(($o|0)<(Wo|0)?1:($o|0)<=(Wo|0)?t[Vo+8>>2]>=_o>>>0?0:1:0){An(Zo);return 0}Wo=Cn(Zo,ap+q[Vo>>2]|0,Yo);q[Vo+16>>2]=_o;q[Vo+20>>2]=Xo;Cn(q[q[q[Ye+8>>2]- -64>>2]>>2]+bp|0,Wo,Yo);bp=Yo+bp|0;cp=cp+1|0;if((cp|0)<(dp|0)){continue}break}}An(Zo);return 1}function Ee(Ye){Ye=Ye|0;var Ro=0;q[Ye>>2]=1908;Ro=q[Ye+16>>2];q[Ye+16>>2]=0;if(Ro){Hb(Ro)}return Ye|0}function Fe(Ye){Ye=Ye|0;var Vo=0;q[Ye>>2]=1908;Vo=q[Ye+16>>2];q[Ye+16>>2]=0;if(Vo){Hb(Vo)}An(Ye)}function Ge(Ye,fp){var gp=0;wd(Ye);q[Ye+36>>2]=0;q[Ye+40>>2]=0;q[Ye>>2]=2004;q[Ye+44>>2]=0;q[Ye+48>>2]=0;q[Ye+52>>2]=0;q[Ye+56>>2]=0;gp=q[fp>>2];q[fp>>2]=0;q[Ye+60>>2]=gp}function He(Ye,fp){Ye=Ye|0;fp=fp|0;var hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0,pp=0,qp=0,rp=0,sp=0,tp=0;lp=T-16|0;T=lp;a:{if(!yd(Ye,fp)){break a}pp=Ye+36|0;mp=n[q[q[Ye>>2]+24>>2]](Ye)|0;jp=q[Ye+40>>2];ip=q[Ye+36>>2];hp=jp-ip>>2;b:{if(mp>>>0>hp>>>0){Ie(pp,mp-hp|0);break b}if(mp>>>0>=hp>>>0){break b}ip=ip+(mp<<2)|0;if((ip|0)!=(jp|0)){while(1){jp=jp+ -4|0;hp=q[jp>>2];q[jp>>2]=0;if(hp){n[q[q[hp>>2]+4>>2]](hp)}if((jp|0)!=(ip|0)){continue}break}}q[Ye+40>>2]=ip}op=1;if((mp|0)<1){break a}op=0;jp=0;while(1){kp=q[fp+16>>2];ip=q[fp+12>>2];hp=q[fp+20>>2];if((ip|0)<(hp|0)?1:(ip|0)<=(hp|0)?t[fp+8>>2]>kp>>>0?0:1:0){break a}np=r[kp+q[fp>>2]|0];kp=kp+1|0;if(kp>>>0<1){hp=hp+1|0}ip=fp;q[ip+16>>2]=kp;q[ip+20>>2]=hp;n[q[q[Ye>>2]+48>>2]](lp+8|0,Ye,np);hp=q[Ye+36>>2];ip=q[lp+8>>2];q[lp+8>>2]=0;kp=jp<<2;np=hp+kp|0;hp=q[np>>2];q[np>>2]=ip;if(hp){n[q[q[hp>>2]+4>>2]](hp)}hp=q[lp+8>>2];q[lp+8>>2]=0;if(hp){n[q[q[hp>>2]+4>>2]](hp)}hp=q[q[pp>>2]+kp>>2];if(!hp){break a}if(!(rp=hp,sp=n[q[q[Ye>>2]+28>>2]](Ye)|0,tp=n[q[q[Ye>>2]+20>>2]](Ye,jp)|0,qp=q[q[hp>>2]+8>>2],n[qp](rp|0,sp|0,tp|0)|0)){break a}jp=jp+1|0;if((mp|0)!=(jp|0)){continue}break}op=1}T=lp+16|0;return op|0}function Ie(Ye,fp){var up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0;vp=q[Ye+8>>2];wp=Ye+4|0;up=q[wp>>2];if(vp-up>>2>>>0>=fp>>>0){Ye=fp<<2;Bp=wp,Cp=Dn(up,0,Ye)+Ye|0,q[Bp>>2]=Cp;return}a:{wp=q[Ye>>2];xp=up-wp>>2;yp=xp+fp|0;if(yp>>>0<1073741824){xp=xp<<2;vp=vp-wp|0;Ap=vp>>1;vp=vp>>2>>>0<536870911?Ap>>>0>>0?yp:Ap:1073741823;if(vp){if(vp>>>0>=1073741824){break a}zp=Mm(vp<<2)}xp=xp+zp|0;Dn(xp,0,fp<<2);fp=(yp<<2)+zp|0;yp=(vp<<2)+zp|0;if((up|0)!=(wp|0)){while(1){up=up+ -4|0;vp=q[up>>2];q[up>>2]=0;xp=xp+ -4|0;q[xp>>2]=vp;if((up|0)!=(wp|0)){continue}break}wp=q[Ye>>2];up=q[Ye+4>>2]}q[Ye>>2]=xp;q[Ye+8>>2]=yp;q[Ye+4>>2]=fp;if((up|0)!=(wp|0)){while(1){up=up+ -4|0;Ye=q[up>>2];q[up>>2]=0;if(Ye){n[q[q[Ye>>2]+4>>2]](Ye)}if((up|0)!=(wp|0)){continue}break}}if(wp){An(wp)}return}bn();F()}ab(2144);F()}function Je(Ye,fp){Ye=Ye|0;fp=fp|0;var Dp=0,Ep=0,Fp=0,Gp=0,Hp=0,Ip=0,Jp=0;Dp=q[Ye+60>>2];a:{if(!Dp){break a}q[Dp+4>>2]=Ye+48;if(!n[q[q[Dp>>2]+12>>2]](Dp)){break a}b:{Ep=n[q[q[Ye>>2]+24>>2]](Ye)|0;if((Ep|0)<1){break b}Gp=Ye+60|0;Dp=0;while(1){c:{Hp=q[(n[q[q[Ye>>2]+28>>2]](Ye)|0)+4>>2];Ip=n[q[q[Ye>>2]+20>>2]](Ye,Dp)|0;Fp=q[Gp>>2];if(!n[q[q[Fp>>2]+8>>2]](Fp,q[q[Hp+8>>2]+(Ip<<2)>>2])){break c}Dp=Dp+1|0;if((Ep|0)!=(Dp|0)){continue}break b}break}return 0}if(!n[q[q[Ye>>2]+36>>2]](Ye,fp)){break a}if(!n[q[q[Ye>>2]+40>>2]](Ye,fp)){break a}Jp=n[q[q[Ye>>2]+44>>2]](Ye)|0}return Jp|0}function Ke(Ye,fp){Ye=Ye|0;fp=fp|0;var Kp=0,Lp=0,Mp=0,Np=0,Op=0;Kp=1;Lp=n[q[q[Ye>>2]+24>>2]](Ye)|0;a:{if((Lp|0)<1){break a}Np=Ye+48|0;Kp=0;Op=Ye+36|0;Ye=0;while(1){Mp=q[q[Op>>2]+(Ye<<2)>>2];if(!n[q[q[Mp>>2]+16>>2]](Mp,Np,fp)){break a}Ye=Ye+1|0;if((Lp|0)!=(Ye|0)){continue}break}Kp=1}return Kp|0}function Le(Ye,fp){Ye=Ye|0;fp=fp|0;var Pp=0,Qp=0,Rp=0,Sp=0,Tp=0;Pp=1;Qp=n[q[q[Ye>>2]+24>>2]](Ye)|0;a:{if((Qp|0)<1){break a}Sp=Ye+48|0;Pp=0;Tp=Ye+36|0;Ye=0;while(1){Rp=q[q[Tp>>2]+(Ye<<2)>>2];if(!n[q[q[Rp>>2]+20>>2]](Rp,Sp,fp)){break a}Ye=Ye+1|0;if((Qp|0)!=(Ye|0)){continue}break}Pp=1}return Pp|0}function Me(Ye){Ye=Ye|0;var fp=0,Up=0,Vp=0,Wp=0,Xp=0,Yp=0,Zp=0,_p=0,$p=0,aq=0,bq=0,cq=0,dq=0;Wp=T-16|0;T=Wp;fp=1;Zp=n[q[q[Ye>>2]+24>>2]](Ye)|0;a:{if((Zp|0)<1){break a}dq=Ye+48|0;Yp=Ye+36|0;while(1){b:{c:{if(!q[(n[q[q[Ye>>2]+28>>2]](Ye)|0)+40>>2]){break c}_p=Xp<<2;fp=q[_p+q[Yp>>2]>>2];Up=q[fp+8>>2];$p=Be(fp);if(!$p){break c}fp=n[q[q[Ye>>2]+28>>2]](Ye)|0;aq=q[Up+56>>2];bq=q[fp+40>>2];fp=Mm(32);q[Wp>>2]=fp;q[Wp+4>>2]=24;q[Wp+8>>2]=-2147483616;o[fp+24|0]=0;Up=r[2076]|r[2077]<<8|(r[2078]<<16|r[2079]<<24);Vp=r[2072]|r[2073]<<8|(r[2074]<<16|r[2075]<<24);o[fp+16|0]=Vp;o[fp+17|0]=Vp>>>8;o[fp+18|0]=Vp>>>16;o[fp+19|0]=Vp>>>24;o[fp+20|0]=Up;o[fp+21|0]=Up>>>8;o[fp+22|0]=Up>>>16;o[fp+23|0]=Up>>>24;Up=r[2068]|r[2069]<<8|(r[2070]<<16|r[2071]<<24);Vp=r[2064]|r[2065]<<8|(r[2066]<<16|r[2067]<<24);o[fp+8|0]=Vp;o[fp+9|0]=Vp>>>8;o[fp+10|0]=Vp>>>16;o[fp+11|0]=Vp>>>24;o[fp+12|0]=Up;o[fp+13|0]=Up>>>8;o[fp+14|0]=Up>>>16;o[fp+15|0]=Up>>>24;Up=r[2060]|r[2061]<<8|(r[2062]<<16|r[2063]<<24);Vp=r[2056]|r[2057]<<8|(r[2058]<<16|r[2059]<<24);o[fp|0]=Vp;o[fp+1|0]=Vp>>>8;o[fp+2|0]=Vp>>>16;o[fp+3|0]=Vp>>>24;o[fp+4|0]=Up;o[fp+5|0]=Up>>>8;o[fp+6|0]=Up>>>16;o[fp+7|0]=Up>>>24;d:{e:{Vp=bq+16|0;Up=Vp;fp=q[Up>>2];if(!fp){break e}while(1){cq=q[fp+16>>2]<(aq|0);Up=cq?Up:fp;fp=q[(cq<<2)+fp>>2];if(fp){continue}break}if((Up|0)==(Vp|0)|(aq|0)>2]){break e}fp=Up+20|0;if(!ga(fp,Wp)){break e}fp=gk(fp,Wp);break d}fp=gk(bq,Wp)}if(o[Wp+11|0]<=-1){An(q[Wp>>2])}if(!fp){break c}ud(q[q[q[Yp>>2]+_p>>2]+8>>2],$p);break b}fp=q[q[Yp>>2]+(Xp<<2)>>2];if(n[q[q[fp>>2]+24>>2]](fp,dq)){break b}fp=0;break a}fp=1;Xp=Xp+1|0;if((Zp|0)!=(Xp|0)){continue}break}}T=Wp+16|0;return fp|0}function Ne(Ye,eq,fq){Ye=Ye|0;eq=eq|0;fq=fq|0;if(fq>>>0>3){q[Ye>>2]=0;return}a:{b:{switch(fq-1|0){default:eq=Mm(20);we(eq);break a;case 0:eq=Mm(24);Re(eq);break a;case 1:eq=Mm(36);Re(eq);q[eq+32>>2]=0;q[eq+24>>2]=-1;q[eq+28>>2]=0;q[eq>>2]=10764;break a;case 2:break b}}eq=Mm(28);Re(eq);q[eq+24>>2]=-1;q[eq>>2]=6744;q[Ye>>2]=eq;return}q[Ye>>2]=eq}function Oe(Ye){Ye=Ye|0;var eq=0,fq=0,gq=0,hq=0,iq=0;q[Ye>>2]=2004;eq=Ye+60|0;fq=q[eq>>2];q[eq>>2]=0;if(fq){n[q[q[fq>>2]+4>>2]](fq)}eq=q[Ye+48>>2];if(eq){q[Ye+52>>2]=eq;An(eq)}fq=q[Ye+36>>2];if(fq){eq=fq;iq=Ye+40|0;gq=q[iq>>2];hq=eq;a:{if((eq|0)==(gq|0)){break a}while(1){gq=gq+ -4|0;eq=q[gq>>2];q[gq>>2]=0;if(eq){n[q[q[eq>>2]+4>>2]](eq)}if((fq|0)!=(gq|0)){continue}break}hq=q[Ye+36>>2]}eq=hq;q[iq>>2]=fq;An(eq)}q[Ye>>2]=1384;eq=q[Ye+16>>2];if(eq){q[Ye+20>>2]=eq;An(eq)}eq=q[Ye+4>>2];if(eq){q[Ye+8>>2]=eq;An(eq)}return Ye|0}function Pe(Ye){Ye=Ye|0;var jq=0,kq=0,lq=0,mq=0,nq=0;q[Ye>>2]=2004;jq=Ye+60|0;kq=q[jq>>2];q[jq>>2]=0;if(kq){n[q[q[kq>>2]+4>>2]](kq)}jq=q[Ye+48>>2];if(jq){q[Ye+52>>2]=jq;An(jq)}kq=q[Ye+36>>2];if(kq){jq=kq;nq=Ye+40|0;lq=q[nq>>2];mq=jq;a:{if((jq|0)==(lq|0)){break a}while(1){lq=lq+ -4|0;jq=q[lq>>2];q[lq>>2]=0;if(jq){n[q[q[jq>>2]+4>>2]](jq)}if((kq|0)!=(lq|0)){continue}break}mq=q[Ye+36>>2]}jq=mq;q[nq>>2]=kq;An(jq)}q[Ye>>2]=1384;jq=q[Ye+16>>2];if(jq){q[Ye+20>>2]=jq;An(jq)}jq=q[Ye+4>>2];if(jq){q[Ye+8>>2]=jq;An(jq)}An(Ye)}function Qe(Ye,oq){Ye=Ye|0;oq=oq|0;var pq=0,qq=0;qq=q[Ye+16>>2];pq=0;a:{if(q[Ye+20>>2]-qq>>2<=(oq|0)){break a}oq=q[(oq<<2)+qq>>2];pq=0;if((oq|0)<0){break a}pq=Be(q[q[Ye+36>>2]+(oq<<2)>>2])}return pq|0}function Re(Ye){we(Ye);q[Ye+20>>2]=0;q[Ye>>2]=2220}function Se(q,Ye,oq){q=q|0;Ye=Ye|0;oq=oq|0;return xe(q,Ye,oq)|0}function Te(Ye,oq){Ye=Ye|0;oq=oq|0;var rq=0,sq=0;sq=q[Ye+4>>2];a:{if(sq){rq=1;if(r[sq+36|0]<2){break a}}rq=n[q[q[Ye>>2]+48>>2]](Ye,q[oq+4>>2]-q[oq>>2]>>2)|0}return rq|0}function Ue(Ye,oq,tq){Ye=Ye|0;oq=oq|0;tq=tq|0;var uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0;wq=T-16|0;T=wq;Aq=q[tq+8>>2];xq=q[tq+16>>2];yq=q[tq+12>>2];uq=yq;vq=q[tq+20>>2];a:{if((uq|0)<(vq|0)?1:(uq|0)<=(vq|0)?Aq>>>0>xq>>>0?0:1:0){break a}Bq=q[tq>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>2];if(Kq){Lq=1;if(n[q[q[Kq>>2]+32>>2]](Kq)){break c}}Tj(Sq,Qq,Sq);Lq=1}Kq=q[oq+20>>2];f:{if(!Kq){break f}if(!n[q[q[Kq>>2]+40>>2]](Kq,Eq)){break a}if(!Lq){break f}Mq=0;oq=q[oq+20>>2];if(!n[q[q[oq>>2]+44>>2]](oq,Sq,Sq,Qq,Tq,q[tq>>2])){break b}}Mq=1}return Mq|0}return 0}function Ye(Ye,oq,tq){var Eq=0,Wq=0,Xq=0,Yq=0;Eq=T-80|0;T=Eq;Wq=nd(Eq+16|0);Xq=q[q[Ye+8>>2]+56>>2];Yq=tq<<24>>24;tq=w(bk(5),tq);od(Wq,Xq,Yq,5,0,tq,tq>>31);tq=Mm(96);sd(tq,Wq);q[Eq+8>>2]=tq;o[tq+84|0]=1;q[tq+72>>2]=q[tq+68>>2];td(tq,oq);q[Eq>>2]=0;oq=q[Eq+8>>2];q[Eq+8>>2]=0;tq=Ye+16|0;Ye=q[tq>>2];q[tq>>2]=oq;a:{if(!Ye){q[Eq>>2]=0;break a}Hb(Ye);Ye=q[Eq>>2];q[Eq>>2]=0;if(!Ye){break a}Hb(Ye)}Ye=q[Eq+8>>2];q[Eq+8>>2]=0;if(Ye){Hb(Ye)}T=Eq+80|0}function Ze(Ye,oq){Ye=Ye|0;oq=oq|0;var tq=0,Zq=0,_q=0,$q=0,ar=0,br=0,cr=0,dr=0,er=0;Zq=q[Ye+8>>2];tq=q[Zq+28>>2]+ -1|0;if(tq>>>0>5){return 0}a:{b:{switch(tq-1|0){case 0:$q=o[Zq+24|0];ar=Mm(($q|0)>-1?$q:-1);tq=q[Ye+16>>2];Zq=0;c:{if(!q[tq+80>>2]){break c}Zq=q[q[tq>>2]>>2]+q[tq+48>>2]|0}if(!oq){break a}br=($q|0)<1;dr=Ye+8|0;tq=0;while(1){Ye=0;if(!br){while(1){o[Ye+ar|0]=q[Zq+(tq<<2)>>2];tq=tq+1|0;Ye=Ye+1|0;if(($q|0)!=(Ye|0)){continue}break}}Cn(q[q[q[dr>>2]- -64>>2]>>2]+cr|0,ar,$q);cr=$q+cr|0;_q=_q+1|0;if((_q|0)!=(oq|0)){continue}break}break a;default:$q=o[Zq+24|0];ar=Mm(($q|0)>-1?$q:-1);tq=q[Ye+16>>2];Zq=0;d:{if(!q[tq+80>>2]){break d}Zq=q[q[tq>>2]>>2]+q[tq+48>>2]|0}if(!oq){break a}br=($q|0)<1;dr=Ye+8|0;tq=0;while(1){Ye=0;if(!br){while(1){o[Ye+ar|0]=q[Zq+(tq<<2)>>2];tq=tq+1|0;Ye=Ye+1|0;if(($q|0)!=(Ye|0)){continue}break}}Cn(q[q[q[dr>>2]- -64>>2]>>2]+cr|0,ar,$q);cr=$q+cr|0;_q=_q+1|0;if((_q|0)!=(oq|0)){continue}break}break a;case 2:_q=o[Zq+24|0];Zq=_q+_q|0;ar=Mm(Zq>>>0<_q>>>0?-1:Zq);tq=q[Ye+16>>2];Zq=0;e:{if(!q[tq+80>>2]){break e}Zq=q[q[tq>>2]>>2]+q[tq+48>>2]|0}if(!oq){break a}br=_q<<1;dr=(_q|0)<1;er=Ye+8|0;tq=0;while(1){Ye=0;if(!dr){while(1){p[(Ye<<1)+ar>>1]=q[Zq+(tq<<2)>>2];tq=tq+1|0;Ye=Ye+1|0;if((_q|0)!=(Ye|0)){continue}break}}Cn(q[q[q[er>>2]- -64>>2]>>2]+cr|0,ar,br);cr=cr+br|0;$q=$q+1|0;if(($q|0)!=(oq|0)){continue}break}break a;case 1:_q=o[Zq+24|0];Zq=_q+_q|0;ar=Mm(Zq>>>0<_q>>>0?-1:Zq);tq=q[Ye+16>>2];Zq=0;f:{if(!q[tq+80>>2]){break f}Zq=q[q[tq>>2]>>2]+q[tq+48>>2]|0}if(!oq){break a}br=_q<<1;dr=(_q|0)<1;er=Ye+8|0;tq=0;while(1){Ye=0;if(!dr){while(1){p[(Ye<<1)+ar>>1]=q[Zq+(tq<<2)>>2];tq=tq+1|0;Ye=Ye+1|0;if((_q|0)!=(Ye|0)){continue}break}}Cn(q[q[q[er>>2]- -64>>2]>>2]+cr|0,ar,br);cr=cr+br|0;$q=$q+1|0;if(($q|0)!=(oq|0)){continue}break}break a;case 4:_q=o[Zq+24|0];br=_q<<2;ar=Mm((_q|0)!=(_q&1073741823)?-1:br);tq=q[Ye+16>>2];Zq=0;g:{if(!q[tq+80>>2]){break g}Zq=q[q[tq>>2]>>2]+q[tq+48>>2]|0}if(!oq){break a}dr=(_q|0)<1;er=Ye+8|0;tq=0;while(1){Ye=0;if(!dr){while(1){q[(Ye<<2)+ar>>2]=q[Zq+(tq<<2)>>2];tq=tq+1|0;Ye=Ye+1|0;if((_q|0)!=(Ye|0)){continue}break}}Cn(q[q[q[er>>2]- -64>>2]>>2]+cr|0,ar,br);cr=cr+br|0;$q=$q+1|0;if(($q|0)!=(oq|0)){continue}break}break a;case 3:break b}}_q=o[Zq+24|0];br=_q<<2;ar=Mm((_q|0)!=(_q&1073741823)?-1:br);tq=q[Ye+16>>2];Zq=0;h:{if(!q[tq+80>>2]){break h}Zq=q[q[tq>>2]>>2]+q[tq+48>>2]|0}if(!oq){break a}dr=(_q|0)<1;er=Ye+8|0;tq=0;while(1){Ye=0;if(!dr){while(1){q[(Ye<<2)+ar>>2]=q[Zq+(tq<<2)>>2];tq=tq+1|0;Ye=Ye+1|0;if((_q|0)!=(Ye|0)){continue}break}}Cn(q[q[q[er>>2]- -64>>2]>>2]+cr|0,ar,br);cr=cr+br|0;$q=$q+1|0;if(($q|0)!=(oq|0)){continue}break}}An(ar);return 1}function _e(Ye){Ye=Ye|0;var oq=0,fr=0;q[Ye>>2]=2220;fr=Ye+20|0;oq=q[fr>>2];q[fr>>2]=0;if(oq){n[q[q[oq>>2]+4>>2]](oq)}q[Ye>>2]=1908;fr=Ye+16|0;oq=q[fr>>2];q[fr>>2]=0;if(oq){Hb(oq)}return Ye|0}function $e(Ye){Ye=Ye|0;var gr=0,hr=0;q[Ye>>2]=2220;hr=Ye+20|0;gr=q[hr>>2];q[hr>>2]=0;if(gr){n[q[q[gr>>2]+4>>2]](gr)}q[Ye>>2]=1908;hr=Ye+16|0;gr=q[hr>>2];q[hr>>2]=0;if(gr){Hb(gr)}An(Ye)}function af(Ye){Ye=Ye|0;return o[q[Ye+8>>2]+24|0]}function bf(Ye,ir,jr,kr,lr,mr){var nr=0,or=0,pr=0,qr=0;nr=T-32|0;T=nr;pr=q[q[q[ir+4>>2]+8>>2]+(kr<<2)>>2];a:{b:{if((n[q[q[ir>>2]+8>>2]](ir)|0)!=1|jr+ -1>>>0>5){break b}qr=n[q[q[ir>>2]+36>>2]](ir)|0;or=n[q[q[ir>>2]+44>>2]](ir,kr)|0;if(!(or?qr:0)){q[Ye>>2]=0;break a}kr=n[q[q[ir>>2]+40>>2]](ir,kr)|0;if(kr){ir=q[ir+44>>2];q[nr+12>>2]=kr;q[nr+8>>2]=ir;q[nr+20>>2]=or;q[nr+16>>2]=or+12;df(Ye,jr,pr,lr,nr+8|0,mr);if(q[Ye>>2]){break a}q[Ye>>2]=0;break b}ir=q[ir+44>>2];q[nr+12>>2]=qr;q[nr+8>>2]=ir;q[nr+20>>2]=or;q[nr+16>>2]=or+12;ef(Ye,jr,pr,lr,nr+8|0,mr);if(q[Ye>>2]){break a}q[Ye>>2]=0}q[Ye>>2]=0}T=nr+32|0}function cf(Ye,ir,jr){var kr=0,lr=0,mr=0,rr=0,sr=0,tr=0,ur=0,vr=0;q[Ye>>2]=3044;q[Ye+4>>2]=ir;ir=q[jr+8>>2];kr=q[jr+12>>2];lr=q[jr+16>>2];rr=q[jr+20>>2];sr=q[jr>>2];tr=q[jr+4>>2];q[Ye+40>>2]=0;mr=Ye+32|0;q[mr>>2]=0;q[mr+4>>2]=0;q[Ye+24>>2]=lr;q[Ye+28>>2]=rr;q[Ye+16>>2]=ir;q[Ye+20>>2]=kr;q[Ye+8>>2]=sr;q[Ye+12>>2]=tr;a:{ir=q[jr+28>>2]-q[jr+24>>2]|0;b:{if(!ir){break b}kr=ir>>2;if(kr>>>0>=1073741824){break a}ir=Mm(ir);q[Ye+32>>2]=ir;lr=Ye+36|0;q[lr>>2]=ir;q[Ye+40>>2]=ir+(kr<<2);kr=q[jr+24>>2];jr=q[jr+28>>2]-kr|0;if((jr|0)<1){break b}ur=lr,vr=Cn(ir,kr,jr)+jr|0,q[ur>>2]=vr}q[Ye>>2]=6584;return}bn();F()}function df(Ye,ir,jr,wr,xr,yr){ir=ir+ -1|0;if(ir>>>0>5){q[Ye>>2]=0;return}a:{b:{switch(ir-1|0){default:ir=Mm(60);ff(ir,jr,wr,xr);q[ir>>2]=2336;break a;case 0:ir=Mm(60);ff(ir,jr,wr,xr);q[ir>>2]=3100;break a;case 2:ir=Mm(112);ff(ir,jr,wr,xr);q[ir>>2]=3336;q[ir+60>>2]=0;q[ir+64>>2]=0;q[ir+68>>2]=0;q[ir+72>>2]=0;q[ir+76>>2]=0;q[ir+80>>2]=0;q[ir+84>>2]=0;q[ir+88>>2]=0;q[ir+92>>2]=0;q[ir+96>>2]=0;q[ir+100>>2]=0;q[ir+104>>2]=0;q[ir+108>>2]=0;break a;case 1:ir=Mm(92);ff(ir,jr,wr,xr);q[ir+60>>2]=0;q[ir+64>>2]=0;q[ir>>2]=3584;q[ir+88>>2]=yr;q[ir+68>>2]=0;q[ir+72>>2]=0;q[ir+76>>2]=0;q[ir+80>>2]=0;q[ir+84>>2]=0;break a;case 3:ir=Mm(104);ff(ir,jr,wr,xr);q[ir+76>>2]=0;q[ir+80>>2]=0;q[ir+60>>2]=0;q[ir+64>>2]=0;q[ir>>2]=3812;q[ir+84>>2]=0;jr=q[xr+4>>2];q[ir+88>>2]=q[xr>>2];q[ir+92>>2]=jr;jr=q[xr+12>>2];q[ir+96>>2]=q[xr+8>>2];q[ir+100>>2]=jr;break a;case 4:break b}}ir=Mm(124);ff(ir,jr,wr,xr);q[ir>>2]=4048;jr=ir- -64|0;q[jr>>2]=0;q[jr+4>>2]=0;jr=q[xr+4>>2];q[ir+72>>2]=q[xr>>2];q[ir+76>>2]=jr;jr=q[xr+12>>2];q[ir+80>>2]=q[xr+8>>2];q[ir+84>>2]=jr;q[ir+92>>2]=-1;q[ir+96>>2]=-1;q[ir+88>>2]=1;q[ir+60>>2]=4284;q[ir+100>>2]=-1;q[ir+104>>2]=-1;ah(ir+108|0);q[Ye>>2]=ir;return}q[Ye>>2]=ir}function ef(Ye,ir,jr,wr,xr,yr){ir=ir+ -1|0;if(ir>>>0>5){q[Ye>>2]=0;return}a:{b:{switch(ir-1|0){default:ir=Mm(60);Vf(ir,jr,wr,xr);q[ir>>2]=4676;break a;case 0:ir=Mm(60);Vf(ir,jr,wr,xr);q[ir>>2]=5100;break a;case 2:ir=Mm(112);Vf(ir,jr,wr,xr);q[ir>>2]=5324;q[ir+60>>2]=0;q[ir+64>>2]=0;q[ir+68>>2]=0;q[ir+72>>2]=0;q[ir+76>>2]=0;q[ir+80>>2]=0;q[ir+84>>2]=0;q[ir+88>>2]=0;q[ir+92>>2]=0;q[ir+96>>2]=0;q[ir+100>>2]=0;q[ir+104>>2]=0;q[ir+108>>2]=0;break a;case 1:ir=Mm(92);Vf(ir,jr,wr,xr);q[ir+60>>2]=0;q[ir+64>>2]=0;q[ir>>2]=5560;q[ir+88>>2]=yr;q[ir+68>>2]=0;q[ir+72>>2]=0;q[ir+76>>2]=0;q[ir+80>>2]=0;q[ir+84>>2]=0;break a;case 3:ir=Mm(104);Vf(ir,jr,wr,xr);q[ir+76>>2]=0;q[ir+80>>2]=0;q[ir+60>>2]=0;q[ir+64>>2]=0;q[ir>>2]=5776;q[ir+84>>2]=0;jr=q[xr+4>>2];q[ir+88>>2]=q[xr>>2];q[ir+92>>2]=jr;jr=q[xr+12>>2];q[ir+96>>2]=q[xr+8>>2];q[ir+100>>2]=jr;break a;case 4:break b}}ir=Mm(124);Vf(ir,jr,wr,xr);q[ir>>2]=6e3;jr=ir- -64|0;q[jr>>2]=0;q[jr+4>>2]=0;jr=q[xr+4>>2];q[ir+72>>2]=q[xr>>2];q[ir+76>>2]=jr;jr=q[xr+12>>2];q[ir+80>>2]=q[xr+8>>2];q[ir+84>>2]=jr;q[ir+92>>2]=-1;q[ir+96>>2]=-1;q[ir+88>>2]=1;q[ir+60>>2]=6220;q[ir+100>>2]=-1;q[ir+104>>2]=-1;ah(ir+108|0);q[Ye>>2]=ir;return}q[Ye>>2]=ir}function ff(Ye,ir,jr,wr){var xr=0,yr=0,zr=0,Ar=0,Br=0,Cr=0,Dr=0,Er=0;q[Ye>>2]=3044;q[Ye+4>>2]=ir;ir=q[jr+8>>2];xr=q[jr+12>>2];yr=q[jr+16>>2];Ar=q[jr+20>>2];Br=q[jr>>2];Cr=q[jr+4>>2];q[Ye+40>>2]=0;zr=Ye+32|0;q[zr>>2]=0;q[zr+4>>2]=0;q[Ye+24>>2]=yr;q[Ye+28>>2]=Ar;q[Ye+16>>2]=ir;q[Ye+20>>2]=xr;q[Ye+8>>2]=Br;q[Ye+12>>2]=Cr;a:{ir=q[jr+28>>2]-q[jr+24>>2]|0;b:{if(!ir){break b}xr=ir>>2;if(xr>>>0>=1073741824){break a}ir=Mm(ir);q[Ye+32>>2]=ir;yr=Ye+36|0;q[yr>>2]=ir;q[Ye+40>>2]=ir+(xr<<2);xr=q[jr+24>>2];jr=q[jr+28>>2]-xr|0;if((jr|0)<1){break b}Dr=yr,Er=Cn(ir,xr,jr)+jr|0,q[Dr>>2]=Er}q[Ye>>2]=2988;ir=q[wr+4>>2];q[Ye+44>>2]=q[wr>>2];q[Ye+48>>2]=ir;ir=q[wr+12>>2];q[Ye+52>>2]=q[wr+8>>2];q[Ye+56>>2]=ir;return}bn();F()}function gf(Ye){Ye=Ye|0;var ir=0;q[Ye>>2]=3044;ir=q[Ye+32>>2];if(ir){q[Ye+36>>2]=ir;An(ir)}An(Ye)}function hf(Ye){Ye=Ye|0;var jr=0;if(!(!q[Ye+52>>2]|(!q[Ye+44>>2]|!q[Ye+48>>2]))){jr=q[Ye+56>>2]!=0}return jr|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0,Ds=0;q[Ye+8>>2]=Sr;hs=Ye+32|0;is=q[hs>>2];Rr=q[Ye+36>>2]-is>>2;a:{if(Rr>>>0>>0){Fa(hs,Sr-Rr|0);break a}if(Rr>>>0<=Sr>>>0){break a}q[Ye+36>>2]=is+(Sr<<2)}hs=0;Rr=(Sr&1073741823)!=(Sr|0)?-1:Sr<<2;rs=Dn(Mm(Rr),0,Rr);ws=Dn(Mm(Rr),0,Rr);os=Ye+8|0;is=q[os>>2];b:{if((is|0)<1){break b}ps=Ye+16|0;Rr=Ye+32|0;qs=Ye+12|0;while(1){is=hs<<2;ls=q[is+rs>>2];ns=q[ps>>2];c:{if((ls|0)>(ns|0)){ks=q[Rr>>2];q[is+ks>>2]=ns;break c}ks=q[Rr>>2];is=is+ks|0;ns=q[qs>>2];if((ls|0)<(ns|0)){q[is>>2]=ns;break c}q[is>>2]=ls}hs=hs+1|0;is=q[os>>2];if((hs|0)<(is|0)){continue}break}if((is|0)<1){break b}Rr=0;os=Ye+16|0;ls=Ye+20|0;ps=Ye+8|0;qs=Ye+12|0;while(1){is=Rr<<2;hs=is+Qr|0;is=q[Pr+is>>2]+q[is+ks>>2]|0;q[hs>>2]=is;d:{if((is|0)>q[os>>2]){is=is-q[ls>>2]|0}else{if((is|0)>=q[qs>>2]){break d}is=is+q[ls>>2]|0}q[hs>>2]=is}Rr=Rr+1|0;is=q[ps>>2];if((Rr|0)<(is|0)){continue}break}}Rr=q[Ye+56>>2];xs=q[Rr>>2];Rr=q[Rr+4>>2]-xs|0;if((Rr|0)>=5){ys=Rr>>2;As=Sr<<2;Bs=q[Ye+52>>2];os=Ye+16|0;ps=Ye+32|0;qs=Ye+8|0;ns=Ye+20|0;us=Ye+12|0;ss=q[Ye+48>>2];Cs=ss+28|0;ls=1;while(1){e:{f:{g:{if(ys>>>0>ls>>>0){Ye=q[(ls<<2)+xs>>2];zs=(Sr|0)<1;if(!zs){Dn(rs,0,As)}if((Ye|0)==-1){Ye=w(Sr,ls);break f}Ds=q[ss>>2];ks=0;Rr=Ye;while(1){h:{if(q[Ds+(Rr>>>3&536870908)>>2]>>>(Rr&31)&1){break h}hs=q[q[q[ss+64>>2]+12>>2]+(Rr<<2)>>2];if((hs|0)==-1){break h}ms=q[Bs>>2];js=q[Cs>>2];vs=q[ms+(q[js+(hs<<2)>>2]<<2)>>2];if((vs|0)>=(ls|0)){break h}ts=hs+1|0;ts=q[ms+(q[js+(((ts>>>0)%3|0?ts:hs+ -2|0)<<2)>>2]<<2)>>2];if((ts|0)>=(ls|0)){break h}hs=q[ms+(q[js+(hs+((hs>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if((hs|0)>=(ls|0)){break h}i:{if(zs){break i}js=w(Sr,hs);ms=w(Sr,ts);vs=w(Sr,vs);hs=0;while(1){q[ws+(hs<<2)>>2]=(q[(hs+js<<2)+Qr>>2]+q[(hs+ms<<2)+Qr>>2]|0)-q[(hs+vs<<2)+Qr>>2];hs=hs+1|0;if((hs|0)!=(Sr|0)){continue}break}hs=0;if((Sr|0)<=0){break i}while(1){js=hs<<2;ms=js+rs|0;q[ms>>2]=q[ms>>2]+q[js+ws>>2];hs=hs+1|0;if((hs|0)!=(Sr|0)){continue}break}}ks=ks+1|0}hs=-1;Rr=((Rr>>>0)%3|0?-1:2)+Rr|0;j:{if((Rr|0)==-1|q[q[ss>>2]+(Rr>>>3&536870908)>>2]>>>(Rr&31)&1){break j}Rr=q[q[q[ss+64>>2]+12>>2]+(Rr<<2)>>2];if((Rr|0)==-1){break j}if((Rr>>>0)%3){hs=Rr+ -1|0;break j}hs=Rr+2|0}Rr=(Ye|0)==(hs|0)?-1:hs;if((Rr|0)!=-1){continue}break}Ye=w(Sr,ls);if(!ks){break f}hs=0;if((Sr|0)<=0){break g}while(1){Rr=(hs<<2)+rs|0;q[Rr>>2]=q[Rr>>2]/(ks|0);hs=hs+1|0;if((hs|0)!=(Sr|0)){continue}break}break g}cn();F()}if((is|0)<1){break e}hs=0;while(1){Rr=hs<<2;is=q[Rr+rs>>2];js=q[os>>2];k:{if((is|0)>(js|0)){ks=q[ps>>2];q[Rr+ks>>2]=js;break k}ks=q[ps>>2];Rr=Rr+ks|0;js=q[us>>2];if((is|0)<(js|0)){q[Rr>>2]=js;break k}q[Rr>>2]=is}hs=hs+1|0;is=q[qs>>2];if((hs|0)<(is|0)){continue}break}Rr=0;if((is|0)<1){break e}Ye=Ye<<2;js=Ye+Qr|0;ms=Ye+Pr|0;while(1){hs=Rr<<2;Ye=hs+js|0;hs=q[hs+ms>>2]+q[hs+ks>>2]|0;q[Ye>>2]=hs;l:{if((hs|0)>q[os>>2]){hs=hs-q[ns>>2]|0}else{if((hs|0)>=q[us>>2]){break l}hs=hs+q[ns>>2]|0}q[Ye>>2]=hs}Rr=Rr+1|0;is=q[qs>>2];if((Rr|0)<(is|0)){continue}break}break e}if((is|0)<1){break e}js=(w(ls+ -1|0,Sr)<<2)+Qr|0;hs=0;while(1){Rr=hs<<2;is=q[Rr+js>>2];ms=q[os>>2];m:{if((is|0)>(ms|0)){ks=q[ps>>2];q[Rr+ks>>2]=ms;break m}ks=q[ps>>2];Rr=Rr+ks|0;ms=q[us>>2];if((is|0)<(ms|0)){q[Rr>>2]=ms;break m}q[Rr>>2]=is}hs=hs+1|0;is=q[qs>>2];if((hs|0)<(is|0)){continue}break}Rr=0;if((is|0)<1){break e}Ye=Ye<<2;js=Ye+Qr|0;ms=Ye+Pr|0;while(1){hs=Rr<<2;Ye=hs+js|0;hs=q[hs+ms>>2]+q[hs+ks>>2]|0;q[Ye>>2]=hs;n:{if((hs|0)>q[os>>2]){hs=hs-q[ns>>2]|0}else{if((hs|0)>=q[us>>2]){break n}hs=hs+q[ns>>2]|0}q[Ye>>2]=hs}Rr=Rr+1|0;is=q[qs>>2];if((Rr|0)<(is|0)){continue}break}}ls=ls+1|0;if((ls|0)<(ys|0)){continue}break}}An(ws);An(rs);return 1}function pf(Ye){Ye=Ye|0;var Pr=0;q[Ye>>2]=3336;Pr=q[Ye+96>>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Ys>>>0<=Zs>>>0){break c}q[bt+44>>2]=_s+(Zs<<2);break c}Ad(bt+40|0,Zs-Ys|0,bt)}q[bt>>2]=0;_s=q[bt+52>>2];Ys=q[bt+56>>2]-_s>>2;d:{if(Ys>>>0>=Zs>>>0){if(Ys>>>0<=Zs>>>0){break d}q[bt+56>>2]=_s+(Zs<<2);break d}Ad(bt+52|0,Zs-Ys|0,bt)}et=Ye+8|0;e:{if(q[et>>2]<=0){break e}ft=q[bt+16>>2];at=0;ht=Ye+16|0;Ys=Ye+32|0;dt=Ye+12|0;while(1){_s=at<<2;$s=q[_s+ft>>2];it=q[ht>>2];f:{if(($s|0)>(it|0)){ct=q[Ys>>2];q[_s+ct>>2]=it;break f}ct=q[Ys>>2];_s=_s+ct|0;it=q[dt>>2];if(($s|0)<(it|0)){q[_s>>2]=it;break f}q[_s>>2]=$s}at=at+1|0;_s=q[et>>2];if((at|0)<(_s|0)){continue}break}if((_s|0)<1){break e}Ys=0;et=Ye+16|0;at=Ye+20|0;ft=Ye+8|0;ht=Ye+12|0;while(1){$s=Ys<<2;_s=$s+Xs|0;$s=q[Rr+$s>>2]+q[$s+ct>>2]|0;q[_s>>2]=$s;g:{if(($s|0)>q[et>>2]){$s=$s-q[at>>2]|0}else{if(($s|0)>=q[ht>>2]){break g}$s=$s+q[at>>2]|0}q[_s>>2]=$s}Ys=Ys+1|0;if((Ys|0)>2]){continue}break}}wt=q[Ye+52>>2];ft=q[Ye+48>>2];qt=Mm(16);Ys=qt;q[Ys>>2]=0;q[Ys+4>>2]=0;q[Ys+8>>2]=0;q[Ys+12>>2]=0;q[bt+8>>2]=0;q[bt>>2]=0;q[bt+4>>2]=0;h:{if(Zs){if(Zs>>>0>=1073741824){break h}Ys=Zs<<2;mt=Mm(Ys);q[bt>>2]=mt;_s=Ys+mt|0;q[bt+8>>2]=_s;Dn(mt,0,Ys);q[bt+4>>2]=_s}Ys=1;_s=q[Ye+56>>2];ut=q[_s>>2];_s=q[_s+4>>2]-ut|0;i:{if((_s|0)<5){break i}vt=_s>>2;xt=Zs<<2;ht=Ye+8|0;it=Ye+16|0;nt=Ye+32|0;ot=Ye+20|0;pt=Ye+12|0;yt=ft+28|0;et=1;while(1){j:{k:{l:{if(vt>>>0>et>>>0){m:{n:{ct=q[(et<<2)+ut>>2];if((ct|0)==-1){break n}gt=ct+((ct>>>0)%3|0?-1:2)|0;rt=gt>>>5;dt=1;st=1<<(gt&31);tt=q[ft>>2];_s=0;Ys=ct;o:{while(1){p:{if(q[tt+(Ys>>>3&536870908)>>2]>>>(Ys&31)&1){break p}$s=q[q[q[ft+64>>2]+12>>2]+(Ys<<2)>>2];if(($s|0)==-1){break p}kt=q[wt>>2];at=q[yt>>2];lt=q[kt+(q[at+($s<<2)>>2]<<2)>>2];if((lt|0)>=(et|0)){break p}jt=$s+1|0;jt=q[kt+(q[at+(((jt>>>0)%3|0?jt:$s+ -2|0)<<2)>>2]<<2)>>2];if((jt|0)>=(et|0)){break p}$s=q[kt+(q[at+($s+(($s>>>0)%3|0?-1:2)<<2)>>2]<<2)>>2];if(($s|0)>=(et|0)){break p}if((Zs|0)>=1){kt=q[(bt+16|0)+w(_s,12)>>2];$s=w(Zs,$s);jt=w(Zs,jt);lt=w(Zs,lt);at=0;while(1){q[kt+(at<<2)>>2]=(q[($s+at<<2)+Xs>>2]+q[(at+jt<<2)+Xs>>2]|0)-q[(at+lt<<2)+Xs>>2];at=at+1|0;if((at|0)!=(Zs|0)){continue}break}}$s=4;_s=_s+1|0;if((_s|0)==4){break o}}q:{if(dt&1){at=-1;$s=Ys+1|0;Ys=($s>>>0)%3|0?$s:Ys+ -2|0;if((Ys|0)==-1|q[q[ft>>2]+(Ys>>>3&536870908)>>2]>>>(Ys&31)&1){break q}Ys=q[q[q[ft+64>>2]+12>>2]+(Ys<<2)>>2];if((Ys|0)==-1){break q}$s=Ys+1|0;at=($s>>>0)%3|0?$s:Ys+ -2|0;break q}at=-1;Ys=((Ys>>>0)%3|0?-1:2)+Ys|0;if((Ys|0)==-1|q[q[ft>>2]+(Ys>>>3&536870908)>>2]>>>(Ys&31)&1){break q}Ys=q[q[q[ft+64>>2]+12>>2]+(Ys<<2)>>2];if((Ys|0)==-1){break q}if((Ys>>>0)%3){at=Ys+ -1|0;break q}at=Ys+2|0}r:{if((at|0)==(ct|0)){break r}Ys=at;$s=(at|0)!=-1;at=($s|dt^-1)&1;Ys=at?Ys:-1;dt=$s&dt;if(!((gt|0)==-1|at)){if(q[q[ft>>2]+(rt<<2)>>2]&st){break r}$s=q[q[q[ft+64>>2]+12>>2]+(gt<<2)>>2];if(($s|0)==-1){break r}dt=0;if(($s>>>0)%3){Ys=$s+ -1|0}else{Ys=$s+2|0}}if((Ys|0)!=-1){continue}}break}$s=_s;if(($s|0)<1){break n}}gt=(Zs|0)<1;if(!gt){Dn(mt,0,xt)}Ys=$s+ -1|0;dt=(Ys<<2)+qt|0;Ys=w(Ys,12)+Ye|0;kt=Ys+60|0;rt=q[Ys- -64>>2];Ys=0;st=q[bt>>2];ct=0;_s=0;while(1){at=q[dt>>2];q[dt>>2]=at+1;if(rt>>>0<=at>>>0){break i}s:{if(q[q[kt>>2]+(at>>>3&536870908)>>2]>>>(at&31)&1){break s}_s=_s+1|0;if(gt){break s}tt=q[(bt+16|0)+w(ct,12)>>2];at=0;while(1){lt=at<<2;jt=lt+st|0;q[jt>>2]=q[jt>>2]+q[lt+tt>>2];at=at+1|0;if((at|0)!=(Zs|0)){continue}break}}ct=ct+1|0;if(($s|0)!=(ct|0)){continue}break}dt=w(Zs,et);$s=dt;if(!_s){break m}at=0;if((Zs|0)>0){break l}break k}$s=w(Zs,et)}if(q[ht>>2]<1){break j}dt=(w(et+ -1|0,Zs)<<2)+Xs|0;at=0;while(1){Ys=at<<2;_s=q[Ys+dt>>2];gt=q[it>>2];t:{if((_s|0)>(gt|0)){ct=q[nt>>2];q[Ys+ct>>2]=gt;break t}ct=q[nt>>2];Ys=Ys+ct|0;gt=q[pt>>2];if((_s|0)<(gt|0)){q[Ys>>2]=gt;break t}q[Ys>>2]=_s}at=at+1|0;_s=q[ht>>2];if((at|0)<(_s|0)){continue}break}Ys=0;if((_s|0)<1){break j}_s=$s<<2;at=_s+Xs|0;dt=Rr+_s|0;while(1){$s=Ys<<2;_s=$s+at|0;$s=q[$s+dt>>2]+q[$s+ct>>2]|0;q[_s>>2]=$s;u:{if(($s|0)>q[it>>2]){$s=$s-q[ot>>2]|0}else{if(($s|0)>=q[pt>>2]){break u}$s=$s+q[ot>>2]|0}q[_s>>2]=$s}Ys=Ys+1|0;if((Ys|0)>2]){continue}break}break j}cn();F()}while(1){Ys=(at<<2)+mt|0;q[Ys>>2]=q[Ys>>2]/(_s|0);at=at+1|0;if((at|0)!=(Zs|0)){continue}break}}if(q[ht>>2]<1){break j}at=0;while(1){Ys=at<<2;_s=q[Ys+mt>>2];$s=q[it>>2];v:{if((_s|0)>($s|0)){ct=q[nt>>2];q[Ys+ct>>2]=$s;break v}ct=q[nt>>2];Ys=Ys+ct|0;$s=q[pt>>2];if((_s|0)<($s|0)){q[Ys>>2]=$s;break v}q[Ys>>2]=_s}at=at+1|0;_s=q[ht>>2];if((at|0)<(_s|0)){continue}break}Ys=0;if((_s|0)<1){break j}_s=dt<<2;at=_s+Xs|0;dt=Rr+_s|0;while(1){$s=Ys<<2;_s=$s+at|0;$s=q[$s+dt>>2]+q[$s+ct>>2]|0;q[_s>>2]=$s;w:{if(($s|0)>q[it>>2]){$s=$s-q[ot>>2]|0}else{if(($s|0)>=q[pt>>2]){break w}$s=$s+q[ot>>2]|0}q[_s>>2]=$s}Ys=Ys+1|0;if((Ys|0)>2]){continue}break}}Ys=1;et=et+1|0;if((et|0)<(vt|0)){continue}break}}Ye=q[bt>>2];if(Ye){q[bt+4>>2]=Ye;An(Ye)}An(qt);Ye=q[bt+52>>2];if(Ye){q[bt+56>>2]=Ye;An(Ye)}Ye=q[bt+40>>2];if(Ye){q[bt+44>>2]=Ye;An(Ye)}Ye=q[bt+28>>2];if(Ye){q[bt+32>>2]=Ye;An(Ye)}Ye=q[bt+16>>2];if(Ye){q[bt+20>>2]=Ye;An(Ye)}T=bt- -64|0;return Ys|0}bn();F()}function wf(Ye){Ye=Ye|0;var Rr=0,Xs=0;q[Ye>>2]=3584;Rr=q[Ye+76>>2];if(Rr){An(Rr)}Xs=Ye+68|0;Rr=q[Xs>>2];q[Xs>>2]=0;if(Rr){An(Rr)}q[Ye>>2]=3044;Rr=q[Ye+32>>2];if(Rr){q[Ye+36>>2]=Rr;An(Rr)}return Ye|0}function xf(Ye){Ye=Ye|0;var Ys=0,Zs=0;q[Ye>>2]=3584;Ys=q[Ye+76>>2];if(Ys){An(Ys)}Zs=Ye+68|0;Ys=q[Zs>>2];q[Zs>>2]=0;if(Ys){An(Ys)}q[Ye>>2]=3044;Ys=q[Ye+32>>2];if(Ys){q[Ye+36>>2]=Ys;An(Ys)}An(Ye)}function yf(q){q=q|0;return 3}function zf(Ye){Ye=Ye|0;if(!(!q[Ye+60>>2]|!q[Ye+44>>2]|(!q[Ye+48>>2]|!q[Ye+52>>2]))){return q[Ye+56>>2]!=0|0}return 0}function Af(Ye,_s){Ye=Ye|0;_s=_s|0;var zt=0;if(!(q[_s+56>>2]|!_s|r[_s+24|0]!=3)){q[Ye+60>>2]=_s;zt=1}return zt|0}function Bf(Ye,_s){Ye=Ye|0;_s=_s|0;var At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0,Jt=0,Kt=0;Gt=T-32|0;T=Gt;q[Gt+28>>2]=0;a:{b:{if(s[_s+38>>1]<=513){Et=q[_s+12>>2];At=q[_s+20>>2];Ct=q[_s+16>>2];Bt=Ct+4|0;if(Bt>>>0<4){At=At+1|0}Dt=Bt;Bt=At;if((Et|0)<(At|0)?1:(Et|0)<=(At|0)?t[_s+8>>2]>=Dt>>>0?0:1:0){break a}At=Ct+q[_s>>2]|0;At=r[At|0]|r[At+1|0]<<8|(r[At+2|0]<<16|r[At+3|0]<<24);q[Gt+28>>2]=At;q[_s+16>>2]=Dt;q[_s+20>>2]=Bt;break b}if(!tf(1,Gt+28|0,_s)){break a}At=q[Gt+28>>2]}if(!At){break a}Dt=Ye+76|0;uf(Dt,At);It=ah(Gt+8|0);c:{if(!bh(It,_s)){break c}Et=1;while(1){Ct=1<<(Ht&31);Ft=dh(It);Bt=q[Dt>>2]+(Ht>>>3&536870908)|0;Et=Et^Ft;Ft=q[Bt>>2]|Ct;d:{if(!(Et&1)){break d}Ft=q[Bt>>2]&(Ct^-1)}Ct=Ft;Et=Et^1;q[Bt>>2]=Ct;Ht=Ht+1|0;if((At|0)!=(Ht|0)){continue}break}Ht=0;Bt=q[_s+12>>2];Et=Bt;At=q[_s+20>>2];Ct=At;It=q[_s+16>>2];Dt=It+4|0;if(Dt>>>0<4){At=At+1|0}Jt=q[_s+8>>2];Ft=Dt;Dt=At;if((Bt|0)<(At|0)?1:(Bt|0)<=(At|0)?Jt>>>0>=Ft>>>0?0:1:0){break c}Kt=q[_s>>2];At=Kt+It|0;Bt=r[At|0]|r[At+1|0]<<8|(r[At+2|0]<<16|r[At+3|0]<<24);q[_s+16>>2]=Ft;q[_s+20>>2]=Dt;At=Ct;Ct=It+8|0;if(Ct>>>0<8){At=At+1|0}Dt=Ct;Ct=At;if((Et|0)<(At|0)?1:(Et|0)<=(At|0)?Jt>>>0>=Dt>>>0?0:1:0){break c}At=Ft+Kt|0;At=r[At|0]|r[At+1|0]<<8|(r[At+2|0]<<16|r[At+3|0]<<24);q[_s+16>>2]=Dt;q[_s+20>>2]=Ct;if((Bt|0)>(At|0)){break c}q[Ye+16>>2]=At;q[Ye+12>>2]=Bt;_s=Bt;Bt=(At>>31)-((At>>>0<_s>>>0)+(_s>>31)|0)|0;_s=At-_s|0;if(!Bt&_s>>>0>2147483646|Bt>>>0>0){break c}Ht=1;_s=_s+1|0;q[Ye+20>>2]=_s;Bt=Ye+24|0;At=(_s|0)/2|0;q[Bt>>2]=At;q[Ye+28>>2]=0-At;if(_s&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ut|0;Pt=q[Pt+Qt>>2]+q[Pt+St>>2]|0;q[Ot>>2]=Pt;e:{if((Pt|0)>q[Vt>>2]){Pt=Pt-q[Xt>>2]|0}else{if((Pt|0)>=q[Yt>>2]){break e}Pt=Pt+q[Xt>>2]|0}q[Ot>>2]=Pt}Mt=Mt+1|0;if((Mt|0)>2]){continue}break}}Rt=Rt+1|0;if((Rt|0)>=(Zt|0)){break b}Mt=q[_t>>2];Ot=q[Mt>>2];if(q[Mt+4>>2]-Ot>>2>>>0>Rt>>>0){continue}break}}cn();F()}return 1}function Df(Ye,_s,Lt,Mt){var Nt=0,Ot=0,$t=0,au=x(0),bu=x(0),cu=x(0),du=0,eu=x(0),fu=x(0),gu=x(0),hu=x(0),iu=x(0),ju=0,ku=0,lu=x(0),mu=x(0),nu=x(0),ou=x(0),pu=x(0),qu=x(0),ru=x(0),su=x(0),tu=0;Nt=T-48|0;T=Nt;du=-1;Ot=-1;a:{if((_s|0)==-1){break a}Ot=_s+1|0;du=(Ot>>>0)%3|0?Ot:_s+ -2|0;Ot=_s+ -1|0;if((_s>>>0)%3){break a}Ot=_s+2|0}$t=q[Ye+52>>2];_s=q[$t>>2];b:{$t=q[$t+4>>2]-_s>>2;ju=q[q[Ye+48>>2]+28>>2];du=q[ju+(du<<2)>>2];if($t>>>0<=du>>>0){break b}tu=$t;$t=q[(Ot<<2)+ju>>2];if(tu>>>0<=$t>>>0){break b}c:{d:{Ot=q[_s+(du<<2)>>2];ju=(Ot|0)>=(Mt|0);if(ju){break d}du=q[_s+($t<<2)>>2];if((du|0)>=(Mt|0)){break d}_s=q[Ye+72>>2];$t=(w(_s,du)<<2)+Lt|0;bu=x(q[$t+4>>2]);_s=(w(_s,Ot)<<2)+Lt|0;iu=x(q[_s+4>>2]);lu=x(q[$t>>2]);ou=x(q[_s>>2]);if(!(lu!=ou|bu!=iu)){Ye=q[Ye+68>>2];_s=Ye;if(x(y(bu))>2]=Lt;if(x(y(lu))>2]=~~lu;break c}q[Ye>>2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hu+(_s?bu:x(-bu)));hu=x(x(iu*au)+ou);au=x(cu*eu);au=x(hu+(_s?x(-au):au));f:{if(((k(au),e(0))&2147483647)>>>0>=2139095041){_s=q[Ye+68>>2];q[_s>>2]=-2147483648;break f}_s=q[Ye+68>>2];Ye=_s;ku=C(+au+.5);g:{if(y(ku)<2147483648){Lt=~~ku;break g}Lt=-2147483648}q[Ye>>2]=Lt}Lt=((k(bu),e(0))&2147483647)>>>0>2139095040;ku=C(+bu+.5);h:{if(y(ku)<2147483648){Ye=~~ku;break h}Ye=-2147483648}q[_s+4>>2]=Lt?-2147483648:Ye;break c}i:{if(!ju){_s=q[Ye+72>>2];Mt=w(Ot,_s);break i}if((Mt|0)<=0){if(q[Ye+72>>2]<1){break c}Lt=q[Ye+68>>2];_s=0;while(1){q[Lt+(_s<<2)>>2]=0;_s=_s+1|0;if((_s|0)>2]){continue}break}break c}_s=q[Ye+72>>2];Mt=w(_s,Mt+ -1|0)}if((_s|0)<1){break c}Ot=q[Ye+68>>2];_s=0;while(1){q[Ot+(_s<<2)>>2]=q[(_s+Mt<<2)+Lt>>2];_s=_s+1|0;if((_s|0)>2]){continue}break}}T=Nt+48|0;return}cn();F()}function Ef(Ye){Ye=Ye|0;var _s=0;q[Ye>>2]=3812;_s=q[Ye+76>>2];if(_s){An(_s)}q[Ye>>2]=3044;_s=q[Ye+32>>2];if(_s){q[Ye+36>>2]=_s;An(_s)}return Ye|0}function Ff(Ye){Ye=Ye|0;var Lt=0;q[Ye>>2]=3812;Lt=q[Ye+76>>2];if(Lt){An(Lt)}q[Ye>>2]=3044;Lt=q[Ye+32>>2];if(Lt){q[Ye+36>>2]=Lt;An(Lt)}An(Ye)}function Gf(q){q=q|0;return 5}function Hf(Ye,Mt){Ye=Ye|0;Mt=Mt|0;var uu=0,vu=0,wu=0,xu=0,yu=0,zu=0,Au=0,Bu=0,Cu=0,Du=0,Eu=0;Bu=T-16|0;T=Bu;wu=q[Mt+12>>2];uu=q[Mt+20>>2];xu=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0)|0)|0:Hu)|0;ov=Ye,pv=ao(Wu,Wu>>>0>>0?Hu+1|0:Hu,fv,Yu),q[ov+12>>2]=pv;Hu=$n(_u,Xu,$u,av);Wu=V;ev=Ye;Iu=$n(Iu,gv,fv,Yu);Ye=Iu+Hu|0;Hu=V+Wu|0;Hu=Ye>>>0>>0?Hu+1|0:Hu;Xu=Ye;Ye=$n(Gu,Mt,Zu,hv);Gu=Fu?Ye:0-Ye|0;Mt=Xu+Gu|0;Xu=Hu;Hu=V;Ye=Xu+(Fu?Hu:0-((0>>0)+Hu|0)|0)|0;ov=ev,pv=ao(Mt,Mt>>>0>>0?Ye+1|0:Ye,fv,Yu),q[ov+8>>2]=pv;Fu=1}T=Vu+80|0;return Fu} - - - -function Kf(a,b,c,d){var e=0,f=0,g=0,h=0,i=x(0),j=0,k=0;a:{b:{if(!d){break b}e=q[a+28>>2]+ -1|0;if(e>>>0>10){break b}c:{d:{e:{switch(e-1|0){default:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;h=o[b|0];q[e>>2]=h;q[e+4>>2]=h>>31;b=b+1|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 0:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;q[e>>2]=r[b|0];q[e+4>>2]=0;b=b+1|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 1:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;h=p[b>>1];q[e>>2]=h;q[e+4>>2]=h>>31;b=b+2|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 2:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;q[e>>2]=s[b>>1];q[e+4>>2]=0;b=b+2|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 3:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;h=q[b>>2];q[e>>2]=h;q[e+4>>2]=h>>31;b=b+4|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 4:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;q[e>>2]=q[b>>2];q[e+4>>2]=0;b=b+4|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 5:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){h=q[b+4>>2];e=(f<<3)+d|0;q[e>>2]=q[b>>2];q[e+4>>2]=h;b=b+8|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 6:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){h=q[b+4>>2];e=(f<<3)+d|0;q[e>>2]=q[b>>2];q[e+4>>2]=h;b=b+8|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}break a;case 7:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break c}g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;g=e;i=u[b>>2];f:{if(x(y(i))=x(1)?i>x(0)?~~x(A(x(C(x(i/x(4294967296)))),x(4294967296)))>>>0:~~x(D(x(x(i-x(~~i>>>0>>>0))/x(4294967296))))>>>0:0;k=~~i>>>0;break f}h=-2147483648;k=0}q[g>>2]=k;q[e+4>>2]=h;b=b+4|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break c;case 8:e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24<1){break d}g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;g=e;j=v[b>>3];g:{if(y(j)<0x8000000000000000){h=y(j)>=1?j>0?~~A(C(j/4294967296),4294967295)>>>0:~~D((j- +(~~j>>>0>>>0))/4294967296)>>>0:0;k=~~j>>>0;break g}h=-2147483648;k=0}q[g>>2]=k;q[e+4>>2]=h;b=b+8|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}break d;case 9:break e}}e=o[a+24|0];if(((e|0)>(c|0)?c:e)<<24>>24>=1){g=q[q[a>>2]>>2];e=q[a+48>>2]+$n(q[a+40>>2],q[a+44>>2],b,0)|0;b=g+e|0;while(1){e=(f<<3)+d|0;q[e>>2]=r[b|0];q[e+4>>2]=0;b=b+1|0;f=f+1|0;e=o[a+24|0];if((f|0)<((e|0)>(c|0)?c:e)<<24>>24){continue}break}}if((e|0)>=(c|0)){break b}Dn((e<<3)+d|0,0,c-e<<3);break b}if((e|0)>=(c|0)){break b}break a}if((e|0)>=(c|0)){break b}Dn((e<<3)+d|0,0,c-e<<3)}return}Dn((e<<3)+d|0,0,c-e<<3)}function Lf(a){a=a|0;var b=0;q[a>>2]=4048;q[a>>2]=3044;b=q[a+32>>2];if(b){q[a+36>>2]=b;An(b)}return a|0}function Mf(a){a=a|0;var c=0;q[a>>2]=4048;q[a>>2]=3044;c=q[a+32>>2];if(c){q[a+36>>2]=c;An(c)}An(a)}function Nf(a){a=a|0;return 6}function Of(a){a=a|0;var d=0;a:{if(!q[a- -64>>2]|!q[a+68>>2]|(!q[a+44>>2]|!q[a+48>>2])){break a}if(!q[a+52>>2]|!q[a+56>>2]){break a}d=q[a+92>>2]!=-1}return d|0}function Pf(a,l){a=a|0;l=l|0;var m=0;if(!(q[l+56>>2]|r[l+24|0]!=3)){q[a- -64>>2]=l;m=1}return m|0}function Qf(a,l){a=a|0;l=l|0;var n=0,o=0,p=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;w=q[l+12>>2];p=w;o=q[l+20>>2];u=o;x=q[l+16>>2];n=x+4|0;if(n>>>0<4){o=o+1|0}y=q[l+8>>2];t=n;n=o;a:{if((p|0)<(n|0)?1:(p|0)<=(n|0)?y>>>0>=t>>>0?0:1:0){break a}z=q[l>>2];o=x+z|0;p=r[o|0]|r[o+1|0]<<8|(r[o+2|0]<<16|r[o+3|0]<<24);q[l+16>>2]=t;q[l+20>>2]=n;n=w;o=u;v=x+8|0;if(v>>>0<8){o=o+1|0}if((n|0)<(o|0)?1:(n|0)<=(o|0)?y>>>0>=v>>>0?0:1:0){break a}n=t+z|0;n=r[n|0]|r[n+1|0]<<8|(r[n+2|0]<<16|r[n+3|0]<<24);q[l+16>>2]=v;q[l+20>>2]=o;if((p|0)>(n|0)){break a}q[a+16>>2]=n;q[a+12>>2]=p;t=p;p=(n>>31)-((p>>31)+(n>>>0

    >>0)|0)|0;n=n-t|0;if(!p&n>>>0>2147483646|p>>>0>0){break a}p=n+1|0;q[a+20>>2]=p;t=a+24|0;n=(p|0)/2|0;q[t>>2]=n;q[a+28>>2]=0-n;if(!(p&1)){q[t>>2]=n+ -1}if(s[l+38>>1]<=513){if((w|0)<(o|0)?1:(w|0)<=(o|0)?y>>>0>v>>>0?0:1:0){break a}n=r[v+z|0];o=u;u=x+9|0;if(u>>>0<9){o=o+1|0}p=l;q[p+16>>2]=u;q[p+20>>2]=o;if(n>>>0>1){break a}q[a+88>>2]=n-1|0?0:1}A=bh(a+108|0,l)}return A|0}function Rf(a,l,r,s,B,C){a=a|0;l=l|0;r=r|0;s=s|0;B=B|0;C=C|0;var D=0,E=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;E=T-32|0;T=E;q[a+68>>2]=C;s=q[a+56>>2];B=q[s>>2];C=s+4|0;D=q[C>>2];q[E+24>>2]=0;q[E+16>>2]=0;q[E+20>>2]=0;a:{B=D-B|0;if((B|0)<1){break a}s=q[s>>2];if((s|0)!=q[C>>2]){P=B>>2;Q=a+60|0;R=a+108|0;K=a+8|0;L=a+16|0;M=a+32|0;N=a+20|0;O=a+12|0;S=a+56|0;while(1){Sf(Q,q[(I<<2)+s>>2],E+16|0);B=q[E+20>>2];D=B>>31;C=q[E+16>>2];G=C>>31;J=q[E+24>>2];H=J>>31;s=0;H=H^H+J;D=H+((D^B+D)+(G^C+G)|0)|0;if(D>>>0>>0){s=1}b:{if(!(s|D)){q[E+16>>2]=q[a+104>>2];break b}G=q[a+104>>2];H=G>>31;B=ao($n(G,H,B,B>>31),V,D,s);q[E+20>>2]=B;s=ao($n(G,H,C,C>>31),V,D,s);q[E+16>>2]=s;C=s;s=s>>31;s=(G-(C+s^s)|0)+((B|0)<0?B:0-B|0)|0;if((J|0)>=0){q[E+24>>2]=s;break b}q[E+24>>2]=0-s}s=dh(R);C=q[E+16>>2];c:{if(!s){B=q[E+20>>2];break c}q[E+24>>2]=0-q[E+24>>2];B=0-q[E+20>>2]|0;q[E+20>>2]=B;C=0-C|0;q[E+16>>2]=C}d:{if((C|0)>=0){s=q[a+104>>2];C=s+q[E+24>>2]|0;s=s+B|0;break d}e:{if((B|0)<=-1){C=q[E+24>>2];s=C>>31;s=s^s+C;break e}C=q[E+24>>2];s=C>>31;s=q[a+100>>2]-(s^s+C)|0}if((C|0)<=-1){C=B;B=B>>31;C=C+B^B;break d}C=B;B=B>>31;C=q[a+100>>2]-(C+B^B)|0}B=q[a+100>>2];f:{if(!(s|C)){C=B;s=B;break f}if(!((B|0)!=(C|0)|s)){s=C;break f}if(!((s|0)!=(B|0)|C)){C=s;break f}g:{if(s){break g}D=q[a+104>>2];if((D|0)>=(C|0)){break g}C=(D<<1)-C|0;s=0;break f}h:{if((s|0)!=(B|0)){break h}D=q[a+104>>2];if((D|0)<=(C|0)){break h}C=(D<<1)-C|0;break f}i:{if((B|0)!=(C|0)){break i}B=q[a+104>>2];if((B|0)<=(s|0)){break i}s=(B<<1)-s|0;break f}if(C){break f}C=0;B=q[a+104>>2];if((B|0)>=(s|0)){break f}s=(B<<1)-s|0}q[E+12>>2]=C;q[E+8>>2]=s;j:{if(q[K>>2]<1){break j}C=0;while(1){D=q[L>>2];k:{if((s|0)>(D|0)){B=q[M>>2];q[B+(C<<2)>>2]=D;break k}B=q[M>>2];D=B+(C<<2)|0;G=q[O>>2];if((s|0)<(G|0)){q[D>>2]=G;break k}q[D>>2]=s}C=C+1|0;D=q[K>>2];if((C|0)<(D|0)){s=q[(E+8|0)+(C<<2)>>2];continue}break}s=0;if((D|0)<1){break j}C=I<<3;G=C+r|0;J=l+C|0;while(1){D=s<<2;C=D+G|0;D=q[D+J>>2]+q[B+D>>2]|0;q[C>>2]=D;l:{if((D|0)>q[L>>2]){H=D-q[N>>2]|0}else{if((D|0)>=q[O>>2]){break l}H=D+q[N>>2]|0}q[C>>2]=H}s=s+1|0;if((s|0)>2]){continue}break}}I=I+1|0;if((I|0)>=(P|0)){break a}B=q[S>>2];s=q[B>>2];if(q[B+4>>2]-s>>2>>>0>I>>>0){continue}break}}cn();F()}T=E+32|0;return 1}function Sf(a,l,s){a=a|0;l=l|0;s=s|0;var B=0,C=0,U=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0;C=T-96|0;T=C;B=q[a+16>>2];o[C+92|0]=1;q[C+88>>2]=l;q[C+84>>2]=l;q[C+80>>2]=B;W=q[a+20>>2];U=q[W>>2];a:{b:{c:{d:{B=q[q[B+28>>2]+(l<<2)>>2];if(q[W+4>>2]-U>>2>>>0>B>>>0){B=q[q[a+8>>2]+(q[U+(B<<2)>>2]<<2)>>2];U=q[a+4>>2];if(!r[U+84|0]){B=q[q[U+68>>2]+(B<<2)>>2]}q[C+72>>2]=0;q[C+76>>2]=0;W=C- -64|0;q[W>>2]=0;q[W+4>>2]=0;q[C+56>>2]=0;q[C+60>>2]=0;Kf(U,B,o[U+24|0],C+56|0);if((l|0)==-1){break a}B=l+1|0;W=(B>>>0)%3|0?B:l+ -2|0;ea=((l>>>0)%3|0?-1:2)+l|0;la=a+28|0;X=!q[la>>2];ma=a+20|0;na=a+16|0;oa=a+8|0;while(1){U=W;B=ea;e:{if(X){break e}B=l+1|0;U=(B>>>0)%3|0?B:l+ -2|0;B=l+ -1|0;if((l>>>0)%3){break e}B=l+2|0}X=q[ma>>2];l=q[X>>2];U=q[q[q[na>>2]+28>>2]+(U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z;Z=q[X>>2];ba=Z-l|0;l=q[X+4>>2]-((Z>>>0>>0)+fa|0)|0;X=$n(ba,l,ia,ga);Z=ca-X|0;ca=B-(V+(ca>>>0>>0)|0)|0;B=$n(ja,_,U,ka);U=aa-B|0;da=da-(V+(aa>>>0>>0)|0)|0;B=$n(ba,l,pa,ha);aa=B+U|0;l=V+da|0;l=aa>>>0>>0?l+1|0:l;da=l;Uf(C+80|0);_=q[la>>2];X=!_;l=q[C+88>>2];if((l|0)!=-1){continue}break}l=ca;B=l>>31;a=l>>31;l=a+l|0;W=B+Z|0;if(W>>>0>>0){l=l+1|0}B=B^W;X=a^l;l=da;a=l>>31;l=l>>31;W=a;ea=da+a|0;U=l+aa|0;if(U>>>0>>0){ea=ea+1|0}a=l^U;U=W^ea;f:{if(($|0)<-1?1:($|0)<=-1?Y>>>0>4294967295?0:1:0){l=Y;W=a+(B-l|0)|0;l=U+(X-((B>>>0>>0)+$|0)|0)|0;B=W;a=B>>>0>>0?l+1|0:l;if(!_){break f}break b}l=X+$|0;W=B;B=Y;W=W+B|0;if(W>>>0>>0){l=l+1|0}B=a;W=B+W|0;a=l+U|0;a=W>>>0>>0?a+1|0:a;B=W;if(_){break b}}if((B|0)<536870913){break a}a=((a&536870911)<<3|B>>>29)&7;l=0;Y=ao(Y,$,a,l);Z=ao(Z,ca,a,l);aa=ao(aa,da,a,l);break a}cn();F()}cn();F()}cn();F()}if((a|0)<0?1:(a|0)<=0?B>>>0>=536870913?0:1:0){break a}l=a>>>29;a=(a&536870911)<<3|B>>>29;Y=ao(Y,$,a,l);Z=ao(Z,ca,a,l);aa=ao(aa,da,a,l)}q[s+8>>2]=Y;q[s+4>>2]=Z;q[s>>2]=aa;T=C+96|0}function Tf(a,l){a=a|0;l=l|0;if(l>>>0<=1){q[a+28>>2]=l;a=1}else{a=0}return a|0}function Uf(a){var l=0,s=0,F=0;l=q[a+8>>2];F=q[a>>2];a:{if(r[a+12|0]){b:{c:{d:{e:{if((l|0)==-1){break e}s=l+1|0;l=(s>>>0)%3|0?s:l+ -2|0;if((l|0)==-1|q[q[F>>2]+(l>>>3&536870908)>>2]>>>(l&31)&1){break e}l=q[q[q[F+64>>2]+12>>2]+(l<<2)>>2];if((l|0)!=-1){break d}}q[a+8>>2]=-1;break c}s=l+1|0;l=(s>>>0)%3|0?s:l+ -2|0;q[a+8>>2]=l;if((l|0)!=-1){break b}}l=-1;s=q[a+4>>2];f:{if((s|0)==-1){break f}s=s+((s>>>0)%3|0?-1:2)|0;if((s|0)==-1|q[q[F>>2]+(s>>>3&536870908)>>2]>>>(s&31)&1){break f}F=q[q[q[F+64>>2]+12>>2]+(s<<2)>>2];if((F|0)==-1){break f}if((F>>>0)%3){l=F+ -1|0;break f}l=F+2|0}o[a+12|0]=0;q[a+8>>2]=l;return}if((l|0)!=q[a+4>>2]){break a}q[a+8>>2]=-1;return}s=-1;g:{if((l|0)==-1){break g}l=l+((l>>>0)%3|0?-1:2)|0;if((l|0)==-1|q[q[F>>2]+(l>>>3&536870908)>>2]>>>(l&31)&1){break g}l=q[q[q[F+64>>2]+12>>2]+(l<<2)>>2];if((l|0)==-1){break g}if((l>>>0)%3){s=l+ -1|0;break g}s=l+2|0}q[a+8>>2]=s}}function Vf(a,r,T,V){var ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0;q[a>>2]=3044;q[a+4>>2]=r;r=q[T+8>>2];ra=q[T+12>>2];sa=q[T+16>>2];ua=q[T+20>>2];va=q[T>>2];wa=q[T+4>>2];q[a+40>>2]=0;ta=a+32|0;q[ta>>2]=0;q[ta+4>>2]=0;q[a+24>>2]=sa;q[a+28>>2]=ua;q[a+16>>2]=r;q[a+20>>2]=ra;q[a+8>>2]=va;q[a+12>>2]=wa;a:{r=q[T+28>>2]-q[T+24>>2]|0;b:{if(!r){break b}ra=r>>2;if(ra>>>0>=1073741824){break a}r=Mm(r);q[a+32>>2]=r;sa=a+36|0;q[sa>>2]=r;q[a+40>>2]=r+(ra<<2);ra=q[T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aa+q[Ba>>2]|0}q[V>>2]=Aa}Ca=Ca+1|0;Aa=q[Ia>>2];if((Ca|0)<(Aa|0)){continue}break}}V=q[a+56>>2];Pa=q[V>>2];V=q[V+4>>2]-Pa|0;if((V|0)>=5){Qa=V>>2;Ha=a+16|0;Ga=a+32|0;Ia=a+8|0;Ja=a+20|0;Ea=a+12|0;Ca=1;while(1){e:{f:{if(Qa>>>0>Ca>>>0){Ma=w(za,Ca);a=q[(Ca<<2)+Pa>>2];if((a|0)==-1){break f}a=q[q[Oa+12>>2]+(a<<2)>>2];if((a|0)==-1){break f}V=-1;Da=q[Ra>>2];Ba=q[Oa>>2];Ka=q[Da+(q[Ba+(a<<2)>>2]<<2)>>2];La=a+1|0;La=(La>>>0)%3|0?La:a+ -2|0;if((La|0)!=-1){La=q[Ba+(La<<2)>>2]}else{La=-1}a=a+((a>>>0)%3|0?-1:2)|0;if((a|0)!=-1){V=q[Ba+(a<<2)>>2]}if((Ka|0)>=(Ca|0)){break f}a=q[(La<<2)+Da>>2];if((a|0)>=(Ca|0)){break f}V=q[Da+(V<<2)>>2];if((V|0)>=(Ca|0)){break f}if((za|0)>=1){Ba=w(V,za);a=w(a,za);Da=w(za,Ka);V=0;while(1){q[(V<<2)+Na>>2]=(q[(V+Ba<<2)+T>>2]+q[(a+V<<2)+T>>2]|0)-q[(V+Da<<2)+T>>2];V=V+1|0;if((za|0)!=(V|0)){continue}break}}if((Aa|0)<1){break e}V=0;while(1){a=V<<2;Aa=q[a+Na>>2];Da=q[Ha>>2];g:{if((Aa|0)>(Da|0)){Ba=q[Ga>>2];q[a+Ba>>2]=Da;break g}Ba=q[Ga>>2];a=a+Ba|0;Da=q[Ea>>2];if((Aa|0)<(Da|0)){q[a>>2]=Da;break g}q[a>>2]=Aa}V=V+1|0;Aa=q[Ia>>2];if((V|0)<(Aa|0)){continue}break}V=0;if((Aa|0)<1){break e}a=Ma<<2;Ma=a+T|0;Da=a+r|0;while(1){Aa=V<<2;a=Aa+Ma|0;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0){break a}q[a+36>>2]=Sa+(za<<2)}Sa=0;V=(za&1073741823)!=(za|0)?-1:za<<2;$a=Dn(Mm(V),0,V);db=Dn(Mm(V),0,V);Va=a+8|0;Ta=q[Va>>2];b:{if((Ta|0)<1){break b}Za=a+16|0;V=a+32|0;_a=a+12|0;while(1){Aa=Sa<<2;Ta=q[Aa+$a>>2];Wa=q[Za>>2];c:{if((Ta|0)>(Wa|0)){Ua=q[V>>2];q[Aa+Ua>>2]=Wa;break c}Ua=q[V>>2];Aa=Aa+Ua|0;Wa=q[_a>>2];if((Ta|0)<(Wa|0)){q[Aa>>2]=Wa;break c}q[Aa>>2]=Ta}Sa=Sa+1|0;Ta=q[Va>>2];if((Sa|0)<(Ta|0)){continue}break}if((Ta|0)<1){break b}Aa=0;Za=a+16|0;Va=a+20|0;_a=a+8|0;Wa=a+12|0;while(1){Sa=Aa<<2;V=Sa+T|0;Sa=q[r+Sa>>2]+q[Sa+Ua>>2]|0;q[V>>2]=Sa;d:{if((Sa|0)>q[Za>>2]){Xa=Sa-q[Va>>2]|0}else{if((Sa|0)>=q[Wa>>2]){break d}Xa=Sa+q[Va>>2]|0}q[V>>2]=Xa}Aa=Aa+1|0;Ta=q[_a>>2];if((Aa|0)<(Ta|0)){continue}break}}V=q[a+56>>2];eb=q[V>>2];V=q[V+4>>2]-eb|0;if((V|0)>=5){fb=V>>2;gb=q[a+48>>2];kb=za<<2;lb=q[a+52>>2];Za=a+16|0;_a=a+32|0;Wa=a+8|0;bb=a+20|0;cb=a+12|0;Va=1;while(1){e:{f:{g:{if(fb>>>0>Va>>>0){Aa=q[(Va<<2)+eb>>2];hb=(za|0)<1;if(!hb){Dn($a,0,kb)}if((Aa|0)==-1){a=w(za,Va);break f}ib=q[gb+12>>2];Ya=0;V=Aa;while(1){a=q[ib+(V<<2)>>2];h:{if((a|0)==-1){break h}Ua=-1;ab=q[lb>>2];Sa=q[gb>>2];jb=q[ab+(q[Sa+(a<<2)>>2]<<2)>>2];Xa=a+1|0;Xa=(Xa>>>0)%3|0?Xa:a+ -2|0;if((Xa|0)!=-1){Xa=q[Sa+(Xa<<2)>>2]}else{Xa=-1}a=a+((a>>>0)%3|0?-1:2)|0;if((a|0)!=-1){Ua=q[Sa+(a<<2)>>2]}if((jb|0)>=(Va|0)){break h}a=q[(Xa<<2)+ab>>2];if((a|0)>=(Va|0)){break h}Sa=q[ab+(Ua<<2)>>2];if((Sa|0)>=(Va|0)){break h}i:{if(hb){break i}Ua=w(za,Sa);a=w(a,za);ab=w(za,jb);Sa=0;while(1){q[db+(Sa<<2)>>2]=(q[(Sa+Ua<<2)+T>>2]+q[(a+Sa<<2)+T>>2]|0)-q[(Sa+ab<<2)+T>>2];Sa=Sa+1|0;if((Sa|0)!=(za|0)){continue}break}Sa=0;if((za|0)<=0){break i}while(1){a=Sa<<2;Ua=a+$a|0;q[Ua>>2]=q[Ua>>2]+q[a+db>>2];Sa=Sa+1|0;if((Sa|0)!=(za|0)){continue}break}}Ya=Ya+1|0}V=((V>>>0)%3|0?-1:2)+V|0;a=-1;j:{if((V|0)==-1){break j}V=q[ib+(V<<2)>>2];a=-1;if((V|0)==-1){break j}a=V+ -1|0;if((V>>>0)%3){break j}a=V+2|0}V=(a|0)==(Aa|0)?-1:a;if((V|0)!=-1){continue}break}a=w(za,Va);if(!Ya){break f}Sa=0;if((za|0)<=0){break g}while(1){V=(Sa<<2)+$a|0;q[V>>2]=q[V>>2]/(Ya|0);Sa=Sa+1|0;if((Sa|0)!=(za|0)){continue}break}break g}cn();F()}if((Ta|0)<1){break e}Sa=0;while(1){V=Sa<<2;Aa=q[V+$a>>2];Ta=q[Za>>2];k:{if((Aa|0)>(Ta|0)){Ua=q[_a>>2];q[V+Ua>>2]=Ta;break k}Ua=q[_a>>2];V=V+Ua|0;Ta=q[cb>>2];if((Aa|0)<(Ta|0)){q[V>>2]=Ta;break k}q[V>>2]=Aa}Sa=Sa+1|0;Ta=q[Wa>>2];if((Sa|0)<(Ta|0)){continue}break}Aa=0;if((Ta|0)<1){break e}a=a<<2;Sa=a+T|0;Ya=a+r|0;while(1){V=Aa<<2;a=V+Sa|0;V=q[V+Ya>>2]+q[V+Ua>>2]|0;q[a>>2]=V;l:{if((V|0)>q[Za>>2]){V=V-q[bb>>2]|0}else{if((V|0)>=q[cb>>2]){break l}V=V+q[bb>>2]|0}q[a>>2]=V}Aa=Aa+1|0;Ta=q[Wa>>2];if((Aa|0)<(Ta|0)){continue}break}break e}if((Ta|0)<1){break e}Ya=(w(Va+ -1|0,za)<<2)+T|0;Sa=0;while(1){V=Sa<<2;Aa=q[V+Ya>>2];Ta=q[Za>>2];m:{if((Aa|0)>(Ta|0)){Ua=q[_a>>2];q[V+Ua>>2]=Ta;break m}Ua=q[_a>>2];V=V+Ua|0;Ta=q[cb>>2];if((Aa|0)<(Ta|0)){q[V>>2]=Ta;break m}q[V>>2]=Aa}Sa=Sa+1|0;Ta=q[Wa>>2];if((Sa|0)<(Ta|0)){continue}break}Aa=0;if((Ta|0)<1){break e}a=a<<2;Sa=a+T|0;Ya=a+r|0;while(1){V=Aa<<2;a=V+Sa|0;V=q[V+Ya>>2]+q[V+Ua>>2]|0;q[a>>2]=V;n:{if((V|0)>q[Za>>2]){V=V-q[bb>>2]|0}else{if((V|0)>=q[cb>>2]){break n}V=V+q[bb>>2]|0}q[a>>2]=V}Aa=Aa+1|0;Ta=q[Wa>>2];if((Aa|0)<(Ta|0)){continue}break}}Va=Va+1|0;if((Va|0)<(fb|0)){continue}break}}An(db);An($a);return 1}function Yf(a){a=a|0;var r=0;q[a>>2]=5324;r=q[a+96>>2];if(r){An(r)}r=q[a+84>>2];if(r){An(r)}r=q[a+72>>2];if(r){An(r)}r=q[a+60>>2];if(r){An(r)}q[a>>2]=3044;r=q[a+32>>2];if(r){q[a+36>>2]=r;An(r)}return a|0}function Zf(a){a=a|0;var T=0;q[a>>2]=5324;T=q[a+96>>2];if(T){An(T)}T=q[a+84>>2];if(T){An(T)}T=q[a+72>>2];if(T){An(T)}T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|0,qb)}tb=a+8|0;e:{if(q[tb>>2]<=0){break e}vb=q[qb+16>>2];pb=0;sb=a+16|0;Aa=a+32|0;Ab=a+12|0;while(1){nb=pb<<2;ob=q[nb+vb>>2];wb=q[sb>>2];f:{if((ob|0)>(wb|0)){rb=q[Aa>>2];q[nb+rb>>2]=wb;break f}rb=q[Aa>>2];nb=nb+rb|0;wb=q[Ab>>2];if((ob|0)<(wb|0)){q[nb>>2]=wb;break f}q[nb>>2]=ob}pb=pb+1|0;nb=q[tb>>2];if((pb|0)<(nb|0)){continue}break}if((nb|0)<1){break e}nb=0;tb=a+16|0;pb=a+20|0;vb=a+8|0;sb=a+12|0;while(1){ob=nb<<2;Aa=ob+za|0;ob=q[V+ob>>2]+q[ob+rb>>2]|0;q[Aa>>2]=ob;g:{if((ob|0)>q[tb>>2]){ob=ob-q[pb>>2]|0}else{if((ob|0)>=q[sb>>2]){break g}ob=ob+q[pb>>2]|0}q[Aa>>2]=ob}nb=nb+1|0;if((nb|0)>2]){continue}break}}Lb=q[a+52>>2];Ib=q[a+48>>2];Hb=Mm(16);Aa=Hb;q[Aa>>2]=0;q[Aa+4>>2]=0;q[Aa+8>>2]=0;q[Aa+12>>2]=0;q[qb+8>>2]=0;q[qb>>2]=0;q[qb+4>>2]=0;h:{if(mb){if(mb>>>0>=1073741824){break h}Aa=mb<<2;Bb=Mm(Aa);q[qb>>2]=Bb;nb=Aa+Bb|0;q[qb+8>>2]=nb;Dn(Bb,0,Aa);q[qb+4>>2]=nb}rb=1;Aa=q[a+56>>2];Jb=q[Aa>>2];Aa=q[Aa+4>>2]-Jb|0;i:{if((Aa|0)<5){break i}Kb=Aa>>2;Mb=mb<<2;vb=a+8|0;Ab=a+16|0;wb=a+32|0;Eb=a+20|0;Fb=a+12|0;tb=1;while(1){j:{k:{l:{if(Kb>>>0>tb>>>0){m:{n:{rb=q[(tb<<2)+Jb>>2];if((rb|0)==-1){break n}ub=q[Ib+12>>2];Db=rb+((rb>>>0)%3|0?-1:2)|0;Gb=ub+(Db<<2)|0;sb=1;nb=0;Aa=rb;o:{while(1){ob=q[ub+(Aa<<2)>>2];p:{if((ob|0)==-1){break p}pb=-1;zb=q[Lb>>2];xb=q[Ib>>2];Cb=q[zb+(q[xb+(ob<<2)>>2]<<2)>>2];yb=ob+1|0;yb=(yb>>>0)%3|0?yb:ob+ -2|0;if((yb|0)!=-1){yb=q[xb+(yb<<2)>>2]}else{yb=-1}ob=ob+((ob>>>0)%3|0?-1:2)|0;if((ob|0)!=-1){pb=q[xb+(ob<<2)>>2]}if((Cb|0)>=(tb|0)){break p}ob=q[(yb<<2)+zb>>2];if((ob|0)>=(tb|0)){break p}pb=q[zb+(pb<<2)>>2];if((pb|0)>=(tb|0)){break p}xb=q[(qb+16|0)+w(nb,12)>>2];if((mb|0)>=1){zb=w(mb,pb);ob=w(mb,ob);Cb=w(mb,Cb);pb=0;while(1){q[xb+(pb<<2)>>2]=(q[(pb+zb<<2)+za>>2]+q[(ob+pb<<2)+za>>2]|0)-q[(pb+Cb<<2)+za>>2];pb=pb+1|0;if((pb|0)!=(mb|0)){continue}break}}ob=4;nb=nb+1|0;if((nb|0)==4){break o}}q:{if(sb&1){xb=Aa+1|0;Aa=(xb>>>0)%3|0?xb:Aa+ -2|0;ob=-1;if((Aa|0)==-1){break q}Aa=q[ub+(Aa<<2)>>2];ob=-1;if((Aa|0)==-1){break q}ob=Aa+1|0;ob=(ob>>>0)%3|0?ob:Aa+ -2|0;break q}Aa=((Aa>>>0)%3|0?-1:2)+Aa|0;ob=-1;if((Aa|0)==-1){break q}Aa=q[ub+(Aa<<2)>>2];ob=-1;if((Aa|0)==-1){break q}ob=Aa+ -1|0;if((Aa>>>0)%3){break q}ob=Aa+2|0}r:{if((ob|0)==(rb|0)){break r}Aa=ob;ob=(ob|0)!=-1;pb=(ob|sb^-1)&1;Aa=pb?Aa:-1;sb=ob&sb;if(!((Db|0)==-1|pb)){ob=q[Gb>>2];if((ob|0)==-1){break r}sb=0;if((ob>>>0)%3){Aa=ob+ -1|0}else{Aa=ob+2|0}}if((Aa|0)!=-1){continue}}break}ob=nb;if((ob|0)<1){break n}}ub=(mb|0)<1;if(!ub){Dn(Bb,0,Mb)}Aa=ob+ -1|0;sb=(Aa<<2)+Hb|0;Aa=w(Aa,12)+a|0;xb=Aa+60|0;zb=q[Aa- -64>>2];rb=0;Cb=q[qb>>2];Aa=0;nb=0;while(1){pb=q[sb>>2];q[sb>>2]=pb+1;if(zb>>>0<=pb>>>0){break i}s:{if(q[q[xb>>2]+(pb>>>3&536870908)>>2]>>>(pb&31)&1){break s}nb=nb+1|0;if(ub){break s}yb=q[(qb+16|0)+w(Aa,12)>>2];pb=0;while(1){Db=pb<<2;Gb=Db+Cb|0;q[Gb>>2]=q[Gb>>2]+q[yb+Db>>2];pb=pb+1|0;if((pb|0)!=(mb|0)){continue}break}}Aa=Aa+1|0;if((ob|0)!=(Aa|0)){continue}break}ob=w(mb,tb);Aa=ob;if(!nb){break m}pb=0;if((mb|0)>0){break l}break k}Aa=w(mb,tb)}if(q[vb>>2]<1){break j}sb=(w(tb+ -1|0,mb)<<2)+za|0;pb=0;while(1){nb=pb<<2;ob=q[nb+sb>>2];ub=q[Ab>>2];t:{if((ob|0)>(ub|0)){rb=q[wb>>2];q[nb+rb>>2]=ub;break t}rb=q[wb>>2];nb=nb+rb|0;ub=q[Fb>>2];if((ob|0)<(ub|0)){q[nb>>2]=ub;break t}q[nb>>2]=ob}pb=pb+1|0;ob=q[vb>>2];if((pb|0)<(ob|0)){continue}break}nb=0;if((ob|0)<1){break j}Aa=Aa<<2;pb=Aa+za|0;sb=V+Aa|0;while(1){ob=nb<<2;Aa=ob+pb|0;ob=q[ob+sb>>2]+q[ob+rb>>2]|0;q[Aa>>2]=ob;u:{if((ob|0)>q[Ab>>2]){ob=ob-q[Eb>>2]|0}else{if((ob|0)>=q[Fb>>2]){break u}ob=ob+q[Eb>>2]|0}q[Aa>>2]=ob}nb=nb+1|0;if((nb|0)>2]){continue}break}break j}cn();F()}while(1){Aa=(pb<<2)+Bb|0;q[Aa>>2]=q[Aa>>2]/(nb|0);pb=pb+1|0;if((pb|0)!=(mb|0)){continue}break}}if(q[vb>>2]<1){break j}pb=0;while(1){Aa=pb<<2;nb=q[Aa+Bb>>2];sb=q[Ab>>2];v:{if((nb|0)>(sb|0)){rb=q[wb>>2];q[Aa+rb>>2]=sb;break v}rb=q[wb>>2];Aa=Aa+rb|0;sb=q[Fb>>2];if((nb|0)<(sb|0)){q[Aa>>2]=sb;break v}q[Aa>>2]=nb}pb=pb+1|0;Aa=q[vb>>2];if((pb|0)<(Aa|0)){continue}break}nb=0;if((Aa|0)<1){break j}Aa=ob<<2;pb=Aa+za|0;sb=V+Aa|0;while(1){ob=nb<<2;Aa=ob+pb|0;ob=q[ob+sb>>2]+q[ob+rb>>2]|0;q[Aa>>2]=ob;w:{if((ob|0)>q[Ab>>2]){ob=ob-q[Eb>>2]|0}else{if((ob|0)>=q[Fb>>2]){break w}ob=ob+q[Eb>>2]|0}q[Aa>>2]=ob}nb=nb+1|0;if((nb|0)>2]){continue}break}}rb=1;tb=tb+1|0;if((tb|0)<(Kb|0)){continue}break}}a=q[qb>>2];if(a){q[qb+4>>2]=a;An(a)}An(Hb);a=q[qb+52>>2];if(a){q[qb+56>>2]=a;An(a)}a=q[qb+40>>2];if(a){q[qb+44>>2]=a;An(a)}a=q[qb+28>>2];if(a){q[qb+32>>2]=a;An(a)}a=q[qb+16>>2];if(a){q[qb+20>>2]=a;An(a)}T=qb- -64|0;return rb|0}bn();F()}function $f(a){a=a|0;var V=0,za=0;q[a>>2]=5560;V=q[a+76>>2];if(V){An(V)}za=a+68|0;V=q[za>>2];q[za>>2]=0;if(V){An(V)}q[a>>2]=3044;V=q[a+32>>2];if(V){q[a+36>>2]=V;An(V)}return a|0}function ag(a){a=a|0;var Aa=0,Fa=0;q[a>>2]=5560;Aa=q[a+76>>2];if(Aa){An(Aa)}Fa=a+68|0;Aa=q[Fa>>2];q[Fa>>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;Qb=q[Qb+Rb>>2]+q[Qb+Tb>>2]|0;q[Pb>>2]=Qb;e:{if((Qb|0)>q[Wb>>2]){Qb=Qb-q[Yb>>2]|0}else{if((Qb|0)>=q[Zb>>2]){break e}Qb=Qb+q[Yb>>2]|0}q[Pb>>2]=Qb}Nb=Nb+1|0;if((Nb|0)>2]){continue}break}}Sb=Sb+1|0;if((Sb|0)>=(_b|0)){break b}Nb=q[$b>>2];Pb=q[Nb>>2];if(q[Nb+4>>2]-Pb>>2>>>0>Sb>>>0){continue}break}}cn();F()}return 1}function cg(a,mb,nb,Nb){var Ob=0,Pb=0,ac=0,bc=x(0),cc=0,dc=x(0),ec=x(0),fc=x(0),gc=x(0),hc=x(0),ic=x(0),jc=x(0),kc=0,lc=0,mc=x(0),nc=x(0),oc=x(0),pc=x(0),qc=x(0),rc=0,sc=x(0),tc=x(0),uc=x(0);Ob=T-48|0;T=Ob;Pb=-1;cc=-1;a:{if((mb|0)==-1){break a}ac=((mb>>>0)%3|0?-1:2)+mb|0;kc=q[a+48>>2];rc=mb+1|0;mb=(rc>>>0)%3|0?rc:mb+ -2|0;if((mb|0)!=-1){Pb=q[q[kc>>2]+(mb<<2)>>2]}if((ac|0)==-1){break a}cc=q[q[kc>>2]+(ac<<2)>>2]}ac=q[a+52>>2];mb=q[ac>>2];ac=q[ac+4>>2]-mb>>2;if(!(ac>>>0<=Pb>>>0|ac>>>0<=cc>>>0)){b:{c:{Pb=q[mb+(Pb<<2)>>2];kc=(Pb|0)>=(Nb|0);if(kc){break c}ac=q[mb+(cc<<2)>>2];if((ac|0)>=(Nb|0)){break c}mb=q[a+72>>2];cc=(w(mb,ac)<<2)+nb|0;dc=x(q[cc+4>>2]);mb=(w(mb,Pb)<<2)+nb|0;jc=x(q[mb+4>>2]);mc=x(q[cc>>2]);pc=x(q[mb>>2]);if(!(mc!=pc|dc!=jc)){a=q[a+68>>2];mb=a;if(x(y(dc))>2]=nb;if(x(y(mc))>2]=~~mc;break b}q[a>>2]=-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(jc*bc)+pc);bc=x(ec*fc);bc=x(ic+(mb?x(-bc):bc));e:{if(((k(bc),e(0))&2147483647)>>>0>=2139095041){mb=q[a+68>>2];q[mb>>2]=-2147483648;break e}mb=q[a+68>>2];a=mb;lc=C(+bc+.5);f:{if(y(lc)<2147483648){nb=~~lc;break f}nb=-2147483648}q[a>>2]=nb}nb=((k(dc),e(0))&2147483647)>>>0>2139095040;lc=C(+dc+.5);g:{if(y(lc)<2147483648){a=~~lc;break g}a=-2147483648}q[mb+4>>2]=nb?-2147483648:a;break b}h:{if(!kc){mb=q[a+72>>2];Nb=w(Pb,mb);break h}if((Nb|0)<=0){if(q[a+72>>2]<1){break b}nb=q[a+68>>2];mb=0;while(1){q[nb+(mb<<2)>>2]=0;mb=mb+1|0;if((mb|0)>2]){continue}break}break b}mb=q[a+72>>2];Nb=w(mb,Nb+ -1|0)}if((mb|0)<1){break b}Pb=q[a+68>>2];mb=0;while(1){q[Pb+(mb<<2)>>2]=q[(mb+Nb<<2)+nb>>2];mb=mb+1|0;if((mb|0)>2]){continue}break}}T=Ob+48|0;return}cn();F()}function dg(a){a=a|0;var mb=0;q[a>>2]=5776;mb=q[a+76>>2];if(mb){An(mb)}q[a>>2]=3044;mb=q[a+32>>2];if(mb){q[a+36>>2]=mb;An(mb)}return a|0}function eg(a){a=a|0;var nb=0;q[a>>2]=5776;nb=q[a+76>>2];if(nb){An(nb)}q[a>>2]=3044;nb=q[a+32>>2];if(nb){q[a+36>>2]=nb;An(nb)}An(a)}function fg(a,Nb,vc,wc,xc,yc){a=a|0;Nb=Nb|0;vc=vc|0;wc=wc|0;xc=xc|0;yc=yc|0;var zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0;wc=0;a:{if((xc|0)!=2){break a}q[a+8>>2]=2;q[a- -64>>2]=yc;wc=a+32|0;xc=q[wc>>2];yc=q[a+36>>2]-xc|0;zc=yc>>2;b:{if(zc>>>0<=1){Fa(wc,2-zc|0);break b}if((yc|0)==8){break b}q[a+36>>2]=xc+8}wc=1;xc=q[a+56>>2];yc=q[xc+4>>2];xc=q[xc>>2];zc=yc-xc|0;if((zc|0)<1){break a}if((xc|0)!=(yc|0)){Hc=a+60|0;Ic=zc>>2;zc=a+8|0;Dc=a+16|0;Ec=a+32|0;Fc=a+20|0;Gc=a+12|0;Jc=a+56|0;while(1){if(!gg(Hc,q[(Bc<<2)+xc>>2],vc,Bc)){wc=0;break a}c:{if(q[zc>>2]<1){break c}xc=0;while(1){wc=xc<<2;yc=q[(wc+a|0)+68>>2];Ac=q[Dc>>2];d:{if((yc|0)>(Ac|0)){Cc=q[Ec>>2];q[wc+Cc>>2]=Ac;break d}Cc=q[Ec>>2];wc=wc+Cc|0;Ac=q[Gc>>2];if((yc|0)<(Ac|0)){q[wc>>2]=Ac;break d}q[wc>>2]=yc}xc=xc+1|0;wc=q[zc>>2];if((xc|0)<(wc|0)){continue}break}yc=0;if((wc|0)<1){break c}wc=Bc<<3;Ac=wc+vc|0;Kc=Nb+wc|0;while(1){xc=yc<<2;wc=xc+Ac|0;xc=q[xc+Kc>>2]+q[xc+Cc>>2]|0;q[wc>>2]=xc;e:{if((xc|0)>q[Dc>>2]){xc=xc-q[Fc>>2]|0}else{if((xc|0)>=q[Gc>>2]){break e}xc=xc+q[Fc>>2]|0}q[wc>>2]=xc}yc=yc+1|0;if((yc|0)>2]){continue}break}}wc=1;Bc=Bc+1|0;if((Bc|0)>=(Ic|0)){break a}wc=q[Jc>>2];xc=q[wc>>2];if(q[wc+4>>2]-xc>>2>>>0>Bc>>>0){continue}break}}cn();F()}return wc|0}function gg(a,Nb,vc,wc){var xc=0,yc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,_c=0,$c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0;Lc=T-80|0;T=Lc;xc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d=hd+4|0;kd=q[jd>>2];q[ld+24>>2]=0;q[ld+16>>2]=0;q[ld+20>>2]=0;a:{id=kd-id|0;if((id|0)<1){break a}hd=q[hd>>2];if((hd|0)!=q[jd>>2]){vd=id>>2;wd=a+60|0;xd=a+108|0;qd=a+8|0;rd=a+16|0;sd=a+32|0;td=a+20|0;ud=a+12|0;yd=a+56|0;while(1){kg(wd,q[(od<<2)+hd>>2],ld+16|0);id=q[ld+20>>2];kd=id>>31;jd=q[ld+16>>2];md=jd>>31;pd=q[ld+24>>2];nd=pd>>31;hd=0;nd=nd^nd+pd;kd=nd+((kd^id+kd)+(md^jd+md)|0)|0;if(kd>>>0>>0){hd=1}b:{if(!(hd|kd)){q[ld+16>>2]=q[a+104>>2];break b}md=q[a+104>>2];nd=md>>31;id=ao($n(md,nd,id,id>>31),V,kd,hd);q[ld+20>>2]=id;hd=ao($n(md,nd,jd,jd>>31),V,kd,hd);q[ld+16>>2]=hd;jd=hd;hd=hd>>31;hd=(md-(jd+hd^hd)|0)+((id|0)<0?id:0-id|0)|0;if((pd|0)>=0){q[ld+24>>2]=hd;break b}q[ld+24>>2]=0-hd}hd=dh(xd);jd=q[ld+16>>2];c:{if(!hd){id=q[ld+20>>2];break c}q[ld+24>>2]=0-q[ld+24>>2];id=0-q[ld+20>>2]|0;q[ld+20>>2]=id;jd=0-jd|0;q[ld+16>>2]=jd}d:{if((jd|0)>=0){hd=q[a+104>>2];jd=hd+q[ld+24>>2]|0;hd=hd+id|0;break d}e:{if((id|0)<=-1){jd=q[ld+24>>2];hd=jd>>31;hd=hd^hd+jd;break e}jd=q[ld+24>>2];hd=jd>>31;hd=q[a+100>>2]-(hd^hd+jd)|0}if((jd|0)<=-1){jd=id;id=id>>31;jd=jd+id^id;break d}jd=id;id=id>>31;jd=q[a+100>>2]-(jd+id^id)|0}id=q[a+100>>2];f:{if(!(hd|jd)){jd=id;hd=id;break f}if(!((id|0)!=(jd|0)|hd)){hd=jd;break f}if(!((hd|0)!=(id|0)|jd)){jd=hd;break f}g:{if(hd){break g}kd=q[a+104>>2];if((kd|0)>=(jd|0)){break g}jd=(kd<<1)-jd|0;hd=0;break f}h:{if((hd|0)!=(id|0)){break h}kd=q[a+104>>2];if((kd|0)<=(jd|0)){break h}jd=(kd<<1)-jd|0;break f}i:{if((id|0)!=(jd|0)){break i}id=q[a+104>>2];if((id|0)<=(hd|0)){break i}hd=(id<<1)-hd|0;break f}if(jd){break f}jd=0;id=q[a+104>>2];if((id|0)>=(hd|0)){break f}hd=(id<<1)-hd|0}q[ld+12>>2]=jd;q[ld+8>>2]=hd;j:{if(q[qd>>2]<1){break j}jd=0;while(1){kd=q[rd>>2];k:{if((hd|0)>(kd|0)){id=q[sd>>2];q[id+(jd<<2)>>2]=kd;break k}id=q[sd>>2];kd=id+(jd<<2)|0;md=q[ud>>2];if((hd|0)<(md|0)){q[kd>>2]=md;break k}q[kd>>2]=hd}jd=jd+1|0;kd=q[qd>>2];if((jd|0)<(kd|0)){hd=q[(ld+8|0)+(jd<<2)>>2];continue}break}hd=0;if((kd|0)<1){break j}jd=od<<3;md=jd+gd|0;pd=wc+jd|0;while(1){kd=hd<<2;jd=kd+md|0;kd=q[kd+pd>>2]+q[id+kd>>2]|0;q[jd>>2]=kd;l:{if((kd|0)>q[rd>>2]){nd=kd-q[td>>2]|0}else{if((kd|0)>=q[ud>>2]){break l}nd=kd+q[td>>2]|0}q[jd>>2]=nd}hd=hd+1|0;if((hd|0)>2]){continue}break}}od=od+1|0;if((od|0)>=(vd|0)){break a}id=q[yd>>2];hd=q[id>>2];if(q[id+4>>2]-hd>>2>>>0>od>>>0){continue}break}}cn();F()}T=ld+32|0;return 1}function kg(a,wc,gd){a=a|0;wc=wc|0;gd=gd|0;var hd=0,id=0,jd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,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fd-hd|0;Id=Id-(V+(Fd>>>0>>0)|0)|0;hd=$n(Gd,wc,Ud,Md);Fd=hd+id|0;wc=V+Id|0;wc=Fd>>>0>>0?wc+1|0:wc;Id=wc;lg(jd+80|0);Dd=q[Qd>>2];Ad=!Dd;wc=q[jd+88>>2];if((wc|0)!=-1){continue}break}wc=Hd;hd=wc>>31;a=wc>>31;wc=a+wc|0;zd=hd+Cd|0;if(zd>>>0>>0){wc=wc+1|0}hd=hd^zd;Ad=a^wc;wc=Id;a=wc>>31;wc=wc>>31;zd=a;Jd=Id+a|0;id=wc+Fd|0;if(id>>>0>>0){Jd=Jd+1|0}a=wc^id;id=zd^Jd;f:{if((Ed|0)<-1?1:(Ed|0)<=-1?Bd>>>0>4294967295?0:1:0){wc=Bd;zd=a+(hd-wc|0)|0;wc=id+(Ad-((hd>>>0>>0)+Ed|0)|0)|0;hd=zd;a=hd>>>0>>0?wc+1|0:wc;if(!Dd){break f}break b}wc=Ad+Ed|0;zd=hd;hd=Bd;zd=zd+hd|0;if(zd>>>0>>0){wc=wc+1|0}hd=a;zd=hd+zd|0;a=wc+id|0;a=zd>>>0>>0?a+1|0:a;hd=zd;if(Dd){break b}}if((hd|0)<536870913){break a}a=((a&536870911)<<3|hd>>>29)&7;wc=0;Bd=ao(Bd,Ed,a,wc);Cd=ao(Cd,Hd,a,wc);Fd=ao(Fd,Id,a,wc);break a}cn();F()}cn();F()}cn();F()}if((a|0)<0?1:(a|0)<=0?hd>>>0>=536870913?0:1:0){break a}wc=a>>>29;a=(a&536870911)<<3|hd>>>29;Bd=ao(Bd,Ed,a,wc);Cd=ao(Cd,Hd,a,wc);Fd=ao(Fd,Id,a,wc)}q[gd+8>>2]=Bd;q[gd+4>>2]=Cd;q[gd>>2]=Fd;T=jd+96|0}function lg(a){var wc=0,gd=0,Wd=0;wc=q[a+8>>2];Wd=q[a>>2];a:{if(r[a+12|0]){b:{c:{d:{e:{if((wc|0)==-1){break e}gd=wc+1|0;wc=(gd>>>0)%3|0?gd:wc+ -2|0;if((wc|0)==-1){break e}wc=q[q[Wd+12>>2]+(wc<<2)>>2];if((wc|0)!=-1){break d}}q[a+8>>2]=-1;break c}gd=wc+1|0;wc=(gd>>>0)%3|0?gd:wc+ -2|0;q[a+8>>2]=wc;if((wc|0)!=-1){break b}}gd=q[a+4>>2];wc=-1;f:{if((gd|0)==-1){break f}gd=gd+((gd>>>0)%3|0?-1:2)|0;wc=-1;if((gd|0)==-1){break f}gd=q[q[Wd+12>>2]+(gd<<2)>>2];wc=-1;if((gd|0)==-1){break f}wc=gd+ -1|0;if((gd>>>0)%3){break f}wc=gd+2|0}o[a+12|0]=0;q[a+8>>2]=wc;return}if((wc|0)!=q[a+4>>2]){break a}q[a+8>>2]=-1;return}gd=-1;g:{if((wc|0)==-1){break g}wc=wc+((wc>>>0)%3|0?-1:2)|0;gd=-1;if((wc|0)==-1){break g}wc=q[q[Wd+12>>2]+(wc<<2)>>2];gd=-1;if((wc|0)==-1){break g}gd=wc+ -1|0;if((wc>>>0)%3){break g}gd=wc+2|0}q[a+8>>2]=gd}}function mg(a,Xd,Yd,Zd,_d,$d){a=a|0;Xd=Xd|0;Yd=Yd|0;Zd=Zd|0;_d=_d|0;$d=$d|0;var ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0;q[a+8>>2]=_d;be=a+32|0;ae=q[be>>2];$d=q[a+36>>2]-ae>>2;a:{if($d>>>0<_d>>>0){Fa(be,_d-$d|0);break a}if($d>>>0<=_d>>>0){break a}q[a+36>>2]=ae+(_d<<2)}be=0;$d=(_d&1073741823)!=(_d|0)?-1:_d<<2;ke=Dn(Mm($d),0,$d);ee=a+8|0;ae=q[ee>>2];b:{if((ae|0)<1){break b}ge=a+16|0;$d=a+32|0;he=a+12|0;while(1){ae=be<<2;de=q[ae+ke>>2];ce=q[ge>>2];c:{if((de|0)>(ce|0)){fe=q[$d>>2];q[ae+fe>>2]=ce;break c}fe=q[$d>>2];ae=ae+fe|0;ce=q[he>>2];if((de|0)<(ce|0)){q[ae>>2]=ce;break c}q[ae>>2]=de}be=be+1|0;ae=q[ee>>2];if((be|0)<(ae|0)){continue}break}if((ae|0)<1){break b}be=0;ee=a+16|0;de=a+20|0;ge=a+8|0;he=a+12|0;while(1){ae=be<<2;$d=ae+Yd|0;ae=q[Xd+ae>>2]+q[ae+fe>>2]|0;q[$d>>2]=ae;d:{if((ae|0)>q[ee>>2]){ae=ae-q[de>>2]|0}else{if((ae|0)>=q[he>>2]){break d}ae=ae+q[de>>2]|0}q[$d>>2]=ae}be=be+1|0;ae=q[ge>>2];if((be|0)<(ae|0)){continue}break}}if((_d|0)<(Zd|0)){me=0-_d<<2;de=a+16|0;fe=a+32|0;ee=a+8|0;ge=a+20|0;he=a+12|0;$d=_d;while(1){e:{if((ae|0)<1){break e}je=$d<<2;le=je+Yd|0;ne=le+me|0;be=0;while(1){a=be<<2;ae=q[a+ne>>2];ie=q[de>>2];f:{if((ae|0)>(ie|0)){ce=q[fe>>2];q[a+ce>>2]=ie;break f}ce=q[fe>>2];a=a+ce|0;ie=q[he>>2];if((ae|0)<(ie|0)){q[a>>2]=ie;break f}q[a>>2]=ae}be=be+1|0;ae=q[ee>>2];if((be|0)<(ae|0)){continue}break}be=0;if((ae|0)<1){break e}je=Xd+je|0;while(1){ae=be<<2;a=ae+le|0;ae=q[ae+je>>2]+q[ae+ce>>2]|0;q[a>>2]=ae;g:{if((ae|0)>q[de>>2]){ae=ae-q[ge>>2]|0}else{if((ae|0)>=q[he>>2]){break g}ae=ae+q[ge>>2]|0}q[a>>2]=ae}be=be+1|0;ae=q[ee>>2];if((be|0)<(ae|0)){continue}break}}$d=_d+$d|0;if(($d|0)<(Zd|0)){continue}break}}An(ke);return 1}function ng(a,Xd,Yd){a=a|0;Xd=Xd|0;Yd=Yd|0;var Zd=0;a:{if(!Se(a,Xd,Yd)){break a}a=q[a+8>>2];if(r[a+24|0]!=3){break a}Zd=q[a+28>>2]==9}return Zd|0}function og(a,Xd,Yd){a=a|0;Xd=Xd|0;Yd=Yd|0;var _d=0,$d=0,oe=0,pe=0,qe=0;a:{if(r[q[a+4>>2]+36|0]<=1){_d=q[Yd+16>>2];$d=q[Yd+12>>2];oe=q[Yd+20>>2];qe=oe;pe=0;if(($d|0)<(qe|0)?1:($d|0)<=(qe|0)?t[Yd+8>>2]>_d>>>0?0:1:0){break a}$d=r[_d+q[Yd>>2]|0];_d=_d+1|0;if(_d>>>0<1){oe=oe+1|0}q[Yd+16>>2]=_d;q[Yd+20>>2]=oe;q[a+24>>2]=$d}pe=Xe(a,Xd,Yd)}return pe|0}function pg(a,Xd,Yd){a=a|0;Xd=Xd|0;Yd=Yd|0;var re=0,se=0,te=0,ue=0,ve=0;re=T-16|0;T=re;a:{b:{if(r[q[a+4>>2]+36|0]<=1){Xd=q[a+24>>2];break b}ue=q[Yd+16>>2];se=q[Yd+12>>2];te=q[Yd+20>>2];Xd=te;ve=0;if((se|0)<(Xd|0)?1:(se|0)<=(Xd|0)?t[Yd+8>>2]>ue>>>0?0:1:0){break a}Xd=r[ue+q[Yd>>2]|0];se=ue+1|0;if(se>>>0<1){te=te+1|0}q[Yd+16>>2]=se;q[Yd+20>>2]=te;q[a+24>>2]=Xd}q[re+12>>2]=-1;q[re+8>>2]=1116;q[(re+8|0)+4>>2]=Xd;ve=ld(re+8|0,q[a+16>>2])}a=ve;T=re+16|0;return a|0}function qg(a,Xd){a=a|0;Xd=Xd|0;var Yd=0,we=0,xe=0,ye=0,ze=0,Ae=x(0),Be=0,Ce=0;we=T-32|0;T=we;ye=o[q[a+8>>2]+24|0];Yd=q[a+16>>2];if(q[Yd+80>>2]){ze=q[q[Yd>>2]>>2]+q[Yd+48>>2]|0}q[we+8>>2]=-1;q[we+12>>2]=-1;q[we>>2]=-1;q[we+4>>2]=-1;a:{Yd=q[a+24>>2];if(Yd+ -2>>>0>28){break a}q[we>>2]=Yd;Yd=-1<>2]=xe;q[we+4>>2]=Yd^-1;q[we+12>>2]=(xe|0)/2;if(!Xd){xe=1;break a}ye=ye<<2;Yd=0;Ce=a+8|0;a=0;while(1){Ae=x(x(1)/x(xe|0));xe=Yd<<2;rg(x(Ae*x(q[xe+ze>>2])),x(Ae*x(q[(xe|4)+ze>>2])),we+20|0);Cn(q[q[q[Ce>>2]- -64>>2]>>2]+a|0,we+20|0,ye);xe=1;Be=Be+1|0;if((Be|0)==(Xd|0)){break a}Yd=Yd+2|0;a=a+ye|0;xe=q[we+8>>2];continue}}T=we+32|0;return xe|0}function rg(a,Xd,De){var Ee=0,Fe=0,Ge=x(0),He=x(0),Ie=x(0),Je=0,Ke=0;Ge=x(a+Xd);a:{b:{Ie=x(a-Xd);if(Ie<=x(.5)^1|Ie>=x(-.5)^1|Ge>=x(.5)^1){break b}Fe=1;if(!(Ge<=x(1.5))){break b}He=Xd;break a}c:{if(!!(Ge<=x(.5))){He=x(x(.5)-a);a=x(x(.5)-Xd);break c}if(!!(Ge>=x(1.5))){He=x(x(1.5)-a);a=x(x(1.5)-Xd);break c}if(!!(Ie<=x(-.5))){He=x(a+x(.5));a=x(Xd+x(-.5));break c}He=x(a+x(-.5));a=x(Xd+x(.5))}Ie=x(a-He);Ge=x(He+a);Fe=-1}Ee=+He;Xd=x(Ee+Ee+ -1);Ee=+a;a=x(Ee+Ee+ -1);Ke=Fe;Fe=+Ie;Fe=Fe+Fe;Ee=1-Fe;Fe=Fe+1;Fe=Ee>2]=0;Ge=x(0);a=x(0);break d}Ie=x(x(1)/x(E(Ge)));u[De>>2]=Ie*He;Ge=x(Ie*Xd);a=x(Ie*a)}u[De+8>>2]=Ge;u[De+4>>2]=a}function sg(a,Xd,De,Le){a=a|0;Xd=Xd|0;De=De|0;Le=Le|0;var Me=0,Ne=0,Oe=0;Me=T-32|0;T=Me;Le=Le+ -2|0;a:{if(Le>>>0<=1){if(Le-1){Le=q[Xd+4>>2];Xd=q[Xd+12>>2];q[Me+24>>2]=-1;q[Me+28>>2]=-1;q[Me+16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a=a|0;q[a>>2]=6860;return a|0}function wg(a){a=a|0;q[a>>2]=6860;An(a)}function xg(a){a=a|0;var Xd=0;a:{if(!q[a+44>>2]|!q[a+48>>2]|(!q[a+24>>2]|!q[a+28>>2])){break a}if(!q[a+32>>2]|!q[a+36>>2]){break a}Xd=q[a+72>>2]!=-1}return Xd|0}function yg(a,De){a=a|0;De=De|0;var Le=0;if(!(q[De+56>>2]|r[De+24|0]!=3)){q[a+44>>2]=De;Le=1}return Le|0}function zg(a,De){a=a|0;De=De|0;var Pe=0,Qe=0,Ze=0,_e=0,$e=0,af=0,bf=0,cf=0,df=0,ef=0,ff=0;$e=q[De+12>>2];Pe=$e;Qe=q[De+20>>2];Ze=Qe;af=q[De+16>>2];_e=af+4|0;if(_e>>>0<4){Qe=Qe+1|0}bf=q[De+8>>2];a:{if((Pe|0)<(Qe|0)?1:(Pe|0)<=(Qe|0)?bf>>>0>=_e>>>0?0:1:0){break a}cf=q[De>>2];Pe=af+cf|0;df=r[Pe|0]|r[Pe+1|0]<<8|(r[Pe+2|0]<<16|r[Pe+3|0]<<24);q[De+16>>2]=_e;q[De+20>>2]=Qe;ef=s[De+38>>1];if(ef>>>0<=513){Pe=$e;Qe=Ze;Ze=af+8|0;if(Ze>>>0<8){Qe=Qe+1|0}_e=Ze;if((Pe|0)<(Qe|0)?1:(Pe|0)<=(Qe|0)?bf>>>0>=_e>>>0?0:1:0){break a}q[De+16>>2]=_e;q[De+20>>2]=Qe}if(!(df&1)){break a}Pe=z(df)^31;if(Pe+ -1>>>0>28){break a}q[a+8>>2]=Pe+1;Pe=-2<>2]=Ze;q[a+12>>2]=Pe^-1;q[a+20>>2]=(Ze|0)/2;if(ef>>>0<=513){if(($e|0)<(Qe|0)?1:($e|0)<=(Qe|0)?bf>>>0>_e>>>0?0:1:0){break a}Pe=r[_e+cf|0];Ze=_e+1|0;if(Ze>>>0<1){Qe=Qe+1|0}q[De+16>>2]=Ze;q[De+20>>2]=Qe;if(Pe>>>0>1){break a}q[a+68>>2]=Pe-1|0?0:1}ff=bh(a+88|0,De)}return ff|0}function Ag(a,De,gf,hf,jf,kf){a=a|0;De=De|0;gf=gf|0;hf=hf|0;jf=jf|0;kf=kf|0;var lf=0,mf=0,nf=0,of=0,pf=0,qf=0,rf=0,sf=0,tf=0,uf=0,vf=0;lf=T-48|0;T=lf;rf=a+8|0;hf=q[rf>>2];if(hf+ -2>>>0<=28){q[a+72>>2]=hf;hf=-1<>2]=jf;q[a+76>>2]=hf^-1;q[a+84>>2]=(jf|0)/2}q[a+48>>2]=kf;hf=q[a+36>>2];jf=q[hf>>2];kf=hf+4|0;mf=q[kf>>2];q[lf+16>>2]=0;q[lf+8>>2]=0;q[lf+12>>2]=0;a:{jf=mf-jf|0;if((jf|0)<1){break a}hf=q[hf>>2];if((hf|0)!=q[kf>>2]){sf=jf>>2;tf=a+40|0;uf=a+88|0;vf=a+36|0;while(1){Sf(tf,q[(pf<<2)+hf>>2],lf+8|0);jf=q[lf+12>>2];mf=jf>>31;kf=q[lf+8>>2];of=kf>>31;qf=q[lf+16>>2];nf=qf>>31;hf=0;nf=nf^nf+qf;mf=nf+((mf^jf+mf)+(of^kf+of)|0)|0;if(mf>>>0>>0){hf=1}b:{if(!(hf|mf)){q[lf+8>>2]=q[a+84>>2];break b}of=q[a+84>>2];nf=of;nf=nf>>31;jf=ao($n(of,nf,jf,jf>>31),V,mf,hf);q[lf+12>>2]=jf;hf=ao($n(of,nf,kf,kf>>31),V,mf,hf);q[lf+8>>2]=hf;kf=hf;hf=hf>>31;hf=(of-(kf+hf^hf)|0)+((jf|0)<0?jf:0-jf|0)|0;if((qf|0)>=0){q[lf+16>>2]=hf;break b}q[lf+16>>2]=0-hf}hf=dh(uf);kf=q[lf+8>>2];c:{if(!hf){jf=q[lf+12>>2];break c}q[lf+16>>2]=0-q[lf+16>>2];jf=0-q[lf+12>>2]|0;q[lf+12>>2]=jf;kf=0-kf|0;q[lf+8>>2]=kf}d:{if((kf|0)>=0){kf=q[a+84>>2];hf=kf+q[lf+16>>2]|0;kf=jf+kf|0;break d}e:{if((jf|0)<=-1){hf=q[lf+16>>2];kf=hf>>31;kf=kf^hf+kf;break e}hf=q[lf+16>>2];kf=hf>>31;kf=q[a+80>>2]-(kf^hf+kf)|0}if((hf|0)<=-1){hf=jf>>31;hf=hf+jf^hf;break d}hf=jf>>31;hf=q[a+80>>2]-(hf+jf^hf)|0}jf=q[a+80>>2];f:{if(!(hf|kf)){hf=jf;kf=hf;break f}if(!((hf|0)!=(jf|0)|kf)){kf=hf;break f}if(!((jf|0)!=(kf|0)|hf)){hf=kf;break f}g:{if(kf){break g}mf=q[a+84>>2];if((mf|0)>=(hf|0)){break g}hf=(mf<<1)-hf|0;kf=0;break f}h:{if((jf|0)!=(kf|0)){break h}mf=q[a+84>>2];if((mf|0)<=(hf|0)){break h}hf=(mf<<1)-hf|0;break f}i:{if((hf|0)!=(jf|0)){break i}jf=q[a+84>>2];if((jf|0)<=(kf|0)){break i}kf=(jf<<1)-kf|0;break f}if(hf){break f}hf=0;jf=q[a+84>>2];if((jf|0)>=(kf|0)){break f}kf=(jf<<1)-kf|0}jf=pf<<3;mf=jf+De|0;of=q[mf+4>>2];q[lf+40>>2]=q[mf>>2];q[lf+44>>2]=of;q[lf+28>>2]=hf;q[lf+24>>2]=kf;Bg(lf+32|0,rf,lf+24|0,lf+40|0);hf=gf+jf|0;q[hf>>2]=q[lf+32>>2];q[hf+4>>2]=q[lf+36>>2];pf=pf+1|0;if((pf|0)>=(sf|0)){break a}jf=q[vf>>2];hf=q[jf>>2];if(q[jf+4>>2]-hf>>2>>>0>pf>>>0){continue}break}}cn();F()}T=lf+48|0;return 1}function Bg(a,De,gf,hf){var jf=0,kf=0,wf=0,xf=0,yf=0,zf=0,Af=0,Bf=0;xf=De+12|0;Af=q[xf>>2];kf=q[gf+4>>2]-Af|0;jf=q[gf>>2]-Af|0;q[gf>>2]=jf;q[gf+4>>2]=kf;wf=kf>>31;yf=wf+kf^wf;wf=jf>>31;xf=q[xf>>2];Bf=(yf+(wf+jf^wf)|0)<=(xf|0);if(!Bf){a:{b:{if((jf|0)>=0){zf=1;yf=1;if((kf|0)>-1){break a}wf=1;zf=-1;yf=-1;if((jf|0)>=1){break b}break a}wf=-1;zf=-1;yf=-1;if((kf|0)<1){break a}}zf=(kf|0)<1?-1:1;yf=wf}wf=kf<<1;kf=w(xf,zf);wf=wf-kf|0;q[gf+4>>2]=wf;xf=w(xf,yf);jf=(jf<<1)-xf|0;q[gf>>2]=jf;c:{if((w(yf,zf)|0)>=0){wf=0-wf|0;q[gf>>2]=wf;jf=0-jf|0;break c}q[gf>>2]=wf}kf=(jf+kf|0)/2|0;q[gf+4>>2]=kf;jf=(xf+wf|0)/2|0;q[gf>>2]=jf;xf=q[De+12>>2]}jf=q[hf>>2]+jf|0;q[a>>2]=jf;gf=q[hf+4>>2]+kf|0;q[a+4>>2]=gf;d:{if((xf|0)<(jf|0)){jf=jf-q[De+4>>2]|0;break d}if((jf|0)>=(0-xf|0)){break d}jf=q[De+4>>2]+jf|0}q[a>>2]=jf;e:{if((xf|0)<(gf|0)){gf=gf-q[De+4>>2]|0;break e}if((gf|0)>=(0-xf|0)){break e}gf=q[De+4>>2]+gf|0}q[a+4>>2]=gf;if(!Bf){f:{g:{if((jf|0)>=0){De=1;hf=1;if((gf|0)>-1){break f}kf=1;De=-1;hf=-1;if((jf|0)>=1){break g}break f}kf=-1;De=-1;hf=-1;if((gf|0)<1){break f}}De=(gf|0)<1?-1:1;hf=kf}wf=w(De,xf);kf=(gf<<1)-wf|0;q[a+4>>2]=kf;yf=w(hf,xf);gf=(jf<<1)-yf|0;q[a>>2]=gf;h:{if((w(De,hf)|0)>=0){kf=0-kf|0;q[a>>2]=kf;gf=0-gf|0;break h}q[a>>2]=kf}gf=(gf+wf|0)/2|0;q[a+4>>2]=gf;jf=(kf+yf|0)/2|0;q[a>>2]=jf}q[a>>2]=jf+Af;q[a+4>>2]=gf+Af}function Cg(a,De){a=a|0;De=De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>2]=Lf^-1;q[a+20>>2]=(Kf|0)/2;if(s[De+38>>1]<=513){if((Mf|0)<(Jf|0)?1:(Mf|0)<=(Jf|0)?hg>>>0>ig>>>0?0:1:0){break a}Mf=r[eg+ig|0];Kf=gg+9|0;if(Kf>>>0<9){fg=fg+1|0}Jf=De;q[Jf+16>>2]=Kf;q[Jf+20>>2]=fg;if(Mf>>>0>1){break a}q[a+68>>2]=Mf-1|0?0:1}kg=bh(a+88|0,De)}return kg|0}function Kg(a,De,lg,mg,ng,og){a=a|0;De=De|0;lg=lg|0;mg=mg|0;ng=ng|0;og=og|0;var pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0;pg=T-48|0;T=pg;vg=a+8|0;mg=q[vg>>2];if(mg+ -2>>>0<=28){q[a+72>>2]=mg;mg=-1<>2]=ng;q[a+76>>2]=mg^-1;q[a+84>>2]=(ng|0)/2}q[a+48>>2]=og;mg=q[a+36>>2];ng=q[mg>>2];og=mg+4|0;qg=q[og>>2];q[pg+16>>2]=0;q[pg+8>>2]=0;q[pg+12>>2]=0;a:{ng=qg-ng|0;if((ng|0)<1){break a}mg=q[mg>>2];if((mg|0)!=q[og>>2]){wg=ng>>2;xg=a+40|0;yg=a+88|0;zg=a+36|0;while(1){Sf(xg,q[(tg<<2)+mg>>2],pg+8|0);ng=q[pg+12>>2];qg=ng>>31;og=q[pg+8>>2];sg=og>>31;ug=q[pg+16>>2];rg=ug>>31;mg=0;rg=rg^rg+ug;qg=rg+((qg^ng+qg)+(sg^og+sg)|0)|0;if(qg>>>0>>0){mg=1}b:{if(!(mg|qg)){q[pg+8>>2]=q[a+84>>2];break b}sg=q[a+84>>2];rg=sg;rg=rg>>31;ng=ao($n(sg,rg,ng,ng>>31),V,qg,mg);q[pg+12>>2]=ng;mg=ao($n(sg,rg,og,og>>31),V,qg,mg);q[pg+8>>2]=mg;og=mg;mg=mg>>31;mg=(sg-(og+mg^mg)|0)+((ng|0)<0?ng:0-ng|0)|0;if((ug|0)>=0){q[pg+16>>2]=mg;break b}q[pg+16>>2]=0-mg}mg=dh(yg);og=q[pg+8>>2];c:{if(!mg){ng=q[pg+12>>2];break c}q[pg+16>>2]=0-q[pg+16>>2];ng=0-q[pg+12>>2]|0;q[pg+12>>2]=ng;og=0-og|0;q[pg+8>>2]=og}d:{if((og|0)>=0){og=q[a+84>>2];mg=og+q[pg+16>>2]|0;og=ng+og|0;break d}e:{if((ng|0)<=-1){mg=q[pg+16>>2];og=mg>>31;og=og^mg+og;break e}mg=q[pg+16>>2];og=mg>>31;og=q[a+80>>2]-(og^mg+og)|0}if((mg|0)<=-1){mg=ng>>31;mg=mg+ng^mg;break d}mg=ng>>31;mg=q[a+80>>2]-(mg+ng^mg)|0}ng=q[a+80>>2];f:{if(!(mg|og)){mg=ng;og=mg;break f}if(!((mg|0)!=(ng|0)|og)){og=mg;break f}if(!((ng|0)!=(og|0)|mg)){mg=og;break f}g:{if(og){break g}qg=q[a+84>>2];if((qg|0)>=(mg|0)){break g}mg=(qg<<1)-mg|0;og=0;break f}h:{if((ng|0)!=(og|0)){break h}qg=q[a+84>>2];if((qg|0)<=(mg|0)){break h}mg=(qg<<1)-mg|0;break f}i:{if((mg|0)!=(ng|0)){break i}ng=q[a+84>>2];if((ng|0)<=(og|0)){break i}og=(ng<<1)-og|0;break f}if(mg){break f}mg=0;ng=q[a+84>>2];if((ng|0)>=(og|0)){break f}og=(ng<<1)-og|0}ng=tg<<3;qg=ng+De|0;sg=q[qg+4>>2];qg=q[qg>>2];q[pg+36>>2]=mg;q[pg+32>>2]=og;q[pg+24>>2]=qg;q[pg+28>>2]=sg;Lg(pg+40|0,vg,pg+32|0,pg+24|0);mg=lg+ng|0;q[mg>>2]=q[pg+40>>2];q[mg+4>>2]=q[pg+44>>2];tg=tg+1|0;if((tg|0)>=(wg|0)){break a}ng=q[zg>>2];mg=q[ng>>2];if(q[ng+4>>2]-mg>>2>>>0>tg>>>0){continue}break}}cn();F()}T=pg+48|0;return 1}function Lg(a,De,lg,mg){var ng=0,og=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0;Bg=De+12|0;Eg=q[Bg>>2];og=q[lg+4>>2]-Eg|0;ng=q[lg>>2]-Eg|0;q[lg>>2]=ng;q[lg+4>>2]=og;Ag=og>>31;Cg=Ag+og^Ag;Ag=ng>>31;Bg=q[Bg>>2];Fg=(Cg+(Ag+ng^Ag)|0)<=(Bg|0);if(!Fg){a:{b:{if((ng|0)>=0){Ag=1;Dg=1;if((og|0)>-1){break a}Cg=1;Ag=-1;Dg=-1;if((ng|0)>=1){break b}break a}Cg=-1;Ag=-1;Dg=-1;if((og|0)<1){break a}}Ag=(og|0)<1?-1:1;Dg=Cg}Cg=og<<1;og=w(Ag,Bg);Cg=Cg-og|0;q[lg+4>>2]=Cg;Bg=w(Bg,Dg);ng=(ng<<1)-Bg|0;q[lg>>2]=ng;c:{if((w(Ag,Dg)|0)>=0){Cg=0-Cg|0;q[lg>>2]=Cg;ng=0-ng|0;break c}q[lg>>2]=Cg}og=(ng+og|0)/2|0;q[lg+4>>2]=og;ng=(Bg+Cg|0)/2|0;q[lg>>2]=ng}d:{e:{f:{g:{h:{i:{j:{k:{if(!ng){if(og){break j}Bg=1;Dg=0;break k}Bg=1;Ag=(ng|0)<0&(og|0)<1;if((ng|0)>=1){Dg=(og|0)>-1?2:1;if(Ag){break k}break i}Dg=(og|0)>0?3:0;if(!Ag){break i}}Ag=og;Cg=ng;break d}if((og|0)>=1){break f}break h}Ag=Dg+ -1|0;if(Ag>>>0>2){Ag=og;og=ng;Dg=0;break e}switch(Ag-1|0){case 0:break g;case 1:break f;default:break h}}Ag=0-ng|0;Dg=1;break e}Ag=0-og|0;og=0-ng|0;Dg=2;break e}Ag=ng;og=0-og|0;Dg=3}ng=lg;Cg=og;q[ng>>2]=og;q[ng+4>>2]=Ag;Bg=0}og=q[mg>>2]+Cg|0;q[a>>2]=og;ng=q[mg+4>>2]+Ag|0;q[a+4>>2]=ng;Ag=q[De+12>>2];l:{if((Ag|0)<(og|0)){og=og-q[De+4>>2]|0;break l}if((og|0)>=(0-Ag|0)){break l}og=q[De+4>>2]+og|0}q[a>>2]=og;m:{if((Ag|0)<(ng|0)){ng=ng-q[De+4>>2]|0;break m}if((ng|0)>=(0-Ag|0)){break m}ng=q[De+4>>2]+ng|0}q[a+4>>2]=ng;n:{if(Bg){lg=ng;ng=og;break n}De=(4-Dg&3)+ -1|0;o:{if(De>>>0>2){lg=ng;ng=og;break o}p:{switch(De-1|0){default:lg=0-og|0;break o;case 0:lg=0-ng|0;ng=0-og|0;break o;case 1:break p}}ng=0-ng|0;lg=og}q[a>>2]=ng;q[a+4>>2]=lg}if(!Fg){q:{r:{if((ng|0)>=0){De=1;Bg=1;if((lg|0)>-1){break q}og=1;De=-1;Bg=-1;if((ng|0)>=1){break r}break q}og=-1;De=-1;Bg=-1;if((lg|0)<1){break q}}De=(lg|0)<1?-1:1;Bg=og}mg=lg<<1;lg=w(De,Ag);og=mg-lg|0;q[a+4>>2]=og;mg=w(Ag,Bg);ng=(ng<<1)-mg|0;q[a>>2]=ng;s:{if((w(De,Bg)|0)>=0){og=0-og|0;q[a>>2]=og;ng=0-ng|0;break s}q[a>>2]=og}lg=(lg+ng|0)/2|0;q[a+4>>2]=lg;ng=(mg+og|0)/2|0;q[a>>2]=ng}q[a>>2]=ng+Eg;q[a+4>>2]=lg+Eg}function Mg(a,De){a=a|0;De=De|0;var lg=0,mg=0,Gg=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0;lg=q[De+12>>2];Jg=lg;Gg=lg;lg=q[De+20>>2];Hg=lg;Ig=q[De+16>>2];mg=Ig+4|0;if(mg>>>0<4){lg=lg+1|0}Kg=q[De+8>>2];Lg=mg;mg=lg;a:{if((Gg|0)<(lg|0)?1:(Gg|0)<=(lg|0)?Kg>>>0>=Lg>>>0?0:1:0){break a}lg=Ig+q[De>>2]|0;Gg=r[lg|0]|r[lg+1|0]<<8|(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h);T=Qg+32|0;return 1}function Rg(a,De,Ng){a=a|0;De=De|0;Ng=Ng|0;if(Se(a,De,Ng)){a=q[q[q[q[De+4>>2]+8>>2]+(Ng<<2)>>2]+28>>2]==9}else{a=0}return a|0}function Sg(a,De,Ng){a=a|0;De=De|0;Ng=Ng|0;var Og=0;a:{if(r[q[a+4>>2]+36|0]<=1){Og=0;if(!n[q[q[a>>2]+52>>2]](a)){break a}}Og=Xe(a,De,Ng)}return Og|0}function Tg(a,De,Ng){a=a|0;De=De|0;Ng=Ng|0;De=T-32|0;T=De;a:{if(r[q[a+4>>2]+36|0]>=2){Ng=0;if(!n[q[q[a>>2]+52>>2]](a)){break a}}q[De+24>>2]=0;q[De+28>>2]=0;q[De+16>>2]=0;q[De+20>>2]=0;q[De+12>>2]=-1;q[De+8>>2]=1232;gd(De+8|0,q[a+24>>2],q[a+28>>2],o[q[a+8>>2]+24|0],u[a+32>>2]);Ng=ld(De+8|0,q[a+16>>2]);q[De+8>>2]=1232;a=q[De+16>>2];if(!a){break a}q[De+20>>2]=a;An(a)}T=De+32|0;return Ng|0}function Ug(a,De){a=a|0;De=De|0;return n[q[q[a>>2]+56>>2]](a,De)|0}function Vg(a){a=a|0;var De=0,Ng=0,Pg=0,Qg=0,ih=0,jh=0,kh=0,lh=0,mh=0,nh=0;De=o[q[a+8>>2]+24|0];Pg=De<<2;De=Mm((De|0)!=(De&1073741823)?-1:Pg);Ng=q[a+28>>2];q[a+28>>2]=De;if(Ng){An(Ng)}lh=a+4|0;Ng=q[q[lh>>2]+32>>2];De=q[Ng+8>>2];mh=q[Ng+12>>2];jh=De;ih=q[Ng+20>>2];kh=q[Ng+16>>2];De=Pg;Qg=kh+De|0;if(Qg>>>0>>0){ih=ih+1|0}a:{if((mh|0)<(ih|0)?1:(mh|0)<=(ih|0)?jh>>>0>=Qg>>>0?0:1:0){break a}Cn(q[a+28>>2],kh+q[Ng>>2]|0,Pg);Pg=Ng;jh=Ng;Qg=q[Ng+20>>2];Ng=De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q[Jh+16>>2]=a;q[Jh+20>>2]=Th;bi=1}T=_h+16|0;return bi}function ch(a,Jh,ci){var di=0,ei=0,fi=0,gi=0;a:{if(a>>>0>5){break a}fi=q[ci+16>>2];di=q[ci+12>>2];ei=q[ci+20>>2];if((di|0)<(ei|0)?1:(di|0)<=(ei|0)?t[ci+8>>2]>fi>>>0?0:1:0){break a}di=r[fi+q[ci>>2]|0];fi=fi+1|0;if(fi>>>0<1){ei=ei+1|0}q[ci+16>>2]=fi;q[ci+20>>2]=ei;ei=Jh;if(di&128){if(!ch(a+1|0,Jh,ci)){break a}a=q[Jh>>2]<<7;q[Jh>>2]=a;di=a|di&127}q[ei>>2]=di;gi=1}return gi}function dh(a){var Jh=0,ci=0,hi=0,ii=0,ji=0;hi=0-r[a+12|0]|0;ci=q[a+8>>2];a:{if(ci>>>0>4095){break a}Jh=q[a+4>>2];if((Jh|0)<1){break a}Jh=Jh+ -1|0;q[a+4>>2]=Jh;ci=r[Jh+q[a>>2]|0]|ci<<8;q[a+8>>2]=ci}hi=hi&255;Jh=w(hi,ci>>>8);ii=ci&255;ji=ii>>>0>>0;q[a+8>>2]=ji?Jh+ii|0:(ci-hi|0)-Jh|0;return ji}function eh(a,ki,li){var mi=0,ni=0,oi=0,pi=0,qi=0,ri=0;if(!ki){q[li>>2]=0;return}pi=0-r[a+12|0]&255;ni=q[a+8>>2];while(1){qi=mi<<1;a:{if(ni>>>0>4095){break a}mi=q[a+4>>2];if((mi|0)<1){break a}mi=mi+ -1|0;q[a+4>>2]=mi;ni=r[mi+q[a>>2]|0]|ni<<8;q[a+8>>2]=ni}oi=ni&255;mi=oi>>>0>>0;ri=oi;oi=w(ni>>>8,pi);ni=mi?ri+oi|0:(ni-pi|0)-oi|0;q[a+8>>2]=ni;mi=mi|qi;ki=ki+ -1|0;if(ki){continue}break}q[li>>2]=mi}function fh(a,ki){var li=0,si=0,ti=0;ti=T-32|0;T=ti;a:{if(ki>>>0<=1){if(ki-1){li=Mm(44);ki=li;q[ki>>2]=0;q[ki+4>>2]=0;q[ki+40>>2]=0;q[ki+32>>2]=0;q[ki+36>>2]=0;q[ki+24>>2]=0;q[ki+28>>2]=0;q[ki+16>>2]=0;q[ki+20>>2]=0;q[ki+8>>2]=0;q[ki+12>>2]=0;Ij(ki);q[ki>>2]=13760;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=ki;break a}li=Mm(44);ki=li;q[ki>>2]=0;q[ki+4>>2]=0;q[ki+40>>2]=0;q[ki+32>>2]=0;q[ki+36>>2]=0;q[ki+24>>2]=0;q[ki+28>>2]=0;q[ki+16>>2]=0;q[ki+20>>2]=0;q[ki+8>>2]=0;q[ki+12>>2]=0;Ij(ki);q[ki>>2]=13668;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=ki;break a}ki=Mm(32);q[ti>>2]=ki;q[ti+4>>2]=28;q[ti+8>>2]=-2147483616;o[ki+28|0]=0;li=r[10912]|r[10913]<<8|(r[10914]<<16|r[10915]<<24);o[ki+24|0]=li;o[ki+25|0]=li>>>8;o[ki+26|0]=li>>>16;o[ki+27|0]=li>>>24;li=r[10908]|r[10909]<<8|(r[10910]<<16|r[10911]<<24);si=r[10904]|r[10905]<<8|(r[10906]<<16|r[10907]<<24);o[ki+16|0]=si;o[ki+17|0]=si>>>8;o[ki+18|0]=si>>>16;o[ki+19|0]=si>>>24;o[ki+20|0]=li;o[ki+21|0]=li>>>8;o[ki+22|0]=li>>>16;o[ki+23|0]=li>>>24;li=r[10900]|r[10901]<<8|(r[10902]<<16|r[10903]<<24);si=r[10896]|r[10897]<<8|(r[10898]<<16|r[10899]<<24);o[ki+8|0]=si;o[ki+9|0]=si>>>8;o[ki+10|0]=si>>>16;o[ki+11|0]=si>>>24;o[ki+12|0]=li;o[ki+13|0]=li>>>8;o[ki+14|0]=li>>>16;o[ki+15|0]=li>>>24;li=r[10892]|r[10893]<<8|(r[10894]<<16|r[10895]<<24);si=r[10888]|r[10889]<<8|(r[10890]<<16|r[10891]<<24);o[ki|0]=si;o[ki+1|0]=si>>>8;o[ki+2|0]=si>>>16;o[ki+3|0]=si>>>24;o[ki+4|0]=li;o[ki+5|0]=li>>>8;o[ki+6|0]=li>>>16;o[ki+7|0]=li>>>24;q[ti+16>>2]=-1;ki=Rm(ti+16|4,ti);q[a>>2]=q[ti+16>>2];Rm(a+4|0,ki);q[a+16>>2]=0;if(o[ki+11|0]<=-1){An(q[ki>>2])}if(o[ti+11|0]>-1){break a}An(q[ti>>2])}T=ti+32|0}function gh(a,ki){var ui=0,vi=0,wi=0;wi=T-32|0;T=wi;a:{if(ki>>>0<=1){if(ki-1){ki=Mm(48);Rh(ki);q[ki>>2]=13064;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=ki;break a}ki=Mm(52);Rh(ki);q[ki+48>>2]=0;q[ki>>2]=11164;q[a+8>>2]=0;q[a+12>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=ki;break a}ki=Mm(32);q[wi>>2]=ki;q[wi+4>>2]=28;q[wi+8>>2]=-2147483616;o[ki+28|0]=0;ui=r[10912]|r[10913]<<8|(r[10914]<<16|r[10915]<<24);o[ki+24|0]=ui;o[ki+25|0]=ui>>>8;o[ki+26|0]=ui>>>16;o[ki+27|0]=ui>>>24;ui=r[10908]|r[10909]<<8|(r[10910]<<16|r[10911]<<24);vi=r[10904]|r[10905]<<8|(r[10906]<<16|r[10907]<<24);o[ki+16|0]=vi;o[ki+17|0]=vi>>>8;o[ki+18|0]=vi>>>16;o[ki+19|0]=vi>>>24;o[ki+20|0]=ui;o[ki+21|0]=ui>>>8;o[ki+22|0]=ui>>>16;o[ki+23|0]=ui>>>24;ui=r[10900]|r[10901]<<8|(r[10902]<<16|r[10903]<<24);vi=r[10896]|r[10897]<<8|(r[10898]<<16|r[10899]<<24);o[ki+8|0]=vi;o[ki+9|0]=vi>>>8;o[ki+10|0]=vi>>>16;o[ki+11|0]=vi>>>24;o[ki+12|0]=ui;o[ki+13|0]=ui>>>8;o[ki+14|0]=ui>>>16;o[ki+15|0]=ui>>>24;ui=r[10892]|r[10893]<<8|(r[10894]<<16|r[10895]<<24);vi=r[10888]|r[10889]<<8|(r[10890]<<16|r[10891]<<24);o[ki|0]=vi;o[ki+1|0]=vi>>>8;o[ki+2|0]=vi>>>16;o[ki+3|0]=vi>>>24;o[ki+4|0]=ui;o[ki+5|0]=ui>>>8;o[ki+6|0]=ui>>>16;o[ki+7|0]=ui>>>24;q[wi+16>>2]=-1;ki=Rm(wi+16|4,wi);q[a>>2]=q[wi+16>>2];Rm(a+4|0,ki);q[a+16>>2]=0;if(o[ki+11|0]<=-1){An(q[ki>>2])}if(o[wi+11|0]>-1){break a}An(q[wi>>2])}T=wi+32|0}function hh(a,ki){var xi=0,yi=0,zi=0;xi=T-80|0;T=xi;yi=q[ki+36>>2];q[xi+72>>2]=q[ki+32>>2];q[xi+76>>2]=yi;zi=q[ki+28>>2];yi=xi- -64|0;q[yi>>2]=q[ki+24>>2];q[yi+4>>2]=zi;yi=q[ki+20>>2];q[xi+56>>2]=q[ki+16>>2];q[xi+60>>2]=yi;yi=q[ki+12>>2];q[xi+48>>2]=q[ki+8>>2];q[xi+52>>2]=yi;yi=q[ki+4>>2];q[xi+40>>2]=q[ki>>2];q[xi+44>>2]=yi;Jj(xi+8|0,xi+40|0,xi+24|0);ki=q[xi+8>>2];a:{if(ki){q[a>>2]=ki;Rm(a+4|0,xi+8|4);if(o[xi+23|0]>=0){break a}An(q[xi+12>>2]);break a}if(o[xi+23|0]<=-1){An(q[xi+12>>2])}ki=r[xi+31|0];q[a>>2]=0;q[a+4>>2]=0;q[a+16>>2]=ki;q[a+8>>2]=0;q[a+12>>2]=0}T=xi+80|0}function ih(a,ki,Ai,Bi){var Ci=0,Di=0,Ei=0;Ci=T-80|0;T=Ci;Di=q[Ai+36>>2];q[Ci+72>>2]=q[Ai+32>>2];q[Ci+76>>2]=Di;Ei=q[Ai+28>>2];Di=Ci- -64|0;q[Di>>2]=q[Ai+24>>2];q[Di+4>>2]=Ei;Di=q[Ai+20>>2];q[Ci+56>>2]=q[Ai+16>>2];q[Ci+60>>2]=Di;Di=q[Ai+12>>2];q[Ci+48>>2]=q[Ai+8>>2];q[Ci+52>>2]=Di;Di=q[Ai+4>>2];q[Ci+40>>2]=q[Ai>>2];q[Ci+44>>2]=Di;Jj(a,Ci+40|0,Ci+24|0);a:{if(q[a>>2]){break a}Ei=a+4|0;if(o[a+15|0]<=-1){An(q[Ei>>2])}if(r[Ci+31|0]){q[Ci+8>>2]=0;q[Ci>>2]=0;q[Ci+4>>2]=0;ki=Mm(32);q[Ci>>2]=ki;q[Ci+4>>2]=27;q[Ci+8>>2]=-2147483616;o[ki+27|0]=0;Ai=r[10940]|r[10941]<<8|(r[10942]<<16|r[10943]<<24);o[ki+23|0]=Ai;o[ki+24|0]=Ai>>>8;o[ki+25|0]=Ai>>>16;o[ki+26|0]=Ai>>>24;Ai=r[10937]|r[10938]<<8|(r[10939]<<16|r[10940]<<24);Bi=r[10933]|r[10934]<<8|(r[10935]<<16|r[10936]<<24);o[ki+16|0]=Bi;o[ki+17|0]=Bi>>>8;o[ki+18|0]=Bi>>>16;o[ki+19|0]=Bi>>>24;o[ki+20|0]=Ai;o[ki+21|0]=Ai>>>8;o[ki+22|0]=Ai>>>16;o[ki+23|0]=Ai>>>24;Ai=r[10929]|r[10930]<<8|(r[10931]<<16|r[10932]<<24);Bi=r[10925]|r[10926]<<8|(r[10927]<<16|r[10928]<<24);o[ki+8|0]=Bi;o[ki+9|0]=Bi>>>8;o[ki+10|0]=Bi>>>16;o[ki+11|0]=Bi>>>24;o[ki+12|0]=Ai;o[ki+13|0]=Ai>>>8;o[ki+14|0]=Ai>>>16;o[ki+15|0]=Ai>>>24;Ai=r[10921]|r[10922]<<8|(r[10923]<<16|r[10924]<<24);Bi=r[10917]|r[10918]<<8|(r[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4>>2]=20;q[Fi+8>>2]=-2147483616;o[ki+20|0]=0;Ai=r[10961]|r[10962]<<8|(r[10963]<<16|r[10964]<<24);o[ki+16|0]=Ai;o[ki+17|0]=Ai>>>8;o[ki+18|0]=Ai>>>16;o[ki+19|0]=Ai>>>24;Ai=r[10957]|r[10958]<<8|(r[10959]<<16|r[10960]<<24);Bi=r[10953]|r[10954]<<8|(r[10955]<<16|r[10956]<<24);o[ki+8|0]=Bi;o[ki+9|0]=Bi>>>8;o[ki+10|0]=Bi>>>16;o[ki+11|0]=Bi>>>24;o[ki+12|0]=Ai;o[ki+13|0]=Ai>>>8;o[ki+14|0]=Ai>>>16;o[ki+15|0]=Ai>>>24;Ai=r[10949]|r[10950]<<8|(r[10951]<<16|r[10952]<<24);Bi=r[10945]|r[10946]<<8|(r[10947]<<16|r[10948]<<24);o[ki|0]=Bi;o[ki+1|0]=Bi>>>8;o[ki+2|0]=Bi>>>16;o[ki+3|0]=Bi>>>24;o[ki+4|0]=Ai;o[ki+5|0]=Ai>>>8;o[ki+6|0]=Ai>>>16;o[ki+7|0]=Ai>>>24;q[a>>2]=-1;Rm(Gi,Fi);if(o[Fi+11|0]>-1){break a}An(q[Fi>>2]);break a}gh(Fi,r[Fi+32|0]);Hi=q[Fi>>2];b:{if(Hi){q[a>>2]=Hi;Rm(Gi,Fi|4);break b}Hi=q[Fi+16>>2];q[Fi+16>>2]=0;q[Hi+44>>2]=Bi;Mj(a,Hi,ki,Ai,Bi);if(!q[a>>2]){if(o[Gi+11|0]<=-1){An(q[Gi>>2])}q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0}if(!Hi){break b}n[q[q[Hi>>2]+4>>2]](Hi)}a=q[Fi+16>>2];q[Fi+16>>2]=0;if(a){n[q[q[a>>2]+4>>2]](a)}if(o[Fi+15|0]>-1){break a}An(q[Fi+4>>2])}T=Fi+80|0}function kh(a,ki){var Ai=0,Bi=0,Ii=0;Ii=T-16|0;T=Ii;q[Ii+12>>2]=ki;ki=Mm(32);q[Ii>>2]=ki;q[Ii+4>>2]=24;q[Ii+8>>2]=-2147483616;o[ki+24|0]=0;Ai=r[10986]|r[10987]<<8|(r[10988]<<16|r[10989]<<24);Bi=r[10982]|r[10983]<<8|(r[10984]<<16|r[10985]<<24);o[ki+16|0]=Bi;o[ki+17|0]=Bi>>>8;o[ki+18|0]=Bi>>>16;o[ki+19|0]=Bi>>>24;o[ki+20|0]=Ai;o[ki+21|0]=Ai>>>8;o[ki+22|0]=Ai>>>16;o[ki+23|0]=Ai>>>24;Ai=r[10978]|r[10979]<<8|(r[10980]<<16|r[10981]<<24);Bi=r[10974]|r[10975]<<8|(r[10976]<<16|r[10977]<<24);o[ki+8|0]=Bi;o[ki+9|0]=Bi>>>8;o[ki+10|0]=Bi>>>16;o[ki+11|0]=Bi>>>24;o[ki+12|0]=Ai;o[ki+13|0]=Ai>>>8;o[ki+14|0]=Ai>>>16;o[ki+15|0]=Ai>>>24;Ai=r[10970]|r[10971]<<8|(r[10972]<<16|r[10973]<<24);Bi=r[10966]|r[10967]<<8|(r[10968]<<16|r[10969]<<24);o[ki|0]=Bi;o[ki+1|0]=Bi>>>8;o[ki+2|0]=Bi>>>16;o[ki+3|0]=Bi>>>24;o[ki+4|0]=Ai;o[ki+5|0]=Ai>>>8;o[ki+6|0]=Ai>>>16;o[ki+7|0]=Ai>>>24;ek(lh(a,Ii+12|0),Ii);if(o[Ii+11|0]<=-1){An(q[Ii>>2])}T=Ii+16|0}function lh(a,ki){var Ji=0,Ki=0,Li=0,Mi=0,Ni=0,Oi=0,Pi=0,Qi=0;Li=T-32|0;T=Li;Mi=a+16|0;Ki=q[Mi>>2];a:{b:{if(!Ki){break b}Oi=q[ki>>2];Ji=Mi;while(1){Ni=q[Ki+16>>2]<(Oi|0);Ji=Ni?Ji:Ki;Ki=q[(Ni<<2)+Ki>>2];if(Ki){continue}break}if((Ji|0)==(Mi|0)){break b}if((Oi|0)>=q[Ji+16>>2]){break a}}Oi=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+8>>2];q[((Si|0)==q[a>>2]?a:a+4|0)>>2]=ki;q[ki+4>>2]=Si;q[Si+8>>2]=ki;Ri=q[ki+8>>2]}o[ki+12|0]=1;o[Ri+12|0]=0;a=q[Ri+4>>2];ki=q[a>>2];q[Ri+4>>2]=ki;if(ki){q[ki+8>>2]=Ri}q[a+8>>2]=q[Ri+8>>2];ki=q[Ri+8>>2];q[(q[ki>>2]==(Ri|0)?ki:ki+4|0)>>2]=a;q[a>>2]=Ri;q[Ri+8>>2]=a;break a}ki=Ui+12|0;o[Si+12|0]=1;o[Ri+12|0]=(a|0)==(Ri|0);o[ki|0]=1;ki=Ri;if((ki|0)!=(a|0)){continue}break}}}function oh(a,ki,Vi,Wi,Xi){var Yi=0,Zi=0,_i=0,$i=0,aj=0,bj=0,cj=0,dj=0,ej=0,fj=0,gj=0;a:{b:{c:{d:{e:{ej=a+4|0;f:{if((ej|0)==(ki|0)){break f}Yi=ki+16|0;_i=r[ki+27|0];fj=_i<<24>>24;Zi=(fj|0)<0;$i=r[Xi+11|0];aj=$i<<24>>24;bj=(aj|0)<0;cj=Zi?q[ki+20>>2]:_i;$i=bj?q[Xi+4>>2]:$i;dj=cj>>>0<$i>>>0;g:{_i=dj?cj:$i;if(_i){bj=bj?q[Xi>>2]:Xi;Zi=Zi?q[Yi>>2]:Yi;gj=cm(bj,Zi,_i);if(gj){break g}}if($i>>>0>>0){break f}if(!_i){break d}bj=(aj|0)<0?q[Xi>>2]:Xi;Zi=(fj|0)<0?q[Yi>>2]:Yi;break e}if((gj|0)>-1){break e}}_i=q[ki>>2];h:{i:{if(q[a>>2]==(ki|0)){Yi=ki;break i}j:{if(!_i){Wi=ki;while(1){Yi=q[Wi+8>>2];$i=q[Yi>>2]==(Wi|0);Wi=Yi;if($i){continue}break}break j}Wi=_i;while(1){Yi=Wi;Wi=q[Yi+4>>2];if(Wi){continue}break}}Zi=r[Xi+11|0];Wi=Zi<<24>>24<0;aj=r[Yi+27|0];$i=aj<<24>>24<0;k:{Zi=Wi?q[Xi+4>>2]:Zi;aj=$i?q[Yi+20>>2]:aj;bj=Zi>>>0>>0?Zi:aj;if(bj){cj=Yi+16|0;Wi=cm($i?q[cj>>2]:cj,Wi?q[Xi>>2]:Xi,bj);if(Wi){break k}}if(aj>>>0>>0){break i}break h}if((Wi|0)>-1){break h}}if(!_i){q[Vi>>2]=ki;return ki}q[Vi>>2]=Yi;return Yi+4|0}return ph(a,Vi,Xi)}Yi=cm(Zi,bj,_i);if(Yi){break c}}if(dj){break b}break a}if((Yi|0)>-1){break a}}bj=ki+4|0;_i=q[bj>>2];l:{if(_i){Yi=_i;while(1){Wi=Yi;Yi=q[Yi>>2];if(Yi){continue}break}break l}Wi=q[ki+8>>2];if(q[Wi>>2]==(ki|0)){break l}Yi=ki+8|0;while(1){Zi=q[Yi>>2];Yi=Zi+8|0;Wi=q[Zi+8>>2];if((Zi|0)!=q[Wi>>2]){continue}break}}m:{n:{if((Wi|0)==(ej|0)){break n}Zi=r[Wi+27|0];Yi=Zi<<24>>24<0;o:{Zi=Yi?q[Wi+20>>2]:Zi;cj=Zi>>>0<$i>>>0?Zi:$i;if(cj){dj=(aj|0)<0?q[Xi>>2]:Xi;aj=Wi+16|0;Yi=cm(dj,Yi?q[aj>>2]:aj,cj);if(Yi){break o}}if($i>>>0>>0){break n}break m}if((Yi|0)>-1){break m}}if(!_i){q[Vi>>2]=ki;return bj}q[Vi>>2]=Wi;return Wi}return ph(a,Vi,Xi)}q[Vi>>2]=ki;q[Wi>>2]=ki;return Wi}function ph(a,ki,Vi){var Wi=0,Xi=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0;a:{Wi=a+4|0;a=q[Wi>>2];if(a){hj=r[Vi+11|0];ij=hj<<24>>24<0;hj=ij?q[Vi+4>>2]:hj;lj=ij?q[Vi>>2]:Vi;while(1){Vi=a+16|0;Xi=r[a+27|0];ij=Xi<<24>>24<0;jj=ij?q[a+20>>2]:Xi;mj=jj>>>0>>0;b:{c:{d:{e:{f:{g:{h:{Xi=mj?jj:hj;if(Xi){kj=ij?q[Vi>>2]:Vi;nj=cm(lj,kj,Xi);if(nj){break h}}if(hj>>>0>>0){break g}if(!Xi){break e}kj=ij?q[Vi>>2]:Vi;break f}if((nj|0)>-1){break f}}Vi=q[a>>2];if(Vi){break b}q[ki>>2]=a;return a}Vi=cm(kj,lj,Xi);if(Vi){break d}}if(mj){break c}break a}if((Vi|0)>-1){break a}}Wi=a+4|0;Vi=q[a+4>>2];if(!Vi){break a}a=Wi}Wi=a;a=Vi;continue}}q[ki>>2]=Wi;return Wi}q[ki>>2]=a;return Wi}function qh(a,ki,Vi,oj){var pj=0,qj=0,rj=0,sj=0,tj=0;if(!a){return 1}pj=q[Vi+16>>2];sj=q[Vi+12>>2];rj=q[Vi+20>>2];qj=rj;a:{if((sj|0)<(qj|0)?1:(sj|0)<=(qj|0)?t[Vi+8>>2]>pj>>>0?0:1:0){break a}qj=r[pj+q[Vi>>2]|0];pj=pj+1|0;if(pj>>>0<1){rj=rj+1|0}q[Vi+16>>2]=pj;q[Vi+20>>2]=rj;if(qj>>>0>1){break a}if(qj-1){return rh(a,ki,Vi,oj)}tj=sh(a,Vi,oj)}return tj}function rh(a,ki,Vi,oj){var uj=0,vj=0,wj=0,xj=0,yj=0,zj=0,Aj=0,Bj=0,Cj=0,Dj=0,Ej=0,Fj=0,Gj=0,Hj=0,Ij=0,Jj=0;uj=T+ -64|0;T=uj;q[uj+56>>2]=0;q[uj+48>>2]=0;q[uj+52>>2]=0;q[uj+40>>2]=0;q[uj+44>>2]=0;q[uj+32>>2]=0;q[uj+36>>2]=0;q[uj+24>>2]=0;q[uj+28>>2]=0;q[uj+16>>2]=0;q[uj+20>>2]=0;q[uj+8>>2]=0;q[uj+12>>2]=0;a:{if(!th(uj+8|0,Vi)){break a}if(!uh(uj+8|0,Vi)|(q[uj+20>>2]?0:a)){break a}_j(Vi,0,0);if(a){xj=q[uj+56>>2];Fj=q[uj+36>>2];Gj=q[uj+48>>2];Hj=q[uj+24>>2];while(1){b:{if(xj>>>0>16383){break b}vj=q[uj+52>>2];while(1){if((vj|0)<1){break b}vj=vj+ -1|0;q[uj+52>>2]=vj;xj=r[vj+Gj|0]|xj<<8;q[uj+56>>2]=xj;if(xj>>>0<16384){continue}break}}wj=xj&4095;Dj=q[(wj<<2)+Hj>>2];yj=(Dj<<3)+Fj|0;xj=(w(q[yj>>2],xj>>>12)+wj|0)-q[yj+4>>2]|0;q[uj+56>>2]=xj;if((ki|0)>=1){if(!r[Vi+36|0]){wj=0;break a}yj=ki+zj|0;while(1){c:{if((Dj|0)<1){Bj=0;break c}wj=q[Vi+32>>2];Ij=q[Vi+28>>2];Jj=q[Vi+24>>2];vj=0;Bj=0;while(1){Aj=(wj>>>3)+Jj|0;d:{if(Aj>>>0>=Ij>>>0){Cj=0;break d}Cj=r[Aj|0];Aj=wj+1|0;q[Vi+32>>2]=Aj;Cj=Cj>>>(wj&7)&1;wj=Aj}Bj=Cj<>2]=Bj;zj=zj+1|0;if((yj|0)!=(zj|0)){continue}break}zj=yj}Ej=ki+Ej|0;if(Ej>>>0>>0){continue}break}}ak(Vi);wj=1}a=q[uj+36>>2];if(a){q[uj+40>>2]=a;An(a)}a=q[uj+24>>2];if(a){q[uj+28>>2]=a;An(a)}a=q[uj+8>>2];if(a){q[uj+12>>2]=a;An(a)}T=uj- -64|0;return wj}function sh(a,ki,Vi){var oj=0,Kj=0,Lj=0,Mj=0;a:{b:{Kj=q[ki+16>>2];Lj=q[ki+12>>2];oj=q[ki+20>>2];c:{if((Lj|0)<(oj|0)?1:(Lj|0)<=(oj|0)?t[ki+8>>2]>Kj>>>0?0:1:0){break c}Lj=r[Kj+q[ki>>2]|0];Kj=Kj+1|0;if(Kj>>>0<1){oj=oj+1|0}q[ki+16>>2]=Kj;q[ki+20>>2]=oj;oj=Lj+ -1|0;if(oj>>>0>17){break c}d:{e:{switch(oj-1|0){case 7:return wh(a,ki,Vi);case 8:return xh(a,ki,Vi);case 9:return yh(a,ki,Vi);case 10:return zh(a,ki,Vi);case 12:case 13:case 14:case 15:break a;case 16:break d;case 11:break e;default:break b}}return Ah(a,ki,Vi)}Mj=Bh(a,ki,Vi)}return Mj}return vh(a,ki,Vi)}return Bh(a,ki,Vi)}function th(a,ki){var Vi=0,Nj=0,Oj=0,Pj=0,Qj=0,Rj=0,Sj=0,Tj=0,Uj=0,Vj=0,Wj=0,Xj=0,Yj=0;a:{Vi=s[ki+38>>1];if(!Vi){break a}Sj=a+12|0;b:{if(Vi>>>0<=511){Nj=q[ki+12>>2];Vi=q[ki+20>>2];Oj=q[ki+16>>2];Qj=Oj+4|0;if(Qj>>>0<4){Vi=Vi+1|0}if((Nj|0)<(Vi|0)?1:(Nj|0)<=(Vi|0)?t[ki+8>>2]>=Qj>>>0?0:1:0){break a}Vi=Oj+q[ki>>2]|0;Oj=r[Vi|0]|r[Vi+1|0]<<8|(r[Vi+2|0]<<16|r[Vi+3|0]<<24);q[Sj>>2]=Oj;Nj=q[ki+20>>2];Qj=q[ki+16>>2]+4|0;if(Qj>>>0<4){Nj=Nj+1|0}Vi=ki;q[Vi+16>>2]=Qj;q[Vi+20>>2]=Nj;break b}if(!Ch(1,Sj,ki)){break a}Oj=q[Sj>>2]}Nj=q[a>>2];Vi=q[a+4>>2]-Nj>>2;c:{if(Oj>>>0>Vi>>>0){Fa(a,Oj-Vi|0);Oj=q[a+12>>2];break c}if(Oj>>>0>=Vi>>>0){break c}q[a+4>>2]=Nj+(Oj<<2)}if(!Oj){Yj=1;break a}Wj=q[ki+8>>2];Qj=q[ki+12>>2];while(1){Pj=q[ki+16>>2];Vi=q[ki+20>>2];if((Qj|0)<(Vi|0)?1:(Qj|0)<=(Vi|0)?Wj>>>0>Pj>>>0?0:1:0){break a}Xj=q[ki>>2];Tj=r[Xj+Pj|0];Pj=Pj+1|0;if(Pj>>>0<1){Vi=Vi+1|0}q[ki+16>>2]=Pj;q[ki+20>>2]=Vi;Uj=Tj>>>2;d:{e:{f:{Vj=Tj&3;if(Vj>>>0>3){Nj=0;break f}Nj=0;g:{switch(Vj-1|0){case 0:case 1:break f;case 2:break g;default:break e}}Vi=Rj+Uj|0;if(Vi>>>0>=Oj>>>0){return 0}Dn(q[a>>2]+(Rj<<2)|0,0,(Tj&252)+4|0);Rj=Vi;break d}while(1){if((Qj|0)<(Vi|0)?1:(Qj|0)<=(Vi|0)?Wj>>>0>Pj>>>0?0:1:0){return 0}Tj=r[Pj+Xj|0];Pj=Pj+1|0;if(Pj>>>0<1){Vi=Vi+1|0}q[ki+16>>2]=Pj;q[ki+20>>2]=Vi;Uj=Tj<<(Nj<<3|6)|Uj;Nj=Nj+1|0;if((Vj|0)!=(Nj|0)){continue}break}}q[q[a>>2]+(Rj<<2)>>2]=Uj}Rj=Rj+1|0;Oj=q[Sj>>2];if(Rj>>>0>>0){continue}break}Rj=a+16|0;Sj=q[a>>2];ki=q[a+16>>2];Vi=q[a+20>>2]-ki|0;Nj=Vi>>2;h:{if(Nj>>>0<=4095){Fa(Rj,4096-Nj|0);break h}if((Vi|0)==16384){break h}q[a+20>>2]=ki+16384}i:{ki=a+28|0;Vi=q[ki>>2];Nj=q[a+32>>2]-Vi>>3;if(Oj>>>0>Nj>>>0){Dh(ki,Oj-Nj|0);Vi=q[ki>>2];break i}if(Oj>>>0>>0){q[a+32>>2]=(Oj<<3)+Vi}if(Oj){break i}return 0}ki=0;Nj=0;while(1){a=Sj+(ki<<2)|0;Qj=q[a>>2];Pj=(ki<<3)+Vi|0;q[Pj+4>>2]=Nj;q[Pj>>2]=Qj;a=q[a>>2]+Nj|0;if(a>>>0>4096){break a}if(Nj>>>0>>0){Qj=q[Rj>>2];while(1){q[Qj+(Nj<<2)>>2]=ki;Nj=Nj+1|0;if((a|0)!=(Nj|0)){continue}break}}Nj=a;ki=ki+1|0;if((Oj|0)!=(ki|0)){continue}break}return(a|0)==4096}return Yj}function uh(a,ki){var Zj=0,_j=0,$j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0;bk=T-16|0;T=bk;a:{b:{if(s[ki+38>>1]<=511){_j=q[ki+12>>2];ek=_j;Zj=q[ki+20>>2];$j=q[ki+16>>2];ak=$j+8|0;if(ak>>>0<8){Zj=Zj+1|0}ck=q[ki+8>>2];if((_j|0)<(Zj|0)?1:(_j|0)<=(Zj|0)?ck>>>0>=ak>>>0?0:1:0){break a}_j=$j+q[ki>>2]|0;$j=r[_j+4|0]|r[_j+5|0]<<8|(r[_j+6|0]<<16|r[_j+7|0]<<24);_j=r[_j|0]|r[_j+1|0]<<8|(r[_j+2|0]<<16|r[_j+3|0]<<24);q[bk+8>>2]=_j;q[bk+12>>2]=$j;q[ki+16>>2]=ak;q[ki+20>>2]=Zj;break b}if(!Eh(1,bk+8|0,ki)){break a}ak=q[ki+16>>2];Zj=q[ki+20>>2];ck=q[ki+8>>2];ek=q[ki+12>>2];_j=q[bk+8>>2];$j=q[bk+12>>2]}dk=ck-ak|0;ck=ek-(Zj+(ck>>>0>>0)|0)|0;if((ck|0)==($j|0)&_j>>>0>dk>>>0|$j>>>0>ck>>>0){break a}$j=Zj+$j|0;Zj=ak;dk=Zj+_j|0;if(dk>>>0>>0){$j=$j+1|0}q[ki+16>>2]=dk;q[ki+20>>2]=$j;Zj=_j;if((Zj|0)<1){break a}ak=ak+q[ki>>2]|0;q[a+40>>2]=ak;ki=a;c:{d:{e:{f:{g:{_j=Zj+ -1|0;$j=ak+_j|0;switch((r[$j|0]>>>6)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break g}}q[a+44>>2]=_j;a=r[$j|0]&63;break c}if((Zj|0)<2){break a}q[a+44>>2]=Zj+ -2;a=(Zj+ak|0)+ -2|0;a=r[a+1|0]<<8&16128|r[a|0];break c}if((Zj|0)<3){break a}q[a+44>>2]=Zj+ -3;a=(Zj+ak|0)+ -3|0;a=r[a+1|0]<<8|r[a+2|0]<<16&4128768|r[a|0];break c}q[a+44>>2]=Zj+ -4;a=(Zj+ak|0)+ -4|0;a=r[a+2|0]<<16|r[a+3|0]<<24&1056964608|r[a+1|0]<<8|r[a|0]}a=a+16384|0;q[ki+48>>2]=a;fk=a>>>0<4194304}T=bk+16|0;return fk}function vh(a,ki,gk){var hk=0,ik=0,jk=0,kk=0,lk=0,mk=0,nk=0,ok=0;hk=T+ -64|0;T=hk;q[hk+56>>2]=0;q[hk+48>>2]=0;q[hk+52>>2]=0;q[hk+40>>2]=0;q[hk+44>>2]=0;q[hk+32>>2]=0;q[hk+36>>2]=0;q[hk+24>>2]=0;q[hk+28>>2]=0;q[hk+16>>2]=0;q[hk+20>>2]=0;q[hk+8>>2]=0;q[hk+12>>2]=0;a:{if(!th(hk+8|0,ki)|(q[hk+20>>2]?0:a)){break a}ik=uh(hk+8|0,ki);if(!a|!ik){break a}ki=q[hk+56>>2];mk=q[hk+36>>2];nk=q[hk+48>>2];ok=q[hk+24>>2];while(1){b:{if(ki>>>0>16383){break b}ik=q[hk+52>>2];while(1){if((ik|0)<1){break b}ik=ik+ -1|0;q[hk+52>>2]=ik;ki=r[ik+nk|0]|ki<<8;q[hk+56>>2]=ki;if(ki>>>0<16384){continue}break}}ik=ki&4095;kk=q[(ik<<2)+ok>>2];lk=(kk<<3)+mk|0;ki=(w(q[lk>>2],ki>>>12)+ik|0)-q[lk+4>>2]|0;q[hk+56>>2]=ki;q[(jk<<2)+gk>>2]=kk;ik=1;jk=jk+1|0;if((jk|0)!=(a|0)){continue}break}}a=q[hk+36>>2];if(a){q[hk+40>>2]=a;An(a)}a=q[hk+24>>2];if(a){q[hk+28>>2]=a;An(a)}a=q[hk+8>>2];if(a){q[hk+12>>2]=a;An(a)}T=hk- -64|0;return ik}function wh(a,ki,gk){var pk=0,qk=0,rk=0,sk=0,tk=0,uk=0,vk=0,wk=0;pk=T+ -64|0;T=pk;q[pk+56>>2]=0;q[pk+48>>2]=0;q[pk+52>>2]=0;q[pk+40>>2]=0;q[pk+44>>2]=0;q[pk+32>>2]=0;q[pk+36>>2]=0;q[pk+24>>2]=0;q[pk+28>>2]=0;q[pk+16>>2]=0;q[pk+20>>2]=0;q[pk+8>>2]=0;q[pk+12>>2]=0;a:{if(!Fh(pk+8|0,ki)|(q[pk+20>>2]?0:a)){break a}qk=Gh(pk+8|0,ki);if(!a|!qk){break a}ki=q[pk+56>>2];uk=q[pk+36>>2];vk=q[pk+48>>2];wk=q[pk+24>>2];while(1){b:{if(ki>>>0>32767){break b}qk=q[pk+52>>2];while(1){if((qk|0)<1){break b}qk=qk+ -1|0;q[pk+52>>2]=qk;ki=r[qk+vk|0]|ki<<8;q[pk+56>>2]=ki;if(ki>>>0<32768){continue}break}}qk=ki&8191;sk=q[(qk<<2)+wk>>2];tk=(sk<<3)+uk|0;ki=(w(q[tk>>2],ki>>>13)+qk|0)-q[tk+4>>2]|0;q[pk+56>>2]=ki;q[(rk<<2)+gk>>2]=sk;qk=1;rk=rk+1|0;if((rk|0)!=(a|0)){continue}break}}a=q[pk+36>>2];if(a){q[pk+40>>2]=a;An(a)}a=q[pk+24>>2];if(a){q[pk+28>>2]=a;An(a)}a=q[pk+8>>2];if(a){q[pk+12>>2]=a;An(a)}T=pk- -64|0;return qk}function xh(a,ki,gk){var xk=0,yk=0,zk=0,Ak=0,Bk=0,Ck=0,Dk=0,Ek=0;xk=T+ -64|0;T=xk;q[xk+56>>2]=0;q[xk+48>>2]=0;q[xk+52>>2]=0;q[xk+40>>2]=0;q[xk+44>>2]=0;q[xk+32>>2]=0;q[xk+36>>2]=0;q[xk+24>>2]=0;q[xk+28>>2]=0;q[xk+16>>2]=0;q[xk+20>>2]=0;q[xk+8>>2]=0;q[xk+12>>2]=0;a:{if(!Hh(xk+8|0,ki)|(q[xk+20>>2]?0:a)){break a}yk=Ih(xk+8|0,ki);if(!a|!yk){break a}ki=q[xk+56>>2];Ck=q[xk+36>>2];Dk=q[xk+48>>2];Ek=q[xk+24>>2];while(1){b:{if(ki>>>0>131071){break b}yk=q[xk+52>>2];while(1){if((yk|0)<1){break b}yk=yk+ -1|0;q[xk+52>>2]=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k|0)!=(a|0)){continue}break}}a=q[Fk+36>>2];if(a){q[Fk+40>>2]=a;An(a)}a=q[Fk+24>>2];if(a){q[Fk+28>>2]=a;An(a)}a=q[Fk+8>>2];if(a){q[Fk+12>>2]=a;An(a)}T=Fk- -64|0;return Gk}function zh(a,ki,gk){var Nk=0,Ok=0,Pk=0,Qk=0,Rk=0,Sk=0,Tk=0,Uk=0;Nk=T+ -64|0;T=Nk;q[Nk+56>>2]=0;q[Nk+48>>2]=0;q[Nk+52>>2]=0;q[Nk+40>>2]=0;q[Nk+44>>2]=0;q[Nk+32>>2]=0;q[Nk+36>>2]=0;q[Nk+24>>2]=0;q[Nk+28>>2]=0;q[Nk+16>>2]=0;q[Nk+20>>2]=0;q[Nk+8>>2]=0;q[Nk+12>>2]=0;a:{if(!Lh(Nk+8|0,ki)|(q[Nk+20>>2]?0:a)){break a}Ok=Mh(Nk+8|0,ki);if(!a|!Ok){break a}ki=q[Nk+56>>2];Sk=q[Nk+36>>2];Tk=q[Nk+48>>2];Uk=q[Nk+24>>2];while(1){b:{if(ki>>>0>1048575){break b}Ok=q[Nk+52>>2];while(1){if((Ok|0)<1){break b}Ok=Ok+ -1|0;q[Nk+52>>2]=Ok;ki=r[Ok+Tk|0]|ki<<8;q[Nk+56>>2]=ki;if(ki>>>0<1048576){continue}break}}Ok=ki&262143;Qk=q[(Ok<<2)+Uk>>2];Rk=(Qk<<3)+Sk|0;ki=(w(q[Rk>>2],ki>>>18)+Ok|0)-q[Rk+4>>2]|0;q[Nk+56>>2]=ki;q[(Pk<<2)+gk>>2]=Qk;Ok=1;Pk=Pk+1|0;if((Pk|0)!=(a|0)){continue}break}}a=q[Nk+36>>2];if(a){q[Nk+40>>2]=a;An(a)}a=q[Nk+24>>2];if(a){q[Nk+28>>2]=a;An(a)}a=q[Nk+8>>2];if(a){q[Nk+12>>2]=a;An(a)}T=Nk- -64|0;return Ok}function Ah(a,ki,gk){var Vk=0,Wk=0,Xk=0,Yk=0,Zk=0,_k=0,$k=0,al=0;Vk=T+ -64|0;T=Vk;q[Vk+56>>2]=0;q[Vk+48>>2]=0;q[Vk+52>>2]=0;q[Vk+40>>2]=0;q[Vk+44>>2]=0;q[Vk+32>>2]=0;q[Vk+36>>2]=0;q[Vk+24>>2]=0;q[Vk+28>>2]=0;q[Vk+16>>2]=0;q[Vk+20>>2]=0;q[Vk+8>>2]=0;q[Vk+12>>2]=0;a:{if(!Nh(Vk+8|0,ki)|(q[Vk+20>>2]?0:a)){break a}Wk=Oh(Vk+8|0,ki);if(!a|!Wk){break a}ki=q[Vk+56>>2];_k=q[Vk+36>>2];$k=q[Vk+48>>2];al=q[Vk+24>>2];while(1){b:{if(ki>>>0>2097151){break b}Wk=q[Vk+52>>2];while(1){if((Wk|0)<1){break b}Wk=Wk+ -1|0;q[Vk+52>>2]=Wk;ki=r[Wk+$k|0]|ki<<8;q[Vk+56>>2]=ki;if(ki>>>0<2097152){continue}break}}Wk=ki&524287;Yk=q[(Wk<<2)+al>>2];Zk=(Yk<<3)+_k|0;ki=(w(q[Zk>>2],ki>>>19)+Wk|0)-q[Zk+4>>2]|0;q[Vk+56>>2]=ki;q[(Xk<<2)+gk>>2]=Yk;Wk=1;Xk=Xk+1|0;if((Xk|0)!=(a|0)){continue}break}}a=q[Vk+36>>2];if(a){q[Vk+40>>2]=a;An(a)}a=q[Vk+24>>2];if(a){q[Vk+28>>2]=a;An(a)}a=q[Vk+8>>2];if(a){q[Vk+12>>2]=a;An(a)}T=Vk- -64|0;return Wk}function Bh(a,ki,gk){var bl=0,cl=0,dl=0,el=0,fl=0,gl=0,hl=0,il=0;bl=T+ -64|0;T=bl;q[bl+56>>2]=0;q[bl+48>>2]=0;q[bl+52>>2]=0;q[bl+40>>2]=0;q[bl+44>>2]=0;q[bl+32>>2]=0;q[bl+36>>2]=0;q[bl+24>>2]=0;q[bl+28>>2]=0;q[bl+16>>2]=0;q[bl+20>>2]=0;q[bl+8>>2]=0;q[bl+12>>2]=0;a:{if(!Ph(bl+8|0,ki)|(q[bl+20>>2]?0:a)){break a}cl=Qh(bl+8|0,ki);if(!a|!cl){break a}ki=q[bl+56>>2];gl=q[bl+36>>2];hl=q[bl+48>>2];il=q[bl+24>>2];while(1){b:{if(ki>>>0>4194303){break b}cl=q[bl+52>>2];while(1){if((cl|0)<1){break b}cl=cl+ -1|0;q[bl+52>>2]=cl;ki=r[cl+hl|0]|ki<<8;q[bl+56>>2]=ki;if(ki>>>0<4194304){continue}break}}cl=ki&1048575;el=q[(cl<<2)+il>>2];fl=(el<<3)+gl|0;ki=(w(q[fl>>2],ki>>>20)+cl|0)-q[fl+4>>2]|0;q[bl+56>>2]=ki;q[(dl<<2)+gk>>2]=el;cl=1;dl=dl+1|0;if((dl|0)!=(a|0)){continue}break}}a=q[bl+36>>2];if(a){q[bl+40>>2]=a;An(a)}a=q[bl+24>>2];if(a){q[bl+28>>2]=a;An(a)}a=q[bl+8>>2];if(a){q[bl+12>>2]=a;An(a)}T=bl- -64|0;return cl}function Ch(a,ki,gk){var jl=0,kl=0,ll=0,ml=0;a:{if(a>>>0>5){break a}ll=q[gk+16>>2];jl=q[gk+12>>2];kl=q[gk+20>>2];if((jl|0)<(kl|0)?1:(jl|0)<=(kl|0)?t[gk+8>>2]>ll>>>0?0:1:0){break a}jl=r[ll+q[gk>>2]|0];ll=ll+1|0;if(ll>>>0<1){kl=kl+1|0}q[gk+16>>2]=ll;q[gk+20>>2]=kl;kl=ki;if(jl&128){if(!Ch(a+1|0,ki,gk)){break a}a=q[ki>>2]<<7;q[ki>>2]=a;jl=a|jl&127}q[kl>>2]=jl;ml=1}return ml}function Dh(a,ki){var gk=0,nl=0,ol=0,pl=0,ql=0,rl=0,sl=0;a:{b:{ol=q[a+8>>2];gk=a+4|0;nl=q[gk>>2];c:{if(ol-nl>>3>>>0>=ki>>>0){while(1){q[nl>>2]=0;q[nl+4>>2]=0;nl=q[gk>>2]+8|0;q[gk>>2]=nl;ki=ki+ -1|0;if(ki){continue}break c}}pl=q[a>>2];ql=nl-pl|0;gk=ql>>3;nl=gk+ki|0;if(nl>>>0>=536870912){break b}sl=gk<<3;ol=ol-pl|0;gk=ol>>2;ol=ol>>3>>>0<268435455?gk>>>0>>0?nl:gk:536870911;gk=0;d:{if(!ol){break d}if(ol>>>0>=536870912){break a}rl=Mm(ol<<3);gk=rl}nl=sl+gk|0;Dn(nl,0,ki<<3);ol=gk+(ol<<3)|0;while(1){nl=nl+8|0;ki=ki+ -1|0;if(ki){continue}break}if((ql|0)>=1){Cn(rl,pl,ql)}q[a>>2]=gk;q[a+8>>2]=ol;q[a+4>>2]=nl;if(!pl){break c}An(pl)}return}bn();F()}ab(10991);F()}function Eh(a,ki,tl){var ul=0,vl=0,wl=0,xl=0,yl=0,zl=0;a:{if(a>>>0>10){break a}wl=q[tl+16>>2];ul=q[tl+12>>2];vl=q[tl+20>>2];xl=vl;if((ul|0)<(xl|0)?1:(ul|0)<=(xl|0)?t[tl+8>>2]>wl>>>0?0:1:0){break a}yl=o[wl+q[tl>>2]|0];ul=wl+1|0;if(ul>>>0<1){vl=vl+1|0}q[tl+16>>2]=ul;q[tl+20>>2]=vl;xl=ki;wl=ki;ul=yl;b:{if((ul|0)<=-1){if(!Eh(a+1|0,ki,tl)){break a}a=ki;tl=q[ki+4>>2];ki=q[ki>>2];vl=tl<<7|ki>>>25;ki=ki<<7;q[a>>2]=ki;q[a+4>>2]=vl;a=ul&127|ki;break b}vl=0;a=ul&255}q[wl>>2]=a;q[xl+4>>2]=vl;zl=1}return zl}function Fh(a,ki){var tl=0,Al=0,Bl=0,Cl=0,Dl=0,El=0,Fl=0,Gl=0,Hl=0,Il=0,Jl=0,Kl=0,Ll=0;a:{tl=s[ki+38>>1];if(!tl){break a}Fl=a+12|0;b:{if(tl>>>0<=511){Al=q[ki+12>>2];tl=q[ki+20>>2];Bl=q[ki+16>>2];Dl=Bl+4|0;if(Dl>>>0<4){tl=tl+1|0}if((Al|0)<(tl|0)?1:(Al|0)<=(tl|0)?t[ki+8>>2]>=Dl>>>0?0:1:0){break a}tl=Bl+q[ki>>2]|0;Bl=r[tl|0]|r[tl+1|0]<<8|(r[tl+2|0]<<16|r[tl+3|0]<<24);q[Fl>>2]=Bl;Al=q[ki+20>>2];Dl=q[ki+16>>2]+4|0;if(Dl>>>0<4){Al=Al+1|0}tl=ki;q[tl+16>>2]=Dl;q[tl+20>>2]=Al;break b}if(!Ch(1,Fl,ki)){break a}Bl=q[Fl>>2]}Al=q[a>>2];tl=q[a+4>>2]-Al>>2;c:{if(Bl>>>0>tl>>>0){Fa(a,Bl-tl|0);Bl=q[a+12>>2];break c}if(Bl>>>0>=tl>>>0){break c}q[a+4>>2]=Al+(Bl<<2)}if(!Bl){Ll=1;break a}Jl=q[ki+8>>2];Dl=q[ki+12>>2];while(1){Cl=q[ki+16>>2];tl=q[ki+20>>2];if((Dl|0)<(tl|0)?1:(Dl|0)<=(tl|0)?Jl>>>0>Cl>>>0?0:1:0){break a}Kl=q[ki>>2];Gl=r[Kl+Cl|0];Cl=Cl+1|0;if(Cl>>>0<1){tl=tl+1|0}q[ki+16>>2]=Cl;q[ki+20>>2]=tl;Hl=Gl>>>2;d:{e:{f:{Il=Gl&3;if(Il>>>0>3){Al=0;break f}Al=0;g:{switch(Il-1|0){case 0:case 1:break f;case 2:break g;default:break e}}tl=El+Hl|0;if(tl>>>0>=Bl>>>0){return 0}Dn(q[a>>2]+(El<<2)|0,0,(Gl&252)+4|0);El=tl;break d}while(1){if((Dl|0)<(tl|0)?1:(Dl|0)<=(tl|0)?Jl>>>0>Cl>>>0?0:1:0){return 0}Gl=r[Cl+Kl|0];Cl=Cl+1|0;if(Cl>>>0<1){tl=tl+1|0}q[ki+16>>2]=Cl;q[ki+20>>2]=tl;Hl=Gl<<(Al<<3|6)|Hl;Al=Al+1|0;if((Il|0)!=(Al|0)){continue}break}}q[q[a>>2]+(El<<2)>>2]=Hl}El=El+1|0;Bl=q[Fl>>2];if(El>>>0>>0){continue}break}El=a+16|0;Fl=q[a>>2];ki=q[a+16>>2];tl=q[a+20>>2]-ki|0;Al=tl>>2;h:{if(Al>>>0<=8191){Fa(El,8192-Al|0);break h}if((tl|0)==32768){break h}q[a+20>>2]=ki+32768}i:{ki=a+28|0;tl=q[ki>>2];Al=q[a+32>>2]-tl>>3;if(Bl>>>0>Al>>>0){Dh(ki,Bl-Al|0);tl=q[ki>>2];break i}if(Bl>>>0>>0){q[a+32>>2]=(Bl<<3)+tl}if(Bl){break i}return 0}ki=0;Al=0;while(1){a=Fl+(ki<<2)|0;Dl=q[a>>2];Cl=(ki<<3)+tl|0;q[Cl+4>>2]=Al;q[Cl>>2]=Dl;a=q[a>>2]+Al|0;if(a>>>0>8192){break a}if(Al>>>0>>0){Dl=q[El>>2];while(1){q[Dl+(Al<<2)>>2]=ki;Al=Al+1|0;if((a|0)!=(Al|0)){continue}break}}Al=a;ki=ki+1|0;if((Bl|0)!=(ki|0)){continue}break}return(a|0)==8192}return Ll}function Gh(a,ki){var Ml=0,Nl=0,Ol=0,Pl=0,Ql=0,Rl=0,Sl=0,Tl=0,Ul=0;Ql=T-16|0;T=Ql;a:{b:{if(s[ki+38>>1]<=511){Nl=q[ki+12>>2];Tl=Nl;Ml=q[ki+20>>2];Ol=q[ki+16>>2];Pl=Ol+8|0;if(Pl>>>0<8){Ml=Ml+1|0}Rl=q[ki+8>>2];if((Nl|0)<(Ml|0)?1:(Nl|0)<=(Ml|0)?Rl>>>0>=Pl>>>0?0:1:0){break a}Nl=Ol+q[ki>>2]|0;Ol=r[Nl+4|0]|r[Nl+5|0]<<8|(r[Nl+6|0]<<16|r[Nl+7|0]<<24);Nl=r[Nl|0]|r[Nl+1|0]<<8|(r[Nl+2|0]<<16|r[Nl+3|0]<<24);q[Ql+8>>2]=Nl;q[Ql+12>>2]=Ol;q[ki+16>>2]=Pl;q[ki+20>>2]=Ml;break b}if(!Eh(1,Ql+8|0,ki)){break a}Pl=q[ki+16>>2];Ml=q[ki+20>>2];Rl=q[ki+8>>2];Tl=q[ki+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+1|0]<<8|(r[Vl+2|0]<<16|r[Vl+3|0]<<24);q[$l>>2]=Xl;Wl=q[ki+20>>2];Zl=q[ki+16>>2]+4|0;if(Zl>>>0<4){Wl=Wl+1|0}Vl=ki;q[Vl+16>>2]=Zl;q[Vl+20>>2]=Wl;break b}if(!Ch(1,$l,ki)){break a}Xl=q[$l>>2]}Wl=q[a>>2];Vl=q[a+4>>2]-Wl>>2;c:{if(Xl>>>0>Vl>>>0){Fa(a,Xl-Vl|0);Xl=q[a+12>>2];break c}if(Xl>>>0>=Vl>>>0){break c}q[a+4>>2]=Wl+(Xl<<2)}if(!Xl){fm=1;break a}dm=q[ki+8>>2];Zl=q[ki+12>>2];while(1){Yl=q[ki+16>>2];Vl=q[ki+20>>2];if((Zl|0)<(Vl|0)?1:(Zl|0)<=(Vl|0)?dm>>>0>Yl>>>0?0:1:0){break a}em=q[ki>>2];am=r[em+Yl|0];Yl=Yl+1|0;if(Yl>>>0<1){Vl=Vl+1|0}q[ki+16>>2]=Yl;q[ki+20>>2]=Vl;bm=am>>>2;d:{e:{f:{cm=am&3;if(cm>>>0>3){Wl=0;break f}Wl=0;g:{switch(cm-1|0){case 0:case 1:break f;case 2:break g;default:break e}}Vl=_l+bm|0;if(Vl>>>0>=Xl>>>0){return 0}Dn(q[a>>2]+(_l<<2)|0,0,(am&252)+4|0);_l=Vl;break d}while(1){if((Zl|0)<(Vl|0)?1:(Zl|0)<=(Vl|0)?dm>>>0>Yl>>>0?0:1:0){return 0}am=r[Yl+em|0];Yl=Yl+1|0;if(Yl>>>0<1){Vl=Vl+1|0}q[ki+16>>2]=Yl;q[ki+20>>2]=Vl;bm=am<<(Wl<<3|6)|bm;Wl=Wl+1|0;if((cm|0)!=(Wl|0)){continue}break}}q[q[a>>2]+(_l<<2)>>2]=bm}_l=_l+1|0;Xl=q[$l>>2];if(_l>>>0>>0){continue}break}_l=a+16|0;$l=q[a>>2];ki=q[a+16>>2];Vl=q[a+20>>2]-ki|0;Wl=Vl>>2;h:{if(Wl>>>0<=32767){Fa(_l,32768-Wl|0);break h}if((Vl|0)==131072){break h}q[a+20>>2]=ki+131072}i:{ki=a+28|0;Vl=q[ki>>2];Wl=q[a+32>>2]-Vl>>3;if(Xl>>>0>Wl>>>0){Dh(ki,Xl-Wl|0);Vl=q[ki>>2];break i}if(Xl>>>0>>0){q[a+32>>2]=(Xl<<3)+Vl}if(Xl){break i}return 0}ki=0;Wl=0;while(1){a=$l+(ki<<2)|0;Zl=q[a>>2];Yl=(ki<<3)+Vl|0;q[Yl+4>>2]=Wl;q[Yl>>2]=Zl;a=q[a>>2]+Wl|0;if(a>>>0>32768){break a}if(Wl>>>0>>0){Zl=q[_l>>2];while(1){q[Zl+(Wl<<2)>>2]=ki;Wl=Wl+1|0;if((a|0)!=(Wl|0)){continue}break}}Wl=a;ki=ki+1|0;if((Xl|0)!=(ki|0)){continue}break}return(a|0)==32768}return fm}function Ih(a,ki){var gm=0,hm=0,im=0,jm=0,km=0,lm=0,mm=0,nm=0,om=0;km=T-16|0;T=km;a:{b:{if(s[ki+38>>1]<=511){hm=q[ki+12>>2];nm=hm;gm=q[ki+20>>2];im=q[ki+16>>2];jm=im+8|0;if(jm>>>0<8){gm=gm+1|0}lm=q[ki+8>>2];if((hm|0)<(gm|0)?1:(hm|0)<=(gm|0)?lm>>>0>=jm>>>0?0:1:0){break a}hm=im+q[ki>>2]|0;im=r[hm+4|0]|r[hm+5|0]<<8|(r[hm+6|0]<<16|r[hm+7|0]<<24);hm=r[hm|0]|r[hm+1|0]<<8|(r[hm+2|0]<<16|r[hm+3|0]<<24);q[km+8>>2]=hm;q[km+12>>2]=im;q[ki+16>>2]=jm;q[ki+20>>2]=gm;break b}if(!Eh(1,km+8|0,ki)){break a}jm=q[ki+16>>2];gm=q[ki+20>>2];lm=q[ki+8>>2];nm=q[ki+12>>2];hm=q[km+8>>2];im=q[km+12>>2]}mm=lm-jm|0;lm=nm-(gm+(lm>>>0>>0)|0)|0;if((lm|0)==(im|0)&hm>>>0>mm>>>0|im>>>0>lm>>>0){break a}im=gm+im|0;gm=jm;mm=gm+hm|0;if(mm>>>0>>0){im=im+1|0}q[ki+16>>2]=mm;q[ki+20>>2]=im;gm=hm;if((gm|0)<1){break a}jm=jm+q[ki>>2]|0;q[a+40>>2]=jm;ki=a;c:{d:{e:{f:{g:{hm=gm+ -1|0;im=jm+hm|0;switch((r[im|0]>>>6)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break g}}q[a+44>>2]=hm;a=r[im|0]&63;break c}if((gm|0)<2){break a}q[a+44>>2]=gm+ -2;a=(gm+jm|0)+ -2|0;a=r[a+1|0]<<8&16128|r[a|0];break c}if((gm|0)<3){break a}q[a+44>>2]=gm+ -3;a=(gm+jm|0)+ -3|0;a=r[a+1|0]<<8|r[a+2|0]<<16&4128768|r[a|0];break c}q[a+44>>2]=gm+ -4;a=(gm+jm|0)+ -4|0;a=r[a+2|0]<<16|r[a+3|0]<<24&1056964608|r[a+1|0]<<8|r[a|0]}a=a+131072|0;q[ki+48>>2]=a;om=a>>>0<33554432}T=km+16|0;return om}function Jh(a,ki){var pm=0,qm=0,rm=0,sm=0,tm=0,um=0,vm=0,wm=0,xm=0,ym=0,zm=0,Am=0,Bm=0;a:{pm=s[ki+38>>1];if(!pm){break a}vm=a+12|0;b:{if(pm>>>0<=511){qm=q[ki+12>>2];pm=q[ki+20>>2];rm=q[ki+16>>2];tm=rm+4|0;if(tm>>>0<4){pm=pm+1|0}if((qm|0)<(pm|0)?1:(qm|0)<=(pm|0)?t[ki+8>>2]>=tm>>>0?0:1:0){break a}pm=rm+q[ki>>2]|0;rm=r[pm|0]|r[pm+1|0]<<8|(r[pm+2|0]<<16|r[pm+3|0]<<24);q[vm>>2]=rm;qm=q[ki+20>>2];tm=q[ki+16>>2]+4|0;if(tm>>>0<4){qm=qm+1|0}pm=ki;q[pm+16>>2]=tm;q[pm+20>>2]=qm;break b}if(!Ch(1,vm,ki)){break a}rm=q[vm>>2]}qm=q[a>>2];pm=q[a+4>>2]-qm>>2;c:{if(rm>>>0>pm>>>0){Fa(a,rm-pm|0);rm=q[a+12>>2];break c}if(rm>>>0>=pm>>>0){break c}q[a+4>>2]=qm+(rm<<2)}if(!rm){Bm=1;break a}zm=q[ki+8>>2];tm=q[ki+12>>2];while(1){sm=q[ki+16>>2];pm=q[ki+20>>2];if((tm|0)<(pm|0)?1:(tm|0)<=(pm|0)?zm>>>0>sm>>>0?0:1:0){break a}Am=q[ki>>2];wm=r[Am+sm|0];sm=sm+1|0;if(sm>>>0<1){pm=pm+1|0}q[ki+16>>2]=sm;q[ki+20>>2]=pm;xm=wm>>>2;d:{e:{f:{ym=wm&3;if(ym>>>0>3){qm=0;break f}qm=0;g:{switch(ym-1|0){case 0:case 1:break f;case 2:break g;default:break e}}pm=um+xm|0;if(pm>>>0>=rm>>>0){return 0}Dn(q[a>>2]+(um<<2)|0,0,(wm&252)+4|0);um=pm;break d}while(1){if((tm|0)<(pm|0)?1:(tm|0)<=(pm|0)?zm>>>0>sm>>>0?0:1:0){return 0}wm=r[sm+Am|0];sm=sm+1|0;if(sm>>>0<1){pm=pm+1|0}q[ki+16>>2]=sm;q[ki+20>>2]=pm;xm=wm<<(qm<<3|6)|xm;qm=qm+1|0;if((ym|0)!=(qm|0)){continue}break}}q[q[a>>2]+(um<<2)>>2]=xm}um=um+1|0;rm=q[vm>>2];if(um>>>0>>0){continue}break}um=a+16|0;vm=q[a>>2];ki=q[a+16>>2];pm=q[a+20>>2]-ki|0;qm=pm>>2;h:{if(qm>>>0<=65535){Fa(um,65536-qm|0);break h}if((pm|0)==262144){break h}q[a+20>>2]=ki+262144}i:{ki=a+28|0;pm=q[ki>>2];qm=q[a+32>>2]-pm>>3;if(rm>>>0>qm>>>0){Dh(ki,rm-qm|0);pm=q[ki>>2];break i}if(rm>>>0>>0){q[a+32>>2]=(rm<<3)+pm}if(rm){break i}return 0}ki=0;qm=0;while(1){a=vm+(ki<<2)|0;tm=q[a>>2];sm=(ki<<3)+pm|0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|0;switch((r[Em|0]>>>6)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break g}}q[a+44>>2]=Dm;a=r[Em|0]&63;break c}if((Cm|0)<2){break a}q[a+44>>2]=Cm+ -2;a=(Cm+Fm|0)+ -2|0;a=r[a+1|0]<<8&16128|r[a|0];break c}if((Cm|0)<3){break a}q[a+44>>2]=Cm+ -3;a=(Cm+Fm|0)+ -3|0;a=r[a+1|0]<<8|r[a+2|0]<<16&4128768|r[a|0];break c}q[a+44>>2]=Cm+ -4;a=(Cm+Fm|0)+ -4|0;a=r[a+2|0]<<16|r[a+3|0]<<24&1056964608|r[a+1|0]<<8|r[a|0]}a=a+262144|0;q[ki+48>>2]=a;Km=a>>>0<67108864}T=Gm+16|0;return Km}function Lh(a,ki){var Lm=0,Mm=0,Nm=0,Om=0,Pm=0,Qm=0,Rm=0,Sm=0,Tm=0,Um=0,Vm=0,Wm=0,Xm=0;a:{Lm=s[ki+38>>1];if(!Lm){break a}Rm=a+12|0;b:{if(Lm>>>0<=511){Mm=q[ki+12>>2];Lm=q[ki+20>>2];Nm=q[ki+16>>2];Pm=Nm+4|0;if(Pm>>>0<4){Lm=Lm+1|0}if((Mm|0)<(Lm|0)?1:(Mm|0)<=(Lm|0)?t[ki+8>>2]>=Pm>>>0?0:1:0){break a}Lm=Nm+q[ki>>2]|0;Nm=r[Lm|0]|r[Lm+1|0]<<8|(r[Lm+2|0]<<16|r[Lm+3|0]<<24);q[Rm>>2]=Nm;Mm=q[ki+20>>2];Pm=q[ki+16>>2]+4|0;if(Pm>>>0<4){Mm=Mm+1|0}Lm=ki;q[Lm+16>>2]=Pm;q[Lm+20>>2]=Mm;break b}if(!Ch(1,Rm,ki)){break a}Nm=q[Rm>>2]}Mm=q[a>>2];Lm=q[a+4>>2]-Mm>>2;c:{if(Nm>>>0>Lm>>>0){Fa(a,Nm-Lm|0);Nm=q[a+12>>2];break c}if(Nm>>>0>=Lm>>>0){break c}q[a+4>>2]=Mm+(Nm<<2)}if(!Nm){Xm=1;break a}Vm=q[ki+8>>2];Pm=q[ki+12>>2];while(1){Om=q[ki+16>>2];Lm=q[ki+20>>2];if((Pm|0)<(Lm|0)?1:(Pm|0)<=(Lm|0)?Vm>>>0>Om>>>0?0:1:0){break a}Wm=q[ki>>2];Sm=r[Wm+Om|0];Om=Om+1|0;if(Om>>>0<1){Lm=Lm+1|0}q[ki+16>>2]=Om;q[ki+20>>2]=Lm;Tm=Sm>>>2;d:{e:{f:{Um=Sm&3;if(Um>>>0>3){Mm=0;break f}Mm=0;g:{switch(Um-1|0){case 0:case 1:break f;case 2:break g;default:break e}}Lm=Qm+Tm|0;if(Lm>>>0>=Nm>>>0){return 0}Dn(q[a>>2]+(Qm<<2)|0,0,(Sm&252)+4|0);Qm=Lm;break d}while(1){if((Pm|0)<(Lm|0)?1:(Pm|0)<=(Lm|0)?Vm>>>0>Om>>>0?0:1:0){return 0}Sm=r[Om+Wm|0];Om=Om+1|0;if(Om>>>0<1){Lm=Lm+1|0}q[ki+16>>2]=Om;q[ki+20>>2]=Lm;Tm=Sm<<(Mm<<3|6)|Tm;Mm=Mm+1|0;if((Um|0)!=(Mm|0)){continue}break}}q[q[a>>2]+(Qm<<2)>>2]=Tm}Qm=Qm+1|0;Nm=q[Rm>>2];if(Qm>>>0>>0){continue}break}Qm=a+16|0;Rm=q[a>>2];ki=q[a+16>>2];Lm=q[a+20>>2]-ki|0;Mm=Lm>>2;h:{if(Mm>>>0<=262143){Fa(Qm,262144-Mm|0);break h}if((Lm|0)==1048576){break h}q[a+20>>2]=ki- -1048576}i:{ki=a+28|0;Lm=q[ki>>2];Mm=q[a+32>>2]-Lm>>3;if(Nm>>>0>Mm>>>0){Dh(ki,Nm-Mm|0);Lm=q[ki>>2];break i}if(Nm>>>0>>0){q[a+32>>2]=(Nm<<3)+Lm}if(Nm){break i}return 0}ki=0;Mm=0;while(1){a=Rm+(ki<<2)|0;Pm=q[a>>2];Om=(ki<<3)+Lm|0;q[Om+4>>2]=Mm;q[Om>>2]=Pm;a=q[a>>2]+Mm|0;if(a>>>0>262144){break a}if(Mm>>>0>>0){Pm=q[Qm>>2];while(1){q[Pm+(Mm<<2)>>2]=ki;Mm=Mm+1|0;if((a|0)!=(Mm|0)){continue}break}}Mm=a;ki=ki+1|0;if((Nm|0)!=(ki|0)){continue}break}return(a|0)==262144}return Xm}function Mh(a,ki){var Ym=0,Zm=0,_m=0,$m=0,an=0,bn=0,cn=0,dn=0,en=0;an=T-16|0;T=an;a:{b:{if(s[ki+38>>1]<=511){Zm=q[ki+12>>2];dn=Zm;Ym=q[ki+20>>2];_m=q[ki+16>>2];$m=_m+8|0;if($m>>>0<8){Ym=Ym+1|0}bn=q[ki+8>>2];if((Zm|0)<(Ym|0)?1:(Zm|0)<=(Ym|0)?bn>>>0>=$m>>>0?0:1:0){break a}Zm=_m+q[ki>>2]|0;_m=r[Zm+4|0]|r[Zm+5|0]<<8|(r[Zm+6|0]<<16|r[Zm+7|0]<<24);Zm=r[Zm|0]|r[Zm+1|0]<<8|(r[Zm+2|0]<<16|r[Zm+3|0]<<24);q[an+8>>2]=Zm;q[an+12>>2]=_m;q[ki+16>>2]=$m;q[ki+20>>2]=Ym;break b}if(!Eh(1,an+8|0,ki)){break a}$m=q[ki+16>>2];Ym=q[ki+20>>2];bn=q[ki+8>>2];dn=q[ki+12>>2];Zm=q[an+8>>2];_m=q[an+12>>2]}cn=bn-$m|0;bn=dn-(Ym+(bn>>>0<$m>>>0)|0)|0;if((bn|0)==(_m|0)&Zm>>>0>cn>>>0|_m>>>0>bn>>>0){break a}_m=Ym+_m|0;Ym=$m;cn=Ym+Zm|0;if(cn>>>0>>0){_m=_m+1|0}q[ki+16>>2]=cn;q[ki+20>>2]=_m;Ym=Zm;if((Ym|0)<1){break a}$m=$m+q[ki>>2]|0;q[a+40>>2]=$m;ki=a;c:{d:{e:{f:{g:{Zm=Ym+ -1|0;_m=$m+Zm|0;switch((r[_m|0]>>>6)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break g}}q[a+44>>2]=Zm;a=r[_m|0]&63;break c}if((Ym|0)<2){break a}q[a+44>>2]=Ym+ -2;a=(Ym+$m|0)+ -2|0;a=r[a+1|0]<<8&16128|r[a|0];break c}if((Ym|0)<3){break a}q[a+44>>2]=Ym+ -3;a=(Ym+$m|0)+ -3|0;a=r[a+1|0]<<8|r[a+2|0]<<16&4128768|r[a|0];break c}q[a+44>>2]=Ym+ -4;a=(Ym+$m|0)+ -4|0;a=r[a+2|0]<<16|r[a+3|0]<<24&1056964608|r[a+1|0]<<8|r[a|0]}a=a- -1048576|0;q[ki+48>>2]=a;en=a>>>0<268435456}T=an+16|0;return en}function Nh(a,ki){var fn=0,gn=0,hn=0,jn=0,kn=0,ln=0,mn=0,nn=0,on=0,pn=0,qn=0,rn=0,sn=0;a:{fn=s[ki+38>>1];if(!fn){break a}mn=a+12|0;b:{if(fn>>>0<=511){gn=q[ki+12>>2];fn=q[ki+20>>2];hn=q[ki+16>>2];kn=hn+4|0;if(kn>>>0<4){fn=fn+1|0}if((gn|0)<(fn|0)?1:(gn|0)<=(fn|0)?t[ki+8>>2]>=kn>>>0?0:1:0){break a}fn=hn+q[ki>>2]|0;hn=r[fn|0]|r[fn+1|0]<<8|(r[fn+2|0]<<16|r[fn+3|0]<<24);q[mn>>2]=hn;gn=q[ki+20>>2];kn=q[ki+16>>2]+4|0;if(kn>>>0<4){gn=gn+1|0}fn=ki;q[fn+16>>2]=kn;q[fn+20>>2]=gn;break b}if(!Ch(1,mn,ki)){break a}hn=q[mn>>2]}gn=q[a>>2];fn=q[a+4>>2]-gn>>2;c:{if(hn>>>0>fn>>>0){Fa(a,hn-fn|0);hn=q[a+12>>2];break c}if(hn>>>0>=fn>>>0){break c}q[a+4>>2]=gn+(hn<<2)}if(!hn){sn=1;break a}qn=q[ki+8>>2];kn=q[ki+12>>2];while(1){jn=q[ki+16>>2];fn=q[ki+20>>2];if((kn|0)<(fn|0)?1:(kn|0)<=(fn|0)?qn>>>0>jn>>>0?0:1:0){break a}rn=q[ki>>2];nn=r[rn+jn|0];jn=jn+1|0;if(jn>>>0<1){fn=fn+1|0}q[ki+16>>2]=jn;q[ki+20>>2]=fn;on=nn>>>2;d:{e:{f:{pn=nn&3;if(pn>>>0>3){gn=0;break f}gn=0;g:{switch(pn-1|0){case 0:case 1:break f;case 2:break g;default:break e}}fn=ln+on|0;if(fn>>>0>=hn>>>0){return 0}Dn(q[a>>2]+(ln<<2)|0,0,(nn&252)+4|0);ln=fn;break d}while(1){if((kn|0)<(fn|0)?1:(kn|0)<=(fn|0)?qn>>>0>jn>>>0?0:1:0){return 0}nn=r[jn+rn|0];jn=jn+1|0;if(jn>>>0<1){fn=fn+1|0}q[ki+16>>2]=jn;q[ki+20>>2]=fn;on=nn<<(gn<<3|6)|on;gn=gn+1|0;if((pn|0)!=(gn|0)){continue}break}}q[q[a>>2]+(ln<<2)>>2]=on}ln=ln+1|0;hn=q[mn>>2];if(ln>>>0>>0){continue}break}ln=a+16|0;mn=q[a>>2];ki=q[a+16>>2];fn=q[a+20>>2]-ki|0;gn=fn>>2;h:{if(gn>>>0<=524287){Fa(ln,524288-gn|0);break h}if((fn|0)==2097152){break h}q[a+20>>2]=ki+2097152}i:{ki=a+28|0;fn=q[ki>>2];gn=q[a+32>>2]-fn>>3;if(hn>>>0>gn>>>0){Dh(ki,hn-gn|0);fn=q[ki>>2];break i}if(hn>>>0>>0){q[a+32>>2]=(hn<<3)+fn}if(hn){break i}return 0}ki=0;gn=0;while(1){a=mn+(ki<<2)|0;kn=q[a>>2];jn=(ki<<3)+fn|0;q[jn+4>>2]=gn;q[jn>>2]=kn;a=q[a>>2]+gn|0;if(a>>>0>524288){break a}if(gn>>>0>>0){kn=q[ln>>2];while(1){q[kn+(gn<<2)>>2]=ki;gn=gn+1|0;if((a|0)!=(gn|0)){continue}break}}gn=a;ki=ki+1|0;if((hn|0)!=(ki|0)){continue}break}return(a|0)==524288}return sn}function Oh(a,ki){var tn=0,un=0,vn=0,wn=0,xn=0,yn=0,zn=0,An=0,Bn=0;xn=T-16|0;T=xn;a:{b:{if(s[ki+38>>1]<=511){un=q[ki+12>>2];An=un;tn=q[ki+20>>2];vn=q[ki+16>>2];wn=vn+8|0;if(wn>>>0<8){tn=tn+1|0}yn=q[ki+8>>2];if((un|0)<(tn|0)?1:(un|0)<=(tn|0)?yn>>>0>=wn>>>0?0:1:0){break a}un=vn+q[ki>>2]|0;vn=r[un+4|0]|r[un+5|0]<<8|(r[un+6|0]<<16|r[un+7|0]<<24);un=r[un|0]|r[un+1|0]<<8|(r[un+2|0]<<16|r[un+3|0]<<24);q[xn+8>>2]=un;q[xn+12>>2]=vn;q[ki+16>>2]=wn;q[ki+20>>2]=tn;break b}if(!Eh(1,xn+8|0,ki)){break a}wn=q[ki+16>>2];tn=q[ki+20>>2];yn=q[ki+8>>2];An=q[ki+12>>2];un=q[xn+8>>2];vn=q[xn+12>>2]}zn=yn-wn|0;yn=An-(tn+(yn>>>0>>0)|0)|0;if((yn|0)==(vn|0)&un>>>0>zn>>>0|vn>>>0>yn>>>0){break a}vn=tn+vn|0;tn=wn;zn=tn+un|0;if(zn>>>0>>0){vn=vn+1|0}q[ki+16>>2]=zn;q[ki+20>>2]=vn;tn=un;if((tn|0)<1){break a}wn=wn+q[ki>>2]|0;q[a+40>>2]=wn;ki=a;c:{d:{e:{f:{g:{un=tn+ -1|0;vn=wn+un|0;switch((r[vn|0]>>>6)-1|0){case 2:break d;case 1:break e;case 0:break f;default:break g}}q[a+44>>2]=un;a=r[vn|0]&63;break c}if((tn|0)<2){break a}q[a+44>>2]=tn+ -2;a=(tn+wn|0)+ -2|0;a=r[a+1|0]<<8&16128|r[a|0];break c}if((tn|0)<3){break a}q[a+44>>2]=tn+ -3;a=(tn+wn|0)+ -3|0;a=r[a+1|0]<<8|r[a+2|0]<<16&4128768|r[a|0];break c}q[a+44>>2]=tn+ -4;a=(tn+wn|0)+ -4|0;a=r[a+2|0]<<16|r[a+3|0]<<24&1056964608|r[a+1|0]<<8|r[a|0]}a=a+2097152|0;q[ki+48>>2]=a;Bn=a>>>0<536870912}T=xn+16|0;return Bn}function Ph(a,ki){var Cn=0,En=0,Fn=0,Gn=0,Hn=0,In=0,Jn=0,Kn=0,Ln=0,Mn=0,Nn=0,On=0,Pn=0;a:{Cn=s[ki+38>>1];if(!Cn){break a}Jn=a+12|0;b:{if(Cn>>>0<=511){En=q[ki+12>>2];Cn=q[ki+20>>2];Fn=q[ki+16>>2];Hn=Fn+4|0;if(Hn>>>0<4){Cn=Cn+1|0}if((En|0)<(Cn|0)?1:(En|0)<=(Cn|0)?t[ki+8>>2]>=Hn>>>0?0:1:0){break a}Cn=Fn+q[ki>>2]|0;Fn=r[Cn|0]|r[Cn+1|0]<<8|(r[Cn+2|0]<<16|r[Cn+3|0]<<24);q[Jn>>2]=Fn;En=q[ki+20>>2];Hn=q[ki+16>>2]+4|0;if(Hn>>>0<4){En=En+1|0}Cn=ki;q[Cn+16>>2]=Hn;q[Cn+20>>2]=En;break b}if(!Ch(1,Jn,ki)){break a}Fn=q[Jn>>2]}En=q[a>>2];Cn=q[a+4>>2]-En>>2;c:{if(Fn>>>0>Cn>>>0){Fa(a,Fn-Cn|0);Fn=q[a+12>>2];break c}if(Fn>>>0>=Cn>>>0){break c}q[a+4>>2]=En+(Fn<<2)}if(!Fn){Pn=1;break a}Nn=q[ki+8>>2];Hn=q[ki+12>>2];while(1){Gn=q[ki+16>>2];Cn=q[ki+20>>2];if((Hn|0)<(Cn|0)?1:(Hn|0)<=(Cn|0)?Nn>>>0>Gn>>>0?0:1:0){break a}On=q[ki>>2];Kn=r[On+Gn|0];Gn=Gn+1|0;if(Gn>>>0<1){Cn=Cn+1|0}q[ki+16>>2]=Gn;q[ki+20>>2]=Cn;Ln=Kn>>>2;d:{e:{f:{Mn=Kn&3;if(Mn>>>0>3){En=0;break f}En=0;g:{switch(Mn-1|0){case 0:case 1:break f;case 2:break g;default:break e}}Cn=In+Ln|0;if(Cn>>>0>=Fn>>>0){return 0}Dn(q[a>>2]+(In<<2)|0,0,(Kn&252)+4|0);In=Cn;break d}while(1){if((Hn|0)<(Cn|0)?1:(Hn|0)<=(Cn|0)?Nn>>>0>Gn>>>0?0:1:0){return 0}Kn=r[Gn+On|0];Gn=Gn+1|0;if(Gn>>>0<1){Cn=Cn+1|0}q[ki+16>>2]=Gn;q[ki+20>>2]=Cn;Ln=Kn<<(En<<3|6)|Ln;En=En+1|0;if((Mn|0)!=(En|0)){continue}break}}q[q[a>>2]+(In<<2)>>2]=Ln}In=In+1|0;Fn=q[Jn>>2];if(In>>>0>>0){continue}break}In=a+16|0;Jn=q[a>>2];ki=q[a+16>>2];Cn=q[a+20>>2]-ki|0;En=Cn>>2;h:{if(En>>>0<=1048575){Fa(In,1048576-En|0);break h}if((Cn|0)==4194304){break h}q[a+20>>2]=ki+4194304}i:{ki=a+28|0;Cn=q[ki>>2];En=q[a+32>>2]-Cn>>3;if(Fn>>>0>En>>>0){Dh(ki,Fn-En|0);Cn=q[ki>>2];break i}if(Fn>>>0>>0){q[a+32>>2]=(Fn<<3)+Cn}if(Fn){break i}return 0}ki=0;En=0;while(1){a=Jn+(ki<<2)|0;Hn=q[a>>2];Gn=(ki<<3)+Cn|0;q[Gn+4>>2]=En;q[Gn>>2]=Hn;a=q[a>>2]+En|0;if(a>>>0>1048576){break a}if(En>>>0>>0){Hn=q[In>>2];while(1){q[Hn+(En<<2)>>2]=ki;En=En+1|0;if((a|0)!=(En|0)){continue}break}}En=a;ki=ki+1|0;if((Fn|0)!=(ki|0)){continue}break}return(a|0)==1048576}return Pn}function Qh(a,ki){var Dn=0,Qn=0,Rn=0,Sn=0,Tn=0,Un=0,Vn=0,Wn=0,Xn=0;Tn=T-16|0;T=Tn;a:{b:{if(s[ki+38>>1]<=511){Qn=q[ki+12>>2];Wn=Qn;Dn=q[ki+20>>2];Rn=q[ki+16>>2];Sn=Rn+8|0;if(Sn>>>0<8){Dn=Dn+1|0}Un=q[ki+8>>2];if((Qn|0)<(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|0;return Xn}function Rh(a){Ij(a);q[a+44>>2]=0;q[a>>2]=11068}function Sh(a){a=a|0;if(q[a+44>>2]){return n[q[q[a>>2]+48>>2]](a)|0}return 0}function Th(a){a=a|0;var ki=0,Yn=0,Zn=0,_n=0,$n=0;q[a>>2]=13300;ki=q[a+20>>2];if(ki){q[a+24>>2]=ki;An(ki)}Zn=q[a+8>>2];if(Zn){ki=Zn;$n=a+12|0;Yn=q[$n>>2];_n=ki;a:{if((ki|0)==(Yn|0)){break a}while(1){Yn=Yn+ -4|0;ki=q[Yn>>2];q[Yn>>2]=0;if(ki){n[q[q[ki>>2]+4>>2]](ki)}if((Yn|0)!=(Zn|0)){continue}break}_n=q[a+8>>2]}ki=_n;q[$n>>2]=Zn;An(ki)}return a|0}function Uh(a,ao){a=a|0;ao=ao|0;a=q[a+48>>2];return n[q[q[a>>2]+20>>2]](a,ao)|0}function Vh(a){a=a|0;var ao=0,bo=0,co=0,eo=0;ao=q[a+32>>2];co=q[ao+16>>2];eo=q[ao+12>>2];bo=q[ao+20>>2];if((eo|0)>(bo|0)?1:(eo|0)>=(bo|0)?t[ao+8>>2]<=co>>>0?0:1:0){eo=r[co+q[ao>>2]|0];co=co+1|0;if(co>>>0<1){bo=bo+1|0}q[ao+16>>2]=co;q[ao+20>>2]=bo;ao=q[a+48>>2];q[a+48>>2]=0;if(ao){n[q[q[ao>>2]+4>>2]](ao)}a:{b:{if(eo>>>0>2){break b}c:{switch(eo-1|0){default:bo=Mm(384);bi(bo);ao=q[a+48>>2];q[a+48>>2]=bo;if(!ao){break a}n[q[q[ao>>2]+4>>2]](ao);break b;case 0:bo=Mm(424);Ei(bo);ao=q[a+48>>2];q[a+48>>2]=bo;if(!ao){break a}n[q[q[ao>>2]+4>>2]](ao);break b;case 1:break c}}bo=Mm(440);Ji(bo);ao=q[a+48>>2];q[a+48>>2]=bo;if(!ao){break a}n[q[q[ao>>2]+4>>2]](ao)}bo=q[a+48>>2];if(bo){break a}return 0}a=n[q[q[bo>>2]+8>>2]](bo,a)|0}else{a=0}return a|0}function Wh(a){a=a|0;a=q[a+48>>2];return n[q[q[a>>2]+24>>2]](a)|0}function Xh(a){a=a|0;a=q[a+48>>2];return n[q[q[a>>2]+28>>2]](a)|0}function Yh(a){a=a|0;var fo=0,go=0,ho=0,io=0,jo=0;q[a>>2]=11164;fo=a+48|0;go=q[fo>>2];q[fo>>2]=0;if(go){n[q[q[go>>2]+4>>2]](go)}q[a>>2]=13300;fo=q[a+20>>2];if(fo){q[a+24>>2]=fo;An(fo)}go=q[a+8>>2];if(go){fo=go;jo=a+12|0;ho=q[jo>>2];io=fo;a:{if((fo|0)==(ho|0)){break a}while(1){ho=ho+ -4|0;fo=q[ho>>2];q[ho>>2]=0;if(fo){n[q[q[fo>>2]+4>>2]](fo)}if((go|0)!=(ho|0)){continue}break}io=q[a+8>>2]}fo=io;q[jo>>2]=go;An(fo)}return a|0}function Zh(a){a=a|0;var ko=0,lo=0,mo=0,no=0,oo=0;q[a>>2]=11164;ko=a+48|0;lo=q[ko>>2];q[ko>>2]=0;if(lo){n[q[q[lo>>2]+4>>2]](lo)}q[a>>2]=13300;ko=q[a+20>>2];if(ko){q[a+24>>2]=ko;An(ko)}lo=q[a+8>>2];if(lo){ko=lo;oo=a+12|0;mo=q[oo>>2];no=ko;a:{if((ko|0)==(mo|0)){break a}while(1){mo=mo+ -4|0;ko=q[mo>>2];q[mo>>2]=0;if(ko){n[q[q[ko>>2]+4>>2]](ko)}if((lo|0)!=(mo|0)){continue}break}no=q[a+8>>2]}ko=no;q[oo>>2]=lo;An(ko)}An(a)}function _h(a){a=a|0;a=q[a+48>>2];return n[q[q[a>>2]+36>>2]](a)|0}function $h(a,po){a=a|0;po=po|0;a=q[a+48>>2];return n[q[q[a>>2]+12>>2]](a,po)|0}function ai(a,po){a=a|0;po=po|0;a=q[a+48>>2];return n[q[q[a>>2]+16>>2]](a,po)|0}function bi(a){q[a>>2]=11272;Dn(a+4|0,0,80);q[a+96>>2]=0;q[a+100>>2]=0;q[a+92>>2]=-1;q[a+84>>2]=-1;q[a+88>>2]=-1;q[a+104>>2]=0;q[a+108>>2]=0;q[a+112>>2]=0;q[a+116>>2]=0;q[a+120>>2]=0;q[a+124>>2]=0;q[a+128>>2]=0;q[a+132>>2]=0;q[a+136>>2]=0;q[a+140>>2]=0;q[a+144>>2]=0;q[a+148>>2]=0;q[a+156>>2]=0;q[a+160>>2]=0;q[a+152>>2]=1065353216;q[a+164>>2]=0;q[a+168>>2]=0;q[a+172>>2]=0;q[a+176>>2]=0;q[a+180>>2]=0;q[a+184>>2]=0;q[a+188>>2]=0;q[a+192>>2]=0;q[a+196>>2]=0;q[a+200>>2]=0;q[a+204>>2]=0;q[a+208>>2]=0;q[a+212>>2]=-1;q[a+216>>2]=0;q[a+220>>2]=0;q[a+224>>2]=0;ci(a+232|0)}function ci(a){Yj(a);Yj(a+40|0);ah(a+80|0);Yj(a+96|0);q[a+144>>2]=0;q[a+136>>2]=0;q[a+140>>2]=0}function di(a,po){a=a|0;po=po|0;q[a+4>>2]=po;return 1}function ei(a,po){a=a|0;po=po|0;var qo=0,ro=0,so=0,to=0,uo=0;qo=q[a+216>>2];to=a+220|0;if((qo|0)!=q[to>>2]){while(1){a:{qo=q[w(so,144)+qo>>2];if((qo|0)<0){break a}uo=q[a+4>>2];ro=q[uo+8>>2];if((qo|0)>=q[uo+12>>2]-ro>>2){break a}qo=q[ro+(qo<<2)>>2];if((n[q[q[qo>>2]+24>>2]](qo)|0)<1){break a}ro=0;while(1){if((n[q[q[qo>>2]+20>>2]](qo,ro)|0)!=(po|0)){ro=ro+1|0;if((ro|0)<(n[q[q[qo>>2]+24>>2]](qo)|0)){continue}break a}break}a=q[a+216>>2]+w(so,144)|0;return(r[a+100|0]?a+4|0:0)|0}so=so+1|0;qo=q[a+216>>2];if(so>>>0<(q[to>>2]-qo|0)/144>>>0){continue}break}}return 0}function fi(a,po){a=a|0;po=po|0;var vo=0,wo=0,xo=0,yo=0,zo=0;vo=q[a+216>>2];yo=a+220|0;if((vo|0)!=q[yo>>2]){while(1){a:{vo=q[w(xo,144)+vo>>2];if((vo|0)<0){break a}zo=q[a+4>>2];wo=q[zo+8>>2];if((vo|0)>=q[zo+12>>2]-wo>>2){break a}vo=q[wo+(vo<<2)>>2];if((n[q[q[vo>>2]+24>>2]](vo)|0)<1){break a}wo=0;while(1){if((n[q[q[vo>>2]+20>>2]](vo,wo)|0)!=(po|0)){wo=wo+1|0;if((wo|0)<(n[q[q[vo>>2]+24>>2]](vo)|0)){continue}break a}break}return(q[a+216>>2]+w(xo,144)|0)+104|0}xo=xo+1|0;vo=q[a+216>>2];if(xo>>>0<(q[yo>>2]-vo|0)/144>>>0){continue}break}}return a+184|0}function gi(a,po){a=a|0;po=po|0;var Ao=0,Bo=0,Co=0,Do=0,Eo=0,Fo=0,Go=0,Ho=0,Io=0,Jo=0,Ko=0,Lo=0,Mo=0,No=0,Oo=0;Do=T-80|0;T=Do;a:{b:{Mo=q[a+4>>2];Ao=q[Mo+32>>2];Io=q[Ao+8>>2];Ho=q[Ao+16>>2];Ko=q[Ao+12>>2];Bo=Ko;Fo=q[Ao+20>>2];Eo=Fo;c:{if((Bo|0)<(Eo|0)?1:(Bo|0)<=(Eo|0)?Io>>>0>Ho>>>0?0:1:0){break c}No=q[Ao>>2];Jo=r[No+Ho|0];Bo=Fo;Go=Ho+1|0;if(Go>>>0<1){Bo=Bo+1|0}Eo=Ao;q[Ao+16>>2]=Go;q[Ao+20>>2]=Bo;if((Ko|0)<(Bo|0)?1:(Ko|0)<=(Bo|0)?Io>>>0>Go>>>0?0:1:0){break c}Oo=r[Go+No|0];Bo=Fo;Go=Ho+2|0;if(Go>>>0<2){Bo=Bo+1|0}q[Ao+16>>2]=Go;q[Eo+20>>2]=Bo;Lo=Jo<<24>>24;d:{if((Lo|0)>=0){Eo=q[a+216>>2];if((q[a+220>>2]-Eo|0)/144>>>0<=Jo>>>0){break c}Eo=Eo+w(Jo,144)|0;if(q[Eo>>2]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[Do+56>>2]}else{Bo=0}q[Fo+48>>2]=Bo;vd(Mo,q[Do+64>>2],q[Do+68>>2]);q[Do+16>>2]=11760;Fo=q[Do+64>>2];if(Fo){q[Do+68>>2]=Fo;An(Fo)}q[Do+16>>2]=12012;Fo=q[Do+52>>2];if(Fo){An(Fo)}Fo=q[Do+40>>2];if(!Fo){break e}An(Fo);break e}ii(Do+16|0,a,Ao)}Ao=q[Do+16>>2];if(!Ao){break c}}Fo=Mm(64);q[Do+8>>2]=Ao;Ge(Fo,Do+8|0);Ao=q[Do+8>>2];q[Do+8>>2]=0;if(Ao){n[q[q[Ao>>2]+4>>2]](Ao)}if((po|0)>=0){a=q[a+4>>2];Co=a+8|0;Ao=q[a+12>>2];Jo=q[a+8>>2];Bo=Ao-Jo>>2;j:{if((Bo|0)>(po|0)){break j}Eo=po+1|0;if(Bo>>>0<=po>>>0){ji(Co,Eo-Bo|0);break j}if(Eo>>>0>=Bo>>>0){break j}Eo=Jo+(Eo<<2)|0;if((Eo|0)!=(Ao|0)){while(1){Ao=Ao+ -4|0;Bo=q[Ao>>2];q[Ao>>2]=0;if(Bo){n[q[q[Bo>>2]+4>>2]](Bo)}if((Ao|0)!=(Eo|0)){continue}break}}q[a+12>>2]=Eo}po=q[Co>>2]+(po<<2)|0;a=q[po>>2];q[po>>2]=Fo;Co=1;if(!a){break c}n[q[q[a>>2]+4>>2]](a);break c}n[q[q[Fo>>2]+4>>2]](Fo);Co=0}T=Do+80|0;return Co|0}bn();F()}bn();F()}function hi(a,po,Po){var Qo=0,Ro=0,So=0,To=0,Uo=0,Vo=0,Wo=0,Xo=0,Yo=0,Zo=0,_o=0,$o=0;Qo=T+ -64|0;T=Qo;So=q[q[po+4>>2]+44>>2];Ro=Mm(80);q[Ro>>2]=12592;q[Ro+76>>2]=0;q[Ro+72>>2]=Po;q[Ro+68>>2]=So;To=Ro+12|0;q[To>>2]=0;q[To+4>>2]=0;q[Ro+4>>2]=0;Xo=Ro+20|0;Uo=Xo;q[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[Ro+36>>2]=0;q[Ro+32>>2]=po}En(po,q[Qo+24>>2],(To<<2)+4|0);po=q[Qo+28>>2]}else{po=0}q[Po+36>>2]=po;Xo=Ro;po=q[Wo>>2];if(po){d:{if(po>>>0<=q[Ro+52>>2]<<5>>>0){Po=po+ -1>>>5;po=q[Uo>>2];break d}Po=q[Uo>>2];if(Po){An(Po);q[Ro+52>>2]=0;q[Ro+44>>2]=0;q[Ro+48>>2]=0;po=q[Qo+40>>2]}if((po|0)<=-1){break a}Po=po+ -1>>>5;To=Po+1|0;po=Mm(To<<2);q[Ro+52>>2]=To;q[Ro+48>>2]=0;q[Ro+44>>2]=po}En(po,q[Qo+36>>2],(Po<<2)+4|0);po=q[Qo+40>>2]}else{po=0}q[Xo+48>>2]=po;vd(_o,q[Qo+48>>2],q[Qo+52>>2]);q[a>>2]=Ro;q[Qo>>2]=12756;a=q[Qo+48>>2];if(a){q[Qo+52>>2]=a;An(a)}q[Qo>>2]=12572;a=q[Qo+36>>2];if(a){An(a)}a=q[Qo+24>>2];if(a){An(a)}T=Qo- -64|0;return}bn();F()}bn();F()}function ii(a,po,Po){var ap=0,bp=0,cp=0,dp=0,ep=0,fp=0,gp=0;ap=T-112|0;T=ap;gp=q[q[po+4>>2]+44>>2];bp=Mm(120);q[bp>>2]=12124;q[bp+116>>2]=0;q[bp+112>>2]=Po;q[bp+108>>2]=gp;q[bp+12>>2]=0;q[bp+16>>2]=0;q[bp+4>>2]=0;q[bp+20>>2]=0;q[bp+24>>2]=0;q[bp+28>>2]=0;q[bp+32>>2]=0;q[bp+36>>2]=0;q[bp+40>>2]=0;q[bp+44>>2]=0;q[bp+48>>2]=0;q[bp+52>>2]=0;q[bp+56>>2]=0;q[bp+60>>2]=0;q[bp+8>>2]=12336;ep=bp- -64|0;q[ep>>2]=0;q[ep+4>>2]=0;q[bp+72>>2]=0;q[bp+76>>2]=0;q[bp+80>>2]=0;q[bp+84>>2]=0;q[bp+88>>2]=0;q[bp+104>>2]=0;q[bp+96>>2]=0;q[bp+100>>2]=0;po=q[po+8>>2];q[ap+48>>2]=0;q[ap+52>>2]=0;q[ap+40>>2]=0;q[ap+44>>2]=0;ep=ap+24|0;cp=ep;q[cp>>2]=0;q[cp+4>>2]=0;cp=ap- -64|0;q[cp>>2]=0;q[cp+4>>2]=0;q[ap+72>>2]=0;q[ap+76>>2]=0;cp=ap+80|0;q[cp>>2]=0;q[cp+4>>2]=0;q[ap+88>>2]=0;q[ap+104>>2]=0;q[ap+32>>2]=0;q[ap+36>>2]=0;q[ap+16>>2]=0;q[ap+20>>2]=0;q[ap+56>>2]=0;q[ap+60>>2]=0;q[ap+8>>2]=12336;q[ap+96>>2]=0;q[ap+100>>2]=0;q[ap+12>>2]=po;dp=q[po>>2];fp=q[po+4>>2];o[ap+111|0]=0;bb(ap+32|0,(fp-dp>>2>>>0)/3|0,ap+111|0);dp=q[ap+12>>2];fp=q[dp+28>>2];dp=q[dp+24>>2];o[ap+111|0]=0;bb(ap+44|0,fp-dp>>2,ap+111|0);q[ap+28>>2]=bp;q[ep>>2]=gp;q[ap+20>>2]=Po;q[ap+16>>2]=po;ki(bp,ap+8|0);q[a>>2]=bp;q[ap+8>>2]=12336;a=q[ap+96>>2];if(a){q[ap+100>>2]=a;An(a)}a=q[cp>>2];if(a){q[ap+84>>2]=a;An(a)}a=q[ap+68>>2];if(a){q[ap+72>>2]=a;An(a)}a=q[ap+56>>2];if(a){q[ap+60>>2]=a;An(a)}q[ap+8>>2]=12572;a=q[ap+44>>2];if(a){An(a)}a=q[ap+32>>2];if(a){An(a)}T=ap+112|0}function ji(a,po){var Po=0,hp=0,ip=0,jp=0,kp=0,lp=0,mp=0,np=0,op=0;hp=q[a+8>>2];ip=a+4|0;Po=q[ip>>2];if(hp-Po>>2>>>0>=po>>>0){a=po<<2;np=ip,op=Dn(Po,0,a)+a|0,q[np>>2]=op;return}a:{ip=q[a>>2];jp=Po-ip>>2;kp=jp+po|0;if(kp>>>0<1073741824){jp=jp<<2;hp=hp-ip|0;mp=hp>>1;hp=hp>>2>>>0<536870911?mp>>>0>>0?kp:mp:1073741823;if(hp){if(hp>>>0>=1073741824){break a}lp=Mm(hp<<2)}jp=jp+lp|0;Dn(jp,0,po<<2);po=(kp<<2)+lp|0;kp=(hp<<2)+lp|0;if((Po|0)!=(ip|0)){while(1){Po=Po+ -4|0;hp=q[Po>>2];q[Po>>2]=0;jp=jp+ -4|0;q[jp>>2]=hp;if((Po|0)!=(ip|0)){continue}break}ip=q[a>>2];Po=q[a+4>>2]}q[a>>2]=jp;q[a+8>>2]=kp;q[a+4>>2]=po;if((Po|0)!=(ip|0)){while(1){Po=Po+ -4|0;a=q[Po>>2];q[Po>>2]=0;if(a){n[q[q[a>>2]+4>>2]](a)}if((Po|0)!=(ip|0)){continue}break}}if(ip){An(ip)}return}bn();F()}ab(12024);F()}function ki(a,po){var pp=0;pp=q[po+8>>2];q[a+12>>2]=q[po+4>>2];q[a+16>>2]=pp;q[a+28>>2]=q[po+20>>2];pp=q[po+16>>2];q[a+20>>2]=q[po+12>>2];q[a+24>>2]=pp;$i(a+32|0,po+24|0);$i(a+44|0,po+36|0);if((a+8|0)==(po|0)){q[a+92>>2]=q[po+84>>2];return}vd(a+56|0,q[po+48>>2],q[po+52>>2]);vd(a+68|0,q[po+60>>2],q[po- -64>>2]);vd(a+80|0,q[po+72>>2],q[po+76>>2]);q[a+92>>2]=q[po+84>>2];hd(a+96|0,q[po+88>>2],q[po+92>>2])}function li(a,po,qp){a=a|0;po=po|0;qp=qp|0;var rp=0,sp=0;rp=T-16|0;T=rp;q[a+4>>2]=po;po=q[po+64>>2];sp=q[po+4>>2];po=q[po>>2];o[rp+15|0]=0;bb(a+24|0,(sp-po>>2>>>0)/3|0,rp+15|0);po=q[a+4>>2];sp=q[po+56>>2];po=q[po+52>>2];o[rp+14|0]=0;bb(a+36|0,sp-po>>2,rp+14|0);po=q[qp+12>>2];q[a+16>>2]=q[qp+8>>2];q[a+20>>2]=po;po=q[qp+4>>2];q[a+8>>2]=q[qp>>2];q[a+12>>2]=po;T=rp+16|0}function mi(a){a=a|0;var po=0;q[a>>2]=11760;po=q[a+48>>2];if(po){q[a+52>>2]=po;An(po)}q[a>>2]=12012;po=q[a+36>>2];if(po){An(po)}po=q[a+24>>2];if(po){An(po)}return a|0}function ni(a){a=a|0;var qp=0,tp=0,up=0,vp=0,wp=0,xp=0,yp=0,zp=0,Ap=0,Bp=0,Cp=0,Dp=0,Ep=0,Fp=0,Gp=0;zp=T+ -64|0;T=zp;q[a+132>>2]=0;if(q[a+148>>2]){up=a+144|0;tp=q[up>>2];if(tp){while(1){qp=q[tp>>2];An(tp);tp=qp;if(qp){continue}break}}q[up>>2]=0;qp=q[a+140>>2];if(qp){up=a+136|0;tp=0;while(1){q[q[up>>2]+(tp<<2)>>2]=0;tp=tp+1|0;if((qp|0)!=(tp|0)){continue}break}}q[a+148>>2]=0}a:{b:{c:{d:{e:{f:{tp=q[a+4>>2];up=r[tp+36|0];qp=up<<8|r[tp+37|0];g:{if(qp>>>0>513){break g}xp=q[tp+32>>2];if(qp>>>0<=511){wp=q[xp+12>>2];qp=q[xp+20>>2];yp=q[xp+16>>2];vp=yp+4|0;if(vp>>>0<4){qp=qp+1|0}Ap=vp;vp=qp;if((wp|0)<(qp|0)?1:(wp|0)<=(qp|0)?t[xp+8>>2]>=Ap>>>0?0:1:0){break f}qp=yp+q[xp>>2]|0;qp=r[qp|0]|r[qp+1|0]<<8|(r[qp+2|0]<<16|r[qp+3|0]<<24);q[zp>>2]=qp;q[xp+16>>2]=Ap;q[xp+20>>2]=vp;q[a+132>>2]=qp;break g}if(!oi(1,zp,xp)){break f}tp=q[a+4>>2];up=r[tp+36|0];q[a+132>>2]=q[zp>>2]}tp=q[tp+32>>2];h:{i:{j:{if((up&255)>>>0<=1){up=0;xp=q[tp+12>>2];qp=q[tp+20>>2];wp=q[tp+16>>2];vp=wp+4|0;if(vp>>>0<4){qp=qp+1|0}yp=vp;vp=qp;if((xp|0)<(qp|0)?1:(xp|0)<=(qp|0)?t[tp+8>>2]>=yp>>>0?0:1:0){break a}qp=wp+q[tp>>2]|0;qp=r[qp|0]|r[qp+1|0]<<8|(r[qp+2|0]<<16|r[qp+3|0]<<24);q[zp+60>>2]=qp;q[tp+16>>2]=yp;q[tp+20>>2]=vp;q[a+156>>2]=qp;Dp=a+156|0;break j}up=0;if(!oi(1,zp+60|0,tp)){break a}qp=q[a+4>>2];tp=q[qp+32>>2];qp=r[qp+36|0];q[a+156>>2]=q[zp+60>>2];Dp=a+156|0;if(qp>>>0>1){break i}}xp=q[tp+12>>2];qp=q[tp+20>>2];wp=q[tp+16>>2];vp=wp+4|0;if(vp>>>0<4){qp=qp+1|0}Ap=vp;vp=qp;if((xp|0)<(qp|0)?1:(xp|0)<=(qp|0)?t[tp+8>>2]>=Ap>>>0?0:1:0){break a}qp=wp+q[tp>>2]|0;yp=r[qp|0]|r[qp+1|0]<<8|(r[qp+2|0]<<16|r[qp+3|0]<<24);q[zp+56>>2]=yp;q[tp+16>>2]=Ap;q[tp+20>>2]=vp;break h}if(!oi(1,zp+56|0,tp)){break a}yp=q[zp+56>>2]}if(yp>>>0>1431655765|t[Dp>>2]>w(yp,3)>>>0){break a}Bp=q[a+4>>2];vp=q[Bp+32>>2];Fp=q[vp+8>>2];Cp=q[vp+16>>2];xp=q[vp+12>>2];qp=xp;tp=q[vp+20>>2];if((qp|0)<(tp|0)?1:(qp|0)<=(tp|0)?Fp>>>0>Cp>>>0?0:1:0){break a}Gp=q[vp>>2];Ap=r[Gp+Cp|0];qp=tp;Ep=Cp+1|0;if(Ep>>>0<1){qp=qp+1|0}q[vp+16>>2]=Ep;q[vp+20>>2]=qp;k:{if(r[Bp+36|0]<=1){qp=tp;tp=Cp+5|0;if(tp>>>0<5){qp=qp+1|0}wp=tp;tp=qp;if((xp|0)<(qp|0)?1:(xp|0)<=(qp|0)?Fp>>>0>=wp>>>0?0:1:0){break a}qp=Ep+Gp|0;xp=r[qp|0]|r[qp+1|0]<<8|(r[qp+2|0]<<16|r[qp+3|0]<<24);q[zp+52>>2]=xp;q[vp+16>>2]=wp;q[vp+20>>2]=tp;break k}if(!oi(1,zp+52|0,vp)){break a}xp=q[zp+52>>2]}if(yp>>>0>>0|yp>>>0>((xp>>>0)/3|0)+xp>>>0){break a}qp=q[a+4>>2];vp=q[qp+32>>2];l:{if(r[qp+36|0]<=1){wp=q[vp+12>>2];qp=q[vp+20>>2];Cp=q[vp+16>>2];tp=Cp+4|0;if(tp>>>0<4){qp=qp+1|0}Bp=tp;tp=qp;if((wp|0)<(qp|0)?1:(wp|0)<=(qp|0)?t[vp+8>>2]>=Bp>>>0?0:1:0){break a}qp=Cp+q[vp>>2]|0;wp=r[qp|0]|r[qp+1|0]<<8|(r[qp+2|0]<<16|r[qp+3|0]<<24);q[zp+48>>2]=wp;q[vp+16>>2]=Bp;q[vp+20>>2]=tp;break l}if(!oi(1,zp+48|0,vp)){break a}wp=q[zp+48>>2]}if(wp>>>0>xp>>>0){break a}q[a+28>>2]=q[a+24>>2];tp=Mm(88);jk(tp);qp=q[a+8>>2];q[a+8>>2]=tp;vp=a+8|0;if(qp){wa(vp,qp);if(!q[vp>>2]){break a}}qp=q[a+160>>2];q[a+164>>2]=qp;m:{if(q[a+168>>2]-qp>>2>>>0>=yp>>>0){break m}if(yp>>>0>=1073741824){break e}up=yp<<2;tp=Mm(up);q[a+164>>2]=tp;q[a+160>>2]=tp;q[a+168>>2]=tp+up;if(!qp){break m}An(qp)}qp=q[a+172>>2];q[a+176>>2]=qp;n:{if(q[a+180>>2]-qp>>2>>>0>=yp>>>0){break n}if(yp>>>0>=1073741824){break d}up=yp<<2;tp=Mm(up);q[a+176>>2]=tp;q[a+172>>2]=tp;q[a+180>>2]=tp+up;if(!qp){break n}An(qp)}q[a+92>>2]=-1;q[a+84>>2]=-1;q[a+88>>2]=-1;q[a+40>>2]=q[a+36>>2];q[a- -64>>2]=0;q[a+52>>2]=q[a+48>>2];q[a+76>>2]=q[a+72>>2];Cp=a+216|0;tp=q[a+220>>2];up=q[a+216>>2];if((tp|0)==(up|0)){break c}while(1){qp=q[tp+ -12>>2];if(qp){q[tp+ -8>>2]=qp;An(qp)}qp=q[tp+ -28>>2];if(qp){q[tp+ -24>>2]=qp;An(qp)}qp=tp+ -144|0;Bp=q[tp+ -40>>2];if(Bp){q[tp+ -36>>2]=Bp;An(Bp)}pi(tp+ -140|0);tp=qp;if((up|0)!=(qp|0)){continue}break}qp=q[Cp>>2];break b}up=0;break a}ab(12024);F()}ab(12024);F()}qp=up}q[a+220>>2]=up;tp=(up-qp|0)/144|0;o:{if(tp>>>0>>0){qi(Cp,Ap-tp|0);break o}if(tp>>>0<=Ap>>>0){break o}tp=qp+w(Ap,144)|0;if((tp|0)!=(up|0)){while(1){qp=q[up+ -12>>2];if(qp){q[up+ -8>>2]=qp;An(qp)}qp=q[up+ -28>>2];if(qp){q[up+ -24>>2]=qp;An(qp)}qp=up+ -144|0;Bp=q[up+ -40>>2];if(Bp){q[up+ -36>>2]=Bp;An(Bp)}pi(up+ -140|0);up=qp;if((qp|0)!=(tp|0)){continue}break}}q[a+220>>2]=tp}up=0;if(!tk(q[vp>>2],yp,q[Dp>>2]+wp|0)){break a}qp=q[a+156>>2];o[zp|0]=1;bb(a+120|0,qp+wp|0,zp);tp=q[a+4>>2];qp=s[tp+36>>1];qp=(qp<<24|qp<<8&16711680)>>>16;p:{if(qp>>>0<=513){wp=q[tp+32>>2];q:{if(qp>>>0<=511){yp=q[wp+12>>2];qp=q[wp+20>>2];Dp=q[wp+16>>2];tp=Dp+4|0;if(tp>>>0<4){qp=qp+1|0}Bp=tp;tp=qp;if((yp|0)<(qp|0)?1:(yp|0)<=(qp|0)?t[wp+8>>2]>=Bp>>>0?0:1:0){break a}qp=Dp+q[wp>>2]|0;yp=r[qp|0]|r[qp+1|0]<<8|(r[qp+2|0]<<16|r[qp+3|0]<<24);q[zp+44>>2]=yp;q[wp+16>>2]=Bp;q[wp+20>>2]=tp;break q}if(!oi(1,zp+44|0,wp)){break a}yp=q[zp+44>>2]}if(!yp){break a}qp=q[q[a+4>>2]+32>>2];tp=q[qp+8>>2];wp=q[qp+16>>2];qp=q[qp+12>>2]-(q[qp+20>>2]+(tp>>>0>>0)|0)|0;if((qp|0)<0?1:(qp|0)<=0?tp-wp>>>0>=yp>>>0?0:1:0){break a}wp=Yj(zp);tp=q[q[a+4>>2]+32>>2];qp=q[tp+16>>2];Dp=q[tp+8>>2];Zj(wp,(qp+q[tp>>2]|0)+yp|0,(Dp-qp|0)-yp|0,s[tp+38>>1]);tp=ri(a,wp);if((tp|0)==-1){break a}qp=tp;wp=qp>>31;break p}qp=-1;wp=-1;if((ri(a,q[tp+32>>2])|0)==-1){break a}}q[a+376>>2]=a;Dp=a+232|0;tp=q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2];Bp=q[tp>>2]+q[tp+16>>2]|0;yp=q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2];tp=q[yp+8>>2];up=q[yp+16>>2];Zj(Dp,Bp,tp-up|0,s[q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2]+38>>1]);q[a+372>>2]=Ap;up=0;tp=Yj(zp);r:{if(!si(Dp,tp)){break r}yp=ti(a,xp);if((yp|0)==-1){break r}xp=q[q[a+4>>2]+32>>2];up=q[tp+16>>2];Ap=up+q[tp>>2]|0;tp=q[tp+8>>2];Zj(xp,Ap,tp-up|0,s[xp+38>>1]);tp=q[a+4>>2];up=s[tp+36>>1];xp=(up<<24|up<<8&16711680)>>>16;if(xp>>>0<=513){up=q[tp+32>>2];Ap=up;Bp=up;tp=wp+q[up+20>>2]|0;up=qp+q[up+16>>2]|0;if(up>>>0>>0){tp=tp+1|0}q[Bp+16>>2]=up;q[Ap+20>>2]=tp}s:{if(q[a+220>>2]==q[a+216>>2]){break s}tp=q[vp>>2];qp=q[tp+4>>2];tp=q[tp>>2];t:{if(xp>>>0>=513){if((qp|0)==(tp|0)){break s}tp=0;break t}if((qp|0)==(tp|0)){break s}tp=0;while(1){if(ui(a,tp)){tp=tp+3|0;qp=q[vp>>2];if(tp>>>0>2]-q[qp>>2]>>2>>>0){continue}break s}break}up=0;break r}while(1){if(vi(a,tp)){tp=tp+3|0;qp=q[vp>>2];if(tp>>>0>2]-q[qp>>2]>>2>>>0){continue}break s}break}up=0;break r}if(r[a+308|0]){ak(a+272|0)}if(s[a+270>>1]<=513){ak(a+328|0)}tp=q[a+216>>2];wp=a+220|0;if((tp|0)!=q[wp>>2]){xp=0;while(1){qp=w(xp,144);Ek((qp+tp|0)+4|0,q[vp>>2]);up=q[Cp>>2];Ap=qp+up|0;tp=q[Ap+132>>2];Ap=q[Ap+136>>2];if((tp|0)!=(Ap|0)){while(1){Gk((qp+up|0)+4|0,q[tp>>2]);up=q[Cp>>2];tp=tp+4|0;if((Ap|0)!=(tp|0)){continue}break}}Fk((qp+up|0)+4|0);xp=xp+1|0;tp=q[a+216>>2];if(xp>>>0<(q[wp>>2]-tp|0)/144>>>0){continue}break}}qp=q[a+8>>2];wi(a+184|0,q[qp+28>>2]-q[qp+24>>2]>>2);up=q[a+216>>2];if((up|0)!=q[wp>>2]){tp=0;xp=a+220|0;while(1){qp=w(tp,144)+up|0;up=q[qp+60>>2]-q[qp+56>>2]>>2;Ap=qp+104|0;qp=q[vp>>2];qp=q[qp+28>>2]-q[qp+24>>2]>>2;wi(Ap,(up|0)<(qp|0)?qp:up);tp=tp+1|0;up=q[a+216>>2];if(tp>>>0<(q[xp>>2]-up|0)/144>>>0){continue}break}}up=xi(a,yp)}}T=zp- -64|0;return up|0}function oi(a,Hp,Ip){var Jp=0,Kp=0,Lp=0,Mp=0;a:{if(a>>>0>5){break a}Lp=q[Ip+16>>2];Jp=q[Ip+12>>2];Kp=q[Ip+20>>2];if((Jp|0)<(Kp|0)?1:(Jp|0)<=(Kp|0)?t[Ip+8>>2]>Lp>>>0?0:1:0){break a}Jp=r[Lp+q[Ip>>2]|0];Lp=Lp+1|0;if(Lp>>>0<1){Kp=Kp+1|0}q[Ip+16>>2]=Lp;q[Ip+20>>2]=Kp;Kp=Hp;if(Jp&128){if(!oi(a+1|0,Hp,Ip)){break a}a=q[Hp>>2]<<7;q[Hp>>2]=a;Jp=a|Jp&127}q[Kp>>2]=Jp;Mp=1}return Mp}function pi(a){var Hp=0;Hp=q[a+84>>2];if(Hp){q[a+88>>2]=Hp;An(Hp)}Hp=q[a+72>>2];if(Hp){q[a+76>>2]=Hp;An(Hp)}Hp=q[a+52>>2];if(Hp){q[a+56>>2]=Hp;An(Hp)}Hp=q[a+40>>2];if(Hp){q[a+44>>2]=Hp;An(Hp)}Hp=q[a+28>>2];if(Hp){q[a+32>>2]=Hp;An(Hp)}Hp=q[a+12>>2];if(Hp){An(Hp)}a=q[a>>2];if(a){An(a)}}function qi(a,Ip){var Np=0,Op=0,Pp=0,Qp=0,Rp=0,Sp=0;Op=T-32|0;T=Op;a:{b:{Pp=q[a+8>>2];Qp=a+4|0;Np=q[Qp>>2];c:{if((Pp-Np|0)/144>>>0>=Ip>>>0){while(1){q[Np>>2]=-1;Dk(Np+4|0);q[Np+104>>2]=0;q[Np+108>>2]=0;o[Np+100|0]=1;q[Np+112>>2]=0;q[Np+116>>2]=0;q[Np+120>>2]=0;q[Np+124>>2]=0;q[Np+128>>2]=0;q[Np+132>>2]=0;q[Np+136>>2]=0;q[Np+140>>2]=0;Np=q[Qp>>2]+144|0;q[Qp>>2]=Np;Ip=Ip+ -1|0;if(Ip){continue}break c}}Rp=q[a>>2];Sp=(Np-Rp|0)/144|0;Np=Sp+Ip|0;if(Np>>>0>=29826162){break b}q[Op+24>>2]=a+8;Qp=0;q[Op+20>>2]=0;Pp=(Pp-Rp|0)/144|0;Rp=Pp<<1;Pp=Pp>>>0<14913080?Rp>>>0>>0?Np:Rp:29826161;if(Pp){if(Pp>>>0>=29826162){break a}Qp=Mm(w(Pp,144))}q[Op+8>>2]=Qp;Np=w(Sp,144)+Qp|0;q[Op+16>>2]=Np;q[Op+20>>2]=w(Pp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}zi(Yp,Vp+8|0)}$p=$p+1|0;if(($p|0)!=(Wp|0)){continue}break h}break}Zp=-1;break a}Zp=q[Ip+16>>2]}T=Vp+32|0;return Zp}function si(a,Ip){var hq=0,iq=0,jq=0,kq=0,lq=0,mq=0,nq=0,oq=0;nq=T-16|0;T=nq;hq=q[a+4>>2];q[a+40>>2]=q[a>>2];q[a+44>>2]=hq;jq=a+32|0;hq=jq;iq=q[hq+4>>2];q[a+72>>2]=q[hq>>2];q[a+76>>2]=iq;iq=a+24|0;lq=q[iq+4>>2];hq=a- -64|0;q[hq>>2]=q[iq>>2];q[hq+4>>2]=lq;kq=a+16|0;hq=kq;lq=q[hq+4>>2];q[a+56>>2]=q[hq>>2];q[a+60>>2]=lq;lq=a+8|0;hq=lq;mq=q[hq+4>>2];q[a+48>>2]=q[hq>>2];q[a+52>>2]=mq;a:{b:{hq=a+40|0;if(_j(hq,1,nq+8|0)){mq=q[hq+4>>2];q[a>>2]=q[hq>>2];q[a+4>>2]=mq;mq=q[hq+36>>2];q[jq>>2]=q[hq+32>>2];q[jq+4>>2]=mq;jq=q[hq+28>>2];q[iq>>2]=q[hq+24>>2];q[iq+4>>2]=jq;iq=q[hq+20>>2];mq=iq;jq=q[hq+16>>2];q[kq>>2]=jq;q[kq+4>>2]=iq;iq=q[hq+12>>2];kq=iq;hq=q[hq+8>>2];q[lq>>2]=hq;q[lq+4>>2]=iq;iq=jq;lq=hq-iq|0;oq=q[nq+12>>2];iq=kq-((hq>>>0>>0)+mq|0)|0;hq=q[nq+8>>2];if((oq|0)==(iq|0)&hq>>>0<=lq>>>0|oq>>>0>>0){break b}}hq=0;break a}kq=mq+oq|0;jq=hq+jq|0;if(jq>>>0>>0){kq=kq+1|0}q[a+16>>2]=jq;q[a+20>>2]=kq;c:{if(s[a+38>>1]<=513){hq=q[a+4>>2];q[a+96>>2]=q[a>>2];q[a+100>>2]=hq;jq=a+32|0;hq=jq;iq=q[hq+4>>2];q[a+128>>2]=q[hq>>2];q[a+132>>2]=iq;iq=a+24|0;hq=iq;kq=q[hq+4>>2];q[a+120>>2]=q[hq>>2];q[a+124>>2]=kq;kq=a+16|0;hq=kq;lq=q[hq+4>>2];q[a+112>>2]=q[hq>>2];q[a+116>>2]=lq;lq=a+8|0;hq=lq;mq=q[hq+4>>2];q[a+104>>2]=q[hq>>2];q[a+108>>2]=mq;d:{hq=a+96|0;if(_j(hq,1,nq+8|0)){mq=q[hq+4>>2];q[a>>2]=q[hq>>2];q[a+4>>2]=mq;mq=q[hq+36>>2];q[jq>>2]=q[hq+32>>2];q[jq+4>>2]=mq;jq=q[hq+28>>2];q[iq>>2]=q[hq+24>>2];q[iq+4>>2]=jq;iq=q[hq+20>>2];mq=iq;jq=q[hq+16>>2];q[kq>>2]=jq;q[kq+4>>2]=iq;iq=q[hq+12>>2];kq=iq;hq=q[hq+8>>2];q[lq>>2]=hq;q[lq+4>>2]=iq;iq=jq;lq=hq-iq|0;oq=q[nq+12>>2];iq=kq-((hq>>>0>>0)+mq|0)|0;hq=q[nq+8>>2];if((oq|0)==(iq|0)&hq>>>0<=lq>>>0|oq>>>0>>0){break d}}hq=0;break a}kq=mq+oq|0;jq=hq+jq|0;if(jq>>>0>>0){kq=kq+1|0}q[a+16>>2]=jq;q[a+20>>2]=kq;break c}hq=0;if(!bh(a+80|0,a)){break a}}hq=0;if(!Ai(a)){break a}hq=q[a+4>>2];q[Ip>>2]=q[a>>2];q[Ip+4>>2]=hq;hq=q[a+36>>2];q[Ip+32>>2]=q[a+32>>2];q[Ip+36>>2]=hq;hq=q[a+28>>2];q[Ip+24>>2]=q[a+24>>2];q[Ip+28>>2]=hq;hq=q[a+20>>2];q[Ip+16>>2]=q[a+16>>2];q[Ip+20>>2]=hq;hq=q[a+12>>2];q[Ip+8>>2]=q[a+8>>2];q[Ip+12>>2]=hq;hq=1}T=nq+16|0;return hq}function ti(a,Ip){var pq=0,qq=0,rq=0,sq=0,tq=0,uq=0,vq=0,wq=0,xq=0,yq=0,zq=0,Aq=0,Bq=0,Cq=0,Dq=0,Eq=0,Fq=0,Gq=0,Hq=0,Iq=0,Jq=0,Kq=0,Lq=0;sq=T-96|0;T=sq;q[sq+72>>2]=0;q[sq+64>>2]=0;q[sq+68>>2]=0;q[sq+48>>2]=0;q[sq+52>>2]=0;q[sq+40>>2]=0;q[sq+44>>2]=0;q[sq+56>>2]=1065353216;q[sq+32>>2]=0;q[sq+24>>2]=0;q[sq+28>>2]=0;Jq=q[a+124>>2];a:{b:{c:{d:{if((Ip|0)>=1){Iq=a+8|0;Fq=q[a+216>>2]!=q[a+220>>2];Gq=a+40|0;while(1){e:{f:{g:{h:{i:{j:{k:{if(!r[a+308|0]){break k}l:{m:{wq=q[a+296>>2];yq=q[a+304>>2];pq=wq+(yq>>>3)|0;uq=q[a+300>>2];if(pq>>>0>=uq>>>0){break m}pq=r[pq|0];qq=yq+1|0;q[a+304>>2]=qq;if(!(pq>>>(yq&7)&1)){break m}pq=qq>>>3;rq=wq+pq|0;n:{if(rq>>>0>=uq>>>0){rq=qq;qq=0;break n}vq=r[rq|0];rq=yq+2|0;q[a+304>>2]=rq;pq=rq>>>3;qq=vq>>>(qq&7)&1}pq=pq+wq|0;if(pq>>>0>>0){pq=r[pq|0];q[a+304>>2]=rq+1;pq=pq>>>(rq&7)<<1&2}else{pq=0}pq=(qq|pq)<<1|1;switch(pq+ -2|0){case 0:case 2:case 4:break h;case 5:break j;case 1:case 3:break l;default:break k}}qq=q[sq+68>>2];if((qq|0)==q[sq+64>>2]){break d}wq=-1;Aq=q[Iq>>2];uq=q[Aq+24>>2];rq=uq;vq=qq+ -4|0;Dq=q[vq>>2];pq=-1;o:{if((Dq|0)==-1){break o}qq=Dq+1|0;qq=(qq>>>0)%3|0?qq:Dq+ -2|0;pq=-1;if((qq|0)==-1){break o}pq=q[q[Aq>>2]+(qq<<2)>>2]}rq=q[rq+(pq<<2)>>2];if((rq|0)!=-1){qq=rq+1|0;wq=(qq>>>0)%3|0?qq:rq+ -2|0}rq=q[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q|0)!=-1){pq=Cq+((Cq>>>0)%3|0?-1:2)|0;if((pq|0)==-1){break v}pq=q[Bq+(pq<<2)>>2];q[Bq+(rq<<2)>>2]=pq;if((pq|0)==-1){break u}q[yq+(pq<<2)>>2]=rq;break u}q[Bq+(rq<<2)>>2]=-1;rq=-1;break t}q[Bq+(rq<<2)>>2]=-1}pq=Cq+1|0;pq=(pq>>>0)%3|0?pq:Cq+ -2|0;rq=-1;if((pq|0)==-1){break t}rq=q[Bq+(pq<<2)>>2]}q[qq>>2]=rq;q[q[sq+68>>2]+ -4>>2]=zq;break i}rq=-1;pq=q[sq+68>>2];Aq=q[sq+64>>2];if((pq|0)==(Aq|0)){break c}qq=pq+ -4|0;Eq=q[qq>>2];q[sq+68>>2]=qq;zq=q[sq+44>>2];w:{if(!zq){pq=qq;break w}uq=q[sq+40>>2];yq=co(zq)>>>0>1;vq=zq+2147483647&tq;x:{if(!yq){break x}vq=tq;if(tq>>>0>>0){break x}vq=(tq>>>0)%(zq>>>0)|0}uq=q[uq+(vq<<2)>>2];if(!uq){pq=qq;break w}xq=q[uq>>2];if(!xq){pq=qq;break w}uq=zq+ -1|0;y:{while(1){wq=q[xq+4>>2];z:{if((wq|0)!=(tq|0)){A:{if(!yq){wq=wq&uq;break A}if(wq>>>0>>0){break A}wq=(wq>>>0)%(zq>>>0)|0}if((wq|0)==(vq|0)){break z}pq=qq;break w}if(q[xq+8>>2]==(tq|0)){break y}}xq=q[xq>>2];if(xq){continue}break}pq=qq;break w}vq=xq+12|0;if((qq|0)!=q[sq+72>>2]){q[qq>>2]=q[vq>>2];q[sq+68>>2]=pq;break w}zi(sq- -64|0,vq);pq=q[sq+68>>2];Aq=q[sq+64>>2]}if((pq|0)==(Aq|0)){break c}Dq=q[pq+ -4>>2];vq=(Dq|0)==-1;Hq=q[Iq>>2];if(q[q[Hq+12>>2]+(Dq<<2)>>2]!=-1?!vq:0){break c}yq=(Eq|0)==-1;zq=Hq+12|0;uq=q[zq>>2];if(q[uq+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if(!yq){wq=1;q[qq+(zq<<2)>>2]=pq+1;break F}q[qq+(rq<<2)>>2]=pq;wq=0;if((yq|0)==-4){break F}q[qq+(zq<<2)>>2]=q[sq>>2]+1;wq=zq+1|0;if((wq|0)==-1){break E}}q[qq+(wq<<2)>>2]=q[sq>>2]+2}pq=q[sq+68>>2];if((pq|0)!=q[sq+72>>2]){q[pq>>2]=q[sq>>2];q[sq+68>>2]=pq+4;break i}zi(sq- -64|0,sq)}xq=q[Gq>>2];if((xq|0)==q[a+36>>2]){break e}uq=(tq^-1)+Ip|0;while(1){rq=-1;pq=q[xq+ -8>>2];if(pq>>>0>uq>>>0){break c}if((pq|0)!=(uq|0)){break e}qq=r[xq+ -4|0];pq=xq+ -12|0;vq=q[pq>>2];q[Gq>>2]=pq;if((vq|0)<0){break c}rq=q[q[sq+68>>2]+ -4>>2];q[sq+20>>2]=(vq^-1)+Ip;q[sq+88>>2]=sq+20;Bi(sq,sq+40|0,sq+20|0,sq+88|0);vq=q[sq>>2];G:{if(qq&1){pq=-1;if((rq|0)==-1){break G}pq=rq+1|0;pq=(pq>>>0)%3|0?pq:rq+ -2|0;break G}pq=-1;if((rq|0)==-1){break G}pq=rq+ -1|0;if((rq>>>0)%3){break G}pq=rq+2|0}q[vq+12>>2]=pq;xq=q[Gq>>2];if((xq|0)!=q[a+36>>2]){continue}break}break e}F()}wq=-1;vq=q[Hq>>2];q[vq+(Cq<<2)>>2]=-1}q[uq+vq>>2]=rq;H:{I:{J:{if(!yq){qq=Eq+((Eq>>>0)%3|0?-1:2)|0;if((qq|0)==-1){break J}qq=q[(qq<<2)+vq>>2];q[vq+Bq>>2]=qq;if((qq|0)==-1){break I}q[q[Hq+24>>2]+(qq<<2)>>2]=Aq;break I}q[vq+Bq>>2]=-1;xq=-1;rq=-1;break H}q[vq+Bq>>2]=-1}xq=-1;qq=Eq+1|0;qq=(qq>>>0)%3|0?qq:Eq+ -2|0;rq=-1;if((qq|0)==-1){break H}xq=q[(qq<<2)+vq>>2];rq=qq}q[sq>>2]=xq;uq=q[Hq+24>>2];if((wq|0)!=-1){q[uq+(wq<<2)>>2]=q[uq+(xq<<2)>>2]}K:{if((rq|0)==-1){break K}vq=q[Hq>>2];while(1){q[vq+(rq<<2)>>2]=wq;qq=rq+1|0;qq=(qq>>>0)%3|0?qq:rq+ -2|0;if((qq|0)==-1){break K}rq=q[q[zq>>2]+(qq<<2)>>2];if((rq|0)==-1){break K}qq=rq+1|0;rq=(qq>>>0)%3|0?qq:rq+ -2|0;if((rq|0)!=-1){continue}break}}q[uq+(q[sq>>2]<<2)>>2]=-1;L:{if(Fq){break L}qq=q[sq+28>>2];if((qq|0)!=q[sq+32>>2]){q[qq>>2]=q[sq>>2];q[sq+28>>2]=qq+4;break L}zi(sq+24|0,sq);pq=q[sq+68>>2]}q[pq+ -4>>2]=Cq}tq=tq+1|0;if((tq|0)!=(Ip|0)){continue}break}wq=Ip}rq=-1;xq=q[a+8>>2];if(q[xq+28>>2]-q[xq+24>>2]>>2>(Jq|0)){break c}tq=q[sq+68>>2];if((tq|0)!=q[sq+64>>2]){Dq=a+72|0;qq=a+60|0;Aq=a+312|0;Fq=a+8|0;Cq=a+68|0;Jq=a+80|0;Hq=a+76|0;while(1){pq=tq+ -4|0;Ip=q[pq>>2];q[sq+68>>2]=pq;q[sq>>2]=Ip;M:{N:{O:{P:{if(s[a+270>>1]<=513){if(!r[a+364|0]){break O}pq=q[a+360>>2];Ip=q[a+352>>2]+(pq>>>3)|0;if(Ip>>>0>=t[a+356>>2]){break N}Ip=r[Ip|0];q[a+360>>2]=pq+1;Ip=Ip>>>(pq&7)&1;break P}Ip=dh(Aq)}if(!Ip){break N}}zq=q[Fq>>2];Eq=q[zq>>2];if((wq|0)>=((q[zq+4>>2]-Eq>>2>>>0)/3|0)){break d}pq=-1;xq=-1;tq=q[zq+24>>2];uq=tq;Gq=q[sq>>2];vq=-1;Q:{if((Gq|0)==-1){break Q}Ip=Gq+1|0;Ip=(Ip>>>0)%3|0?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q>>2]=Lq;tq=q[a+64>>2];pq=q[Cq>>2];if((tq|0)==pq<<5){if((tq+1|0)<=-1){break a}Ip=qq;if(tq>>>0<=1073741822){vq=tq+32&-32;pq=pq<<6;pq=pq>>>0>>0?vq:pq}else{pq=2147483647}cb(Ip,pq);tq=q[a+64>>2]}wq=wq+1|0;q[a+64>>2]=tq+1;Ip=q[a+60>>2]+(tq>>>3&536870908)|0;q[Ip>>2]=q[Ip>>2]|1<<(tq&31);Ip=q[Hq>>2];if((Ip|0)!=q[Jq>>2]){q[Ip>>2]=q[sq+88>>2];q[Hq>>2]=Ip+4;break M}zi(Dq,sq+88|0);break M}tq=q[a+64>>2];pq=q[Cq>>2];if((tq|0)==pq<<5){if((tq+1|0)<=-1){break a}Ip=qq;if(tq>>>0<=1073741822){vq=tq+32&-32;pq=pq<<6;pq=pq>>>0>>0?vq:pq}else{pq=2147483647}cb(Ip,pq);tq=q[a+64>>2]}q[a+64>>2]=tq+1;pq=q[a+60>>2]+(tq>>>3&536870908)|0;Ip=q[pq>>2];Kq=pq,Lq=eo(tq)&Ip,q[Kq>>2]=Lq;Ip=q[Hq>>2];if((Ip|0)!=q[Jq>>2]){q[Ip>>2]=q[sq>>2];q[Hq>>2]=Ip+4;break M}zi(Dq,sq)}tq=q[sq+68>>2];if((tq|0)!=q[sq+64>>2]){continue}break}xq=q[a+8>>2]}if(((q[xq+4>>2]-q[xq>>2]>>2>>>0)/3|0)!=(wq|0)){break c}rq=q[xq+28>>2]-q[xq+24>>2]>>2;Fq=q[sq+24>>2];uq=q[sq+28>>2];if((Fq|0)==(uq|0)){break b}vq=a+8|0;while(1){zq=q[Fq>>2];wq=q[xq+24>>2];tq=rq+ -1|0;T:{if(q[wq+(tq<<2)>>2]!=-1){pq=rq;break T}wq=q[xq+24>>2];while(1){tq=rq+ -2|0;pq=rq+ -1|0;rq=pq;if(q[(tq<<2)+wq>>2]==-1){continue}break}}if(!(tq>>>0>>0)){q[sq>>2]=xq;Ip=tq<<2;rq=q[Ip+wq>>2];o[sq+12|0]=1;q[sq+8>>2]=rq;q[sq+4>>2]=rq;if((rq|0)!=-1){while(1){q[q[xq>>2]+(rq<<2)>>2]=zq;lg(sq);xq=q[vq>>2];rq=q[sq+8>>2];if((rq|0)!=-1){continue}break}}qq=Ip;Ip=q[xq+24>>2];qq=qq+Ip|0;if((zq|0)!=-1){q[Ip+(zq<<2)>>2]=q[qq>>2]}q[qq>>2]=-1;yq=1<<(zq&31);Ip=q[a+120>>2];rq=Ip+(zq>>>3&536870908)|0;qq=rq;wq=Ip+(tq>>>3&536870908)|0;Ip=1<<(tq&31);tq=yq|q[rq>>2];U:{if(q[wq>>2]&Ip){break U}tq=q[rq>>2]&(yq^-1)}q[qq>>2]=tq;q[wq>>2]=q[wq>>2]&(Ip^-1);pq=pq+ -1|0}rq=pq;Fq=Fq+4|0;if((uq|0)!=(Fq|0)){continue}break}break c}rq=-1}Fq=q[sq+24>>2]}if(Fq){q[sq+28>>2]=Fq;An(Fq)}tq=q[sq+48>>2];if(tq){while(1){a=q[tq>>2];An(tq);tq=a;if(tq){continue}break}}a=q[sq+40>>2];q[sq+40>>2]=0;if(a){An(a)}a=q[sq+64>>2];if(a){q[sq+68>>2]=a;An(a)}T=sq+96|0;return rq}bn();F()}function ui(a,Ip){var Mq=0,Nq=0,Oq=0,Pq=0,Qq=0,Rq=0,Sq=0,Tq=0,Uq=0,Vq=0,Wq=0;Nq=T-32|0;T=Nq;q[Nq+16>>2]=Ip;Mq=-1;a:{if((Ip|0)==-1){q[Nq+20>>2]=-1;break a}Mq=Ip+1|0;q[Nq+20>>2]=(Mq>>>0)%3|0?Mq:Ip+ -2|0;if((Ip>>>0)%3){Mq=Ip+ -1|0;break a}Mq=Ip+2|0}q[Nq+24>>2]=Mq;Rq=a+220|0;Vq=a+8|0;Wq=a+368|0;while(1){b:{if(!((Ip|0)==-1|q[q[q[Vq>>2]+12>>2]+(Ip<<2)>>2]==-1)){Mq=0;if(q[Rq>>2]==q[a+216>>2]){break b}while(1){c:{if(!dh(q[Wq>>2]+(Mq<<4)|0)){break c}Oq=q[a+216>>2];q[Nq+12>>2]=Ip;Oq=Oq+w(Mq,144)|0;Qq=Oq+136|0;Pq=q[Qq>>2];if(Pq>>>0>2]){q[Pq>>2]=Ip;q[Qq>>2]=Pq+4;break c}ya(Oq+132|0,Nq+12|0)}Mq=Mq+1|0;if(Mq>>>0<(q[Rq>>2]-q[a+216>>2]|0)/144>>>0){continue}break}break b}Mq=0;Oq=q[a+216>>2];Pq=q[Rq>>2];if((Oq|0)==(Pq|0)){break b}while(1){q[Nq+12>>2]=Ip;Qq=w(Mq,144)+Oq|0;Uq=Qq+136|0;Sq=q[Uq>>2];d:{if(Sq>>>0>2]){q[Sq>>2]=Ip;q[Uq>>2]=Sq+4;break d}ya(Qq+132|0,Nq+12|0);Pq=q[Rq>>2];Oq=q[a+216>>2]}Mq=Mq+1|0;if(Mq>>>0<(Pq-Oq|0)/144>>>0){continue}break}}Tq=Tq+1|0;if((Tq|0)!=3){Ip=q[(Nq+16|0)+(Tq<<2)>>2];continue}break}T=Nq+32|0;return 1}function vi(a,Ip){var Xq=0,Yq=0,Zq=0,_q=0,$q=0,ar=0,br=0,cr=0,dr=0,er=0,fr=0,gr=0;Yq=T-32|0;T=Yq;q[Yq+16>>2]=Ip;Xq=-1;a:{if((Ip|0)==-1){q[Yq+20>>2]=-1;break a}Xq=Ip+1|0;q[Yq+20>>2]=(Xq>>>0)%3|0?Xq:Ip+ -2|0;if((Ip>>>0)%3){Xq=Ip+ -1|0;break a}Xq=Ip+2|0}q[Yq+24>>2]=Xq;er=(Ip|0)==-1?-1:(Ip>>>0)/3|0;ar=a+220|0;fr=a+8|0;gr=a+368|0;while(1){b:{c:{if((Ip|0)!=-1){Xq=q[q[q[fr>>2]+12>>2]+(Ip<<2)>>2];if((Xq|0)!=-1){break c}}Xq=0;Zq=q[a+216>>2];_q=q[ar>>2];if((Zq|0)==(_q|0)){break b}while(1){q[Yq+12>>2]=Ip;$q=w(Xq,144)+Zq|0;dr=$q+136|0;br=q[dr>>2];d:{if(br>>>0>2]){q[br>>2]=Ip;q[dr>>2]=br+4;break d}ya($q+132|0,Yq+12|0);_q=q[ar>>2];Zq=q[a+216>>2]}Xq=Xq+1|0;if(Xq>>>0<(_q-Zq|0)/144>>>0){continue}break}break b}if((Xq>>>0)/3>>>0>>0){break b}Xq=0;if(q[ar>>2]==q[a+216>>2]){break b}while(1){e:{if(!dh(q[gr>>2]+(Xq<<4)|0)){break e}Zq=q[a+216>>2];q[Yq+12>>2]=Ip;Zq=Zq+w(Xq,144)|0;$q=Zq+136|0;_q=q[$q>>2];if(_q>>>0>2]){q[_q>>2]=Ip;q[$q>>2]=_q+4;break e}ya(Zq+132|0,Yq+12|0)}Xq=Xq+1|0;if(Xq>>>0<(q[ar>>2]-q[a+216>>2]|0)/144>>>0){continue}break}}cr=cr+1|0;if((cr|0)!=3){Ip=q[(Yq+16|0)+(cr<<2)>>2];continue}break}T=Yq+32|0;return 1}function wi(a,Ip){var hr=0,ir=0,jr=0,kr=0,lr=0;ir=q[a+12>>2];hr=q[a+16>>2]-ir>>2;a:{if(hr>>>0>>0){Fa(a+12|0,Ip-hr|0);break a}if(hr>>>0<=Ip>>>0){break a}q[a+16>>2]=ir+(Ip<<2)}b:{hr=q[a>>2];c:{if(q[a+8>>2]-hr>>2>>>0>=Ip>>>0){break c}if(Ip>>>0>=1073741824){break b}kr=a+4|0;ir=q[kr>>2];jr=Ip<<2;Ip=Mm(jr);jr=Ip+jr|0;ir=ir-hr|0;lr=ir+Ip|0;if((ir|0)>=1){Cn(Ip,hr,ir)}q[a>>2]=Ip;q[a+8>>2]=jr;q[kr>>2]=lr;if(!hr){break c}An(hr)}return}ab(12024);F()}function xi(a,Ip){var mr=0,nr=0,or=0,pr=0,qr=0,rr=0,sr=0,tr=0,ur=0,vr=0,wr=0,xr=0,yr=0,zr=0,Ar=0,Br=0;nr=T-48|0;T=nr;mr=q[a+8>>2];or=q[mr>>2];qr=q[mr+4>>2];mr=q[q[a+4>>2]+44>>2];q[nr+40>>2]=0;q[nr+32>>2]=0;q[nr+36>>2]=0;or=(qr-or>>2>>>0)/3|0;pr=q[mr+96>>2];qr=(q[mr+100>>2]-pr|0)/12|0;a:{if(or>>>0>qr>>>0){Ci(mr+96|0,or-qr|0,nr+32|0);break a}if(or>>>0>=qr>>>0){break a}q[mr+100>>2]=pr+w(or,12)}b:{if(q[a+216>>2]==q[a+220>>2]){ur=q[a+4>>2];mr=q[ur+44>>2];or=q[mr+100>>2];sr=q[mr+96>>2];if((or|0)!=(sr|0)){vr=(or-sr|0)/12|0;wr=nr+40|0;mr=0;while(1){q[wr>>2]=0;q[nr+32>>2]=0;q[nr+36>>2]=0;qr=nr;c:{d:{e:{pr=w(mr,3);if((pr|0)==-1){or=-1;q[nr+32>>2]=-1;rr=0;break e}or=q[q[q[a+8>>2]>>2]+(pr<<2)>>2];q[nr+32>>2]=or;rr=pr+1|0;if((rr|0)!=-1){break e}q[nr+36>>2]=-1;pr=0;break d}q[nr+36>>2]=q[q[q[a+8>>2]>>2]+(rr<<2)>>2];pr=pr+2|0;xr=-1;if((pr|0)==-1){break c}}xr=q[q[q[a+8>>2]>>2]+(pr<<2)>>2]}q[qr+40>>2]=xr;qr=sr+w(mr,12)|0;q[qr>>2]=or;q[qr+4>>2]=q[nr+36>>2];q[qr+8>>2]=q[nr+40>>2];mr=mr+1|0;if(mr>>>0>>0){continue}break}}q[q[ur+4>>2]+80>>2]=Ip;mr=1;break b}q[nr+40>>2]=0;q[nr+32>>2]=0;q[nr+36>>2]=0;pr=q[a+8>>2];Ip=q[pr>>2];mr=q[pr+4>>2];q[nr+24>>2]=0;q[nr+16>>2]=0;q[nr+20>>2]=0;f:{g:{h:{Ip=mr-Ip|0;if(Ip){or=Ip>>2;if(or>>>0>=1073741824){break h}mr=Mm(Ip);q[nr+16>>2]=mr;q[nr+24>>2]=mr+(or<<2);Ar=nr,Br=Dn(mr,0,Ip)+Ip|0,q[Ar+20>>2]=Br}if((q[pr+28>>2]-q[pr+24>>2]|0)<1){break g}ur=a+220|0;vr=a+8|0;while(1){or=q[q[pr+24>>2]+(sr<<2)>>2];i:{if((or|0)==-1){break i}j:{if(q[q[a+120>>2]+(sr>>>3&536870908)>>2]>>>(sr&31)&1){break j}Ip=q[ur>>2];wr=q[a+216>>2];if((Ip|0)==(wr|0)){break j}xr=(Ip-wr|0)/144|0;yr=((or>>>0)%3|0?-1:2)+or|0;rr=0;while(1){zr=or<<2;tr=wr+w(rr,144)|0;Ip=q[zr+q[q[tr+68>>2]>>2]>>2];k:{if(!(q[q[tr+16>>2]+(Ip>>>3&536870908)>>2]>>>(Ip&31)&1)){break k}Ip=or;mr=-1;l:{if((yr|0)==-1){break l}qr=q[q[pr+12>>2]+(yr<<2)>>2];mr=-1;if((qr|0)==-1){break l}mr=qr+ -1|0;if((qr>>>0)%3){break l}mr=qr+2|0}if((Ip|0)==(mr|0)){break k}tr=q[tr+32>>2];zr=q[tr+zr>>2];while(1){Ip=0;if((mr|0)==-1){break f}if((zr|0)!=q[tr+(mr<<2)>>2]){or=mr;break j}qr=or;mr=((mr>>>0)%3|0?-1:2)+mr|0;Ip=-1;m:{if((mr|0)==-1){break m}mr=q[q[pr+12>>2]+(mr<<2)>>2];Ip=-1;if((mr|0)==-1){break m}Ip=mr+ -1|0;if((mr>>>0)%3){break m}Ip=mr+2|0}mr=Ip;if((qr|0)!=(mr|0)){continue}break}}rr=rr+1|0;if(rr>>>0>>0){continue}break}}Ip=q[nr+36>>2];q[q[nr+16>>2]+(or<<2)>>2]=Ip-q[nr+32>>2]>>2;q[nr>>2]=or;n:{if(t[nr+40>>2]>Ip>>>0){q[Ip>>2]=or;q[nr+36>>2]=Ip+4;break n}ya(nr+32|0,nr);pr=q[vr>>2]}if((or|0)==-1){break i}Ip=((or>>>0)%3|0?-1:2)+or|0;if((Ip|0)==-1){break i}Ip=q[q[pr+12>>2]+(Ip<<2)>>2];if((Ip|0)==-1){break i}mr=Ip+((Ip>>>0)%3|0?-1:2)|0;if((mr|0)==-1){break i}qr=or;if((mr|0)==(or|0)){break i}while(1){Ip=mr;o:{p:{mr=q[ur>>2];rr=q[a+216>>2];if((mr|0)==(rr|0)){break p}wr=(mr-rr|0)/144|0;mr=0;while(1){yr=q[(rr+w(mr,144)|0)+32>>2];tr=Ip<<2;if(q[yr+tr>>2]==q[yr+(qr<<2)>>2]){mr=mr+1|0;if(mr>>>0>>0){continue}break p}break}mr=q[nr+36>>2];q[tr+q[nr+16>>2]>>2]=mr-q[nr+32>>2]>>2;q[nr>>2]=Ip;if(t[nr+40>>2]>mr>>>0){q[mr>>2]=Ip;q[nr+36>>2]=mr+4;break o}ya(nr+32|0,nr);pr=q[vr>>2];break o}mr=q[nr+16>>2];q[mr+(Ip<<2)>>2]=q[mr+(qr<<2)>>2]}if((Ip|0)==-1){break i}mr=Ip+((Ip>>>0)%3|0?-1:2)|0;if((mr|0)==-1){break i}mr=q[q[pr+12>>2]+(mr<<2)>>2];if((mr|0)==-1){break i}mr=mr+((mr>>>0)%3|0?-1:2)|0;if((mr|0)==-1){break i}qr=Ip;if((mr|0)!=(or|0)){continue}break}}sr=sr+1|0;if((sr|0)>2]-q[pr+24>>2]>>2){continue}break}break g}bn();F()}or=q[a+4>>2];a=q[or+44>>2];Ip=q[a+100>>2];a=q[a+96>>2];if((Ip|0)!=(a|0)){qr=(Ip-a|0)/12|0;mr=0;pr=q[nr+16>>2];while(1){sr=nr+8|0;rr=w(mr,12);Ip=rr+pr|0;q[sr>>2]=q[Ip+8>>2];ur=q[Ip+4>>2];vr=q[Ip>>2];q[nr>>2]=vr;q[nr+4>>2]=ur;Ip=a+rr|0;q[Ip>>2]=vr;q[Ip+4>>2]=q[nr+4>>2];q[Ip+8>>2]=q[sr>>2];mr=mr+1|0;if(mr>>>0>>0){continue}break}}q[q[or+4>>2]+80>>2]=q[nr+36>>2]-q[nr+32>>2]>>2;Ip=1}mr=Ip;a=q[nr+16>>2];if(a){q[n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pr=q[a+140>>2];a:{if((Pr|0)<1){break a}Ip=Pr<<4;Or=Mm((Pr|0)!=(Pr&268435455)?-1:Ip|4);q[Or>>2]=Pr;Or=Or+4|0;Pr=Or+Ip|0;Ip=Or;while(1){Ip=ah(Ip)+16|0;if((Pr|0)!=(Ip|0)){continue}break}Qr=q[a+136>>2];q[a+136>>2]=Or;if(Qr){Pr=Qr+ -4|0;Or=q[Pr>>2];if(Or){Ip=Qr+(Or<<4)|0;while(1){Ip=Ip+ -16|0;if((Qr|0)!=(Ip|0)){continue}break}}An(Pr)}Or=1;if(q[a+140>>2]<1){break a}Or=0;Ip=0;while(1){if(!bh(q[a+136>>2]+(Ip<<4)|0,a)){break a}Ip=Ip+1|0;if((Ip|0)>2]){continue}break}Or=1}return Or}function Bi(a,Rr,Sr,Tr){var Ur=0,Vr=0,Wr=0,Xr=0,Yr=0,Zr=x(0),_r=0,$r=x(0),as=0;Ur=q[Sr>>2];as=a;a:{b:{Vr=q[Rr+4>>2];if(!Vr){break b}_r=q[Rr>>2];Xr=co(Vr);Sr=Vr+ -1&Ur;c:{if(Xr>>>0<=1){break c}Sr=Ur;if(Ur>>>0>>0){break c}Sr=(Ur>>>0)%(Vr>>>0)|0}Wr=Sr;Sr=q[(Sr<<2)+_r>>2];if(!Sr){break b}_r=Vr+ -1|0;Xr=Xr>>>0>1;while(1){Sr=q[Sr>>2];if(!Sr){break b}Yr=q[Sr+4>>2];if((Yr|0)!=(Ur|0)){d:{if(!Xr){Yr=Yr&_r;break d}if(Yr>>>0>>0){break d}Yr=(Yr>>>0)%(Vr>>>0)|0}if((Wr|0)!=(Yr|0)){break b}}if(q[Sr+8>>2]!=(Ur|0)){continue}break}Rr=0;break a}Sr=Mm(16);Tr=q[q[Tr>>2]>>2];q[Sr+12>>2]=0;q[Sr+8>>2]=Tr;q[Sr+4>>2]=Ur;q[Sr>>2]=0;$r=u[Rr+16>>2];Zr=x(q[Rr+12>>2]+1>>>0);e:{if(!(!Vr|!!(x($r*x(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4>>2];q[Tr>>2]=q[Sr>>2];q[Tr+4>>2]=cs;q[Tr+8>>2]=q[Sr+8>>2];Tr=Tr+12|0;Rr=Rr+ -1|0;if(Rr){continue}break}cs=a+4|0;Rr=q[a>>2];Sr=q[cs>>2]-Rr|0;bs=bs+w((Sr|0)/-12|0,12)|0;if((Sr|0)>=1){Cn(bs,Rr,Sr)}q[a>>2]=bs;q[a+8>>2]=ds;q[cs>>2]=Tr;if(!Rr){break c}An(Rr)}return}bn();F()}ab(12024);F()}function Di(a){a=a|0;return q[a+8>>2]}function Ei(a){q[a>>2]=11324;Dn(a+4|0,0,80);q[a+96>>2]=0;q[a+100>>2]=0;q[a+92>>2]=-1;q[a+84>>2]=-1;q[a+88>>2]=-1;q[a+104>>2]=0;q[a+108>>2]=0;q[a+112>>2]=0;q[a+116>>2]=0;q[a+120>>2]=0;q[a+124>>2]=0;q[a+128>>2]=0;q[a+132>>2]=0;q[a+136>>2]=0;q[a+140>>2]=0;q[a+144>>2]=0;q[a+148>>2]=0;q[a+156>>2]=0;q[a+160>>2]=0;q[a+152>>2]=1065353216;q[a+164>>2]=0;q[a+168>>2]=0;q[a+172>>2]=0;q[a+176>>2]=0;q[a+180>>2]=0;q[a+184>>2]=0;q[a+188>>2]=0;q[a+192>>2]=0;q[a+196>>2]=0;q[a+200>>2]=0;q[a+204>>2]=0;q[a+208>>2]=0;q[a+212>>2]=-1;q[a+216>>2]=0;q[a+220>>2]=0;q[a+224>>2]=0;ci(a+232|0);q[a+396>>2]=0;q[a+388>>2]=0;q[a+392>>2]=0;q[a+380>>2]=0;q[a+384>>2]=0;ah(a+400|0);q[a+416>>2]=-1;q[a+420>>2]=-1}function Fi(a){a=a|0;var Rr=0,Sr=0,fs=0,gs=0,hs=0,is=0,js=0,ks=0,ls=0,ms=0,ns=0,os=0,ps=0,qs=0,rs=0,ss=0,ts=0;ks=T+ -64|0;T=ks;q[a+132>>2]=0;if(q[a+148>>2]){fs=a+144|0;Sr=q[fs>>2];if(Sr){while(1){Rr=q[Sr>>2];An(Sr);Sr=Rr;if(Rr){continue}break}}q[fs>>2]=0;Rr=q[a+140>>2];if(Rr){fs=a+136|0;Sr=0;while(1){q[q[fs>>2]+(Sr<<2)>>2]=0;Sr=Sr+1|0;if((Rr|0)!=(Sr|0)){continue}break}}q[a+148>>2]=0}a:{b:{c:{d:{e:{f:{Sr=q[a+4>>2];fs=r[Sr+36|0];Rr=fs<<8|r[Sr+37|0];g:{if(Rr>>>0>513){break g}is=q[Sr+32>>2];if(Rr>>>0<=511){gs=q[is+12>>2];Rr=q[is+20>>2];js=q[is+16>>2];hs=js+4|0;if(hs>>>0<4){Rr=Rr+1|0}ls=hs;hs=Rr;if((gs|0)<(Rr|0)?1:(gs|0)<=(Rr|0)?t[is+8>>2]>=ls>>>0?0:1:0){break f}Rr=js+q[is>>2]|0;Rr=r[Rr|0]|r[Rr+1|0]<<8|(r[Rr+2|0]<<16|r[Rr+3|0]<<24);q[ks>>2]=Rr;q[is+16>>2]=ls;q[is+20>>2]=hs;q[a+132>>2]=Rr;break g}if(!oi(1,ks,is)){break f}Sr=q[a+4>>2];fs=r[Sr+36|0];q[a+132>>2]=q[ks>>2]}Sr=q[Sr+32>>2];h:{i:{j:{if((fs&255)>>>0<=1){fs=0;is=q[Sr+12>>2];Rr=q[Sr+20>>2];gs=q[Sr+16>>2];hs=gs+4|0;if(hs>>>0<4){Rr=Rr+1|0}js=hs;hs=Rr;if((is|0)<(Rr|0)?1:(is|0)<=(Rr|0)?t[Sr+8>>2]>=js>>>0?0:1:0){break a}Rr=gs+q[Sr>>2]|0;Rr=r[Rr|0]|r[Rr+1|0]<<8|(r[Rr+2|0]<<16|r[Rr+3|0]<<24);q[ks+60>>2]=Rr;q[Sr+16>>2]=js;q[Sr+20>>2]=hs;q[a+156>>2]=Rr;ns=a+156|0;break j}fs=0;if(!oi(1,ks+60|0,Sr)){break a}Rr=q[a+4>>2];Sr=q[Rr+32>>2];Rr=r[Rr+36|0];q[a+156>>2]=q[ks+60>>2];ns=a+156|0;if(Rr>>>0>1){break i}}is=q[Sr+12>>2];Rr=q[Sr+20>>2];gs=q[Sr+16>>2];hs=gs+4|0;if(hs>>>0<4){Rr=Rr+1|0}ls=hs;hs=Rr;if((is|0)<(Rr|0)?1:(is|0)<=(Rr|0)?t[Sr+8>>2]>=ls>>>0?0:1:0){break a}Rr=gs+q[Sr>>2]|0;js=r[Rr|0]|r[Rr+1|0]<<8|(r[Rr+2|0]<<16|r[Rr+3|0]<<24);q[ks+56>>2]=js;q[Sr+16>>2]=ls;q[Sr+20>>2]=hs;break h}if(!oi(1,ks+56|0,Sr)){break a}js=q[ks+56>>2]}if(js>>>0>1431655765|t[ns>>2]>w(js,3)>>>0){break a}os=q[a+4>>2];hs=q[os+32>>2];ps=q[hs+8>>2];ms=q[hs+16>>2];is=q[hs+12>>2];Rr=is;Sr=q[hs+20>>2];if((Rr|0)<(Sr|0)?1:(Rr|0)<=(Sr|0)?ps>>>0>ms>>>0?0:1:0){break a}rs=q[hs>>2];ls=r[rs+ms|0];Rr=Sr;qs=ms+1|0;if(qs>>>0<1){Rr=Rr+1|0}q[hs+16>>2]=qs;q[hs+20>>2]=Rr;k:{if(r[os+36|0]<=1){Rr=Sr;Sr=ms+5|0;if(Sr>>>0<5){Rr=Rr+1|0}gs=Sr;Sr=Rr;if((is|0)<(Rr|0)?1:(is|0)<=(Rr|0)?ps>>>0>=gs>>>0?0:1:0){break a}Rr=qs+rs|0;is=r[Rr|0]|r[Rr+1|0]<<8|(r[Rr+2|0]<<16|r[Rr+3|0]<<24);q[ks+52>>2]=is;q[hs+16>>2]=gs;q[hs+20>>2]=Sr;break k}if(!oi(1,ks+52|0,hs)){break a}is=q[ks+52>>2]}if(js>>>0>>0|js>>>0>((is>>>0)/3|0)+is>>>0){break a}Rr=q[a+4>>2];hs=q[Rr+32>>2];l:{if(r[Rr+36|0]<=1){gs=q[hs+12>>2];Rr=q[hs+20>>2];ms=q[hs+16>>2];Sr=ms+4|0;if(Sr>>>0<4){Rr=Rr+1|0}os=Sr;Sr=Rr;if((gs|0)<(Rr|0)?1:(gs|0)<=(Rr|0)?t[hs+8>>2]>=os>>>0?0:1:0){break a}Rr=ms+q[hs>>2]|0;ms=r[Rr|0]|r[Rr+1|0]<<8|(r[Rr+2|0]<<16|r[Rr+3|0]<<24);q[ks+48>>2]=ms;q[hs+16>>2]=os;q[hs+20>>2]=Sr;break l}if(!oi(1,ks+48|0,hs)){break a}ms=q[ks+48>>2]}if(ms>>>0>is>>>0){break a}q[a+28>>2]=q[a+24>>2];Sr=Mm(88);jk(Sr);Rr=q[a+8>>2];q[a+8>>2]=Sr;hs=a+8|0;if(Rr){wa(hs,Rr);if(!q[hs>>2]){break a}}Rr=q[a+160>>2];q[a+164>>2]=Rr;m:{if(q[a+168>>2]-Rr>>2>>>0>=js>>>0){break m}if(js>>>0>=1073741824){break e}fs=js<<2;Sr=Mm(fs);q[a+164>>2]=Sr;q[a+160>>2]=Sr;q[a+168>>2]=Sr+fs;if(!Rr){break m}An(Rr)}Rr=q[a+172>>2];q[a+176>>2]=Rr;n:{if(q[a+180>>2]-Rr>>2>>>0>=js>>>0){break n}if(js>>>0>=1073741824){break d}fs=js<<2;Sr=Mm(fs);q[a+176>>2]=Sr;q[a+172>>2]=Sr;q[a+180>>2]=Sr+fs;if(!Rr){break n}An(Rr)}q[a+92>>2]=-1;q[a+84>>2]=-1;q[a+88>>2]=-1;q[a+40>>2]=q[a+36>>2];q[a- -64>>2]=0;q[a+52>>2]=q[a+48>>2];q[a+76>>2]=q[a+72>>2];os=a+216|0;Sr=q[a+220>>2];fs=q[a+216>>2];if((Sr|0)==(fs|0)){break c}while(1){Rr=q[Sr+ -12>>2];if(Rr){q[Sr+ -8>>2]=Rr;An(Rr)}Rr=q[Sr+ -28>>2];if(Rr){q[Sr+ -24>>2]=Rr;An(Rr)}Rr=Sr+ -144|0;gs=q[Sr+ -40>>2];if(gs){q[Sr+ -36>>2]=gs;An(gs)}pi(Sr+ -140|0);Sr=Rr;if((fs|0)!=(Rr|0)){continue}break}Rr=q[os>>2];break b}fs=0;break a}ab(12024);F()}ab(12024);F()}Rr=fs}q[a+220>>2]=fs;Sr=(fs-Rr|0)/144|0;o:{if(Sr>>>0>>0){qi(os,ls-Sr|0);break o}if(Sr>>>0<=ls>>>0){break o}Sr=Rr+w(ls,144)|0;if((Sr|0)!=(fs|0)){while(1){Rr=q[fs+ -12>>2];if(Rr){q[fs+ -8>>2]=Rr;An(Rr)}Rr=q[fs+ -28>>2];if(Rr){q[fs+ -24>>2]=Rr;An(Rr)}Rr=fs+ -144|0;gs=q[fs+ -40>>2];if(gs){q[fs+ -36>>2]=gs;An(gs)}pi(fs+ -140|0);fs=Rr;if((Rr|0)!=(Sr|0)){continue}break}}q[a+220>>2]=Sr}fs=0;if(!tk(q[hs>>2],js,q[ns>>2]+ms|0)){break a}Rr=q[a+156>>2];o[ks|0]=1;bb(a+120|0,Rr+ms|0,ks);Sr=q[a+4>>2];Rr=s[Sr+36>>1];Rr=(Rr<<24|Rr<<8&16711680)>>>16;p:{if(Rr>>>0<=513){gs=q[Sr+32>>2];q:{if(Rr>>>0<=511){js=q[gs+12>>2];Rr=q[gs+20>>2];ns=q[gs+16>>2];Sr=ns+4|0;if(Sr>>>0<4){Rr=Rr+1|0}ps=Sr;Sr=Rr;if((js|0)<(Rr|0)?1:(js|0)<=(Rr|0)?t[gs+8>>2]>=ps>>>0?0:1:0){break a}Rr=ns+q[gs>>2]|0;js=r[Rr|0]|r[Rr+1|0]<<8|(r[Rr+2|0]<<16|r[Rr+3|0]<<24);q[ks+44>>2]=js;q[gs+16>>2]=ps;q[gs+20>>2]=Sr;break q}if(!oi(1,ks+44|0,gs)){break a}js=q[ks+44>>2]}if(!js){break a}Rr=q[q[a+4>>2]+32>>2];Sr=q[Rr+8>>2];gs=q[Rr+16>>2];Rr=q[Rr+12>>2]-(q[Rr+20>>2]+(Sr>>>0>>0)|0)|0;if((Rr|0)<0?1:(Rr|0)<=0?Sr-gs>>>0>=js>>>0?0:1:0){break a}gs=Yj(ks);Sr=q[q[a+4>>2]+32>>2];Rr=q[Sr+16>>2];ns=q[Sr+8>>2];Zj(gs,(Rr+q[Sr>>2]|0)+js|0,(ns-Rr|0)-js|0,s[Sr+38>>1]);Sr=ri(a,gs);if((Sr|0)==-1){break a}Rr=Sr;gs=Rr>>31;break p}Rr=-1;gs=-1;if((ri(a,q[Sr+32>>2])|0)==-1){break a}}q[a+376>>2]=a;ns=a+232|0;Sr=q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2];ps=q[Sr>>2]+q[Sr+16>>2]|0;js=q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2];Sr=q[js+8>>2];fs=q[js+16>>2];Zj(ns,ps,Sr-fs|0,s[q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2]+38>>1]);ss=a,ts=n[q[q[a>>2]+36>>2]](a)|0,q[ss+380>>2]=ts;q[a+372>>2]=ls;q[a+384>>2]=q[a+156>>2]+ms;fs=0;Sr=Yj(ks);r:{if(!Gi(ns,Sr)){break r}js=Hi(a,is);if((js|0)==-1){break r}is=q[q[a+4>>2]+32>>2];fs=q[Sr+16>>2];ls=fs+q[Sr>>2]|0;Sr=q[Sr+8>>2];Zj(is,ls,Sr-fs|0,s[is+38>>1]);Sr=q[a+4>>2];fs=s[Sr+36>>1];is=(fs<<24|fs<<8&16711680)>>>16;if(is>>>0<=513){fs=q[Sr+32>>2];ls=fs;ps=fs;Sr=gs+q[fs+20>>2]|0;fs=Rr+q[fs+16>>2]|0;if(fs>>>0>>0){Sr=Sr+1|0}q[ps+16>>2]=fs;q[ls+20>>2]=Sr}s:{if(q[a+220>>2]==q[a+216>>2]){break s}Sr=q[hs>>2];Rr=q[Sr+4>>2];Sr=q[Sr>>2];t:{if(is>>>0>=513){if((Rr|0)==(Sr|0)){break s}Sr=0;break t}if((Rr|0)==(Sr|0)){break s}Sr=0;while(1){if(ui(a,Sr)){Sr=Sr+3|0;Rr=q[hs>>2];if(Sr>>>0>2]-q[Rr>>2]>>2>>>0){continue}break s}break}fs=0;break r}while(1){if(vi(a,Sr)){Sr=Sr+3|0;Rr=q[hs>>2];if(Sr>>>0>2]-q[Rr>>2]>>2>>>0){continue}break s}break}fs=0;break r}if(r[a+308|0]){ak(a+272|0)}if(s[a+270>>1]<=513){ak(a+328|0)}Sr=q[a+216>>2];gs=a+220|0;if((Sr|0)!=q[gs>>2]){is=0;while(1){Rr=w(is,144);Ek((Rr+Sr|0)+4|0,q[hs>>2]);fs=q[os>>2];ls=Rr+fs|0;Sr=q[ls+132>>2];ls=q[ls+136>>2];if((Sr|0)!=(ls|0)){while(1){Gk((Rr+fs|0)+4|0,q[Sr>>2]);fs=q[os>>2];Sr=Sr+4|0;if((ls|0)!=(Sr|0)){continue}break}}Fk((Rr+fs|0)+4|0);is=is+1|0;Sr=q[a+216>>2];if(is>>>0<(q[gs>>2]-Sr|0)/144>>>0){continue}break}}Rr=q[a+8>>2];wi(a+184|0,q[Rr+28>>2]-q[Rr+24>>2]>>2);fs=q[a+216>>2];if((fs|0)!=q[gs>>2]){Sr=0;is=a+220|0;while(1){Rr=w(Sr,144)+fs|0;fs=q[Rr+60>>2]-q[Rr+56>>2]>>2;ls=Rr+104|0;Rr=q[hs>>2];Rr=q[Rr+28>>2]-q[Rr+24>>2]>>2;wi(ls,(fs|0)<(Rr|0)?Rr:fs);Sr=Sr+1|0;fs=q[a+216>>2];if(Sr>>>0<(q[is>>2]-fs|0)/144>>>0){continue}break}}fs=xi(a,js)}}T=ks- -64|0;return fs|0}function Gi(a,us){var vs=0,ws=0,xs=0,ys=0,zs=0,As=0,Bs=0;ys=T-16|0;T=ys;a:{if(!si(a,us)){break a}zs=q[us+12>>2];vs=q[us+20>>2];As=q[us+16>>2];xs=As+4|0;if(xs>>>0<4){vs=vs+1|0}ws=xs;xs=vs;if((zs|0)<(vs|0)?1:(zs|0)<=(vs|0)?t[us+8>>2]>=ws>>>0?0:1:0){break a}vs=As+q[us>>2]|0;vs=r[vs|0]|r[vs+1|0]<<8|(r[vs+2|0]<<16|r[vs+3|0]<<24);q[us+16>>2]=ws;q[us+20>>2]=xs;if((vs|0)<0){break a}ws=q[a+152>>2];if((vs|0)>=(ws|0)){break a}q[ys+12>>2]=0;xs=q[a+156>>2];vs=q[a+160>>2]-xs>>2;b:{if(ws>>>0>vs>>>0){Ad(a+156|0,ws-vs|0,ys+12|0);break b}if(ws>>>0>=vs>>>0){break b}q[a+160>>2]=xs+(ws<<2)}Bs=bh(a+168|0,us)}T=ys+16|0;return Bs}function Hi(a,us){var Cs=0,Ds=0,Es=0,Fs=0,Gs=0,Hs=0,Is=0,Js=0,Ks=0,Ls=0,Ms=0,Ns=0,Os=0,Ps=0,Qs=0,Rs=0,Ss=0,Ts=0,Us=0,Vs=0,Ws=0,Xs=0,Ys=0,Zs=0,_s=0,$s=0,at=0;Gs=T-96|0;T=Gs;q[Gs+72>>2]=0;q[Gs+64>>2]=0;q[Gs+68>>2]=0;q[Gs+48>>2]=0;q[Gs+52>>2]=0;q[Gs+40>>2]=0;q[Gs+44>>2]=0;q[Gs+56>>2]=1065353216;q[Gs+32>>2]=0;q[Gs+24>>2]=0;q[Gs+28>>2]=0;Ss=q[a+124>>2];a:{b:{c:{if((us|0)>=1){Ts=a+400|0;Us=a+232|0;Zs=a+296|0;Vs=a+8|0;_s=a+388|0;Ys=q[a+216>>2]!=q[a+220>>2];Ws=a+40|0;while(1){d:{e:{f:{g:{h:{if(q[a+420>>2]!=-1){if(dh(Ts)){break h}}Cs=a;Js=Cs;if(r[Cs+308|0]){Ks=q[Zs>>2];Is=q[a+304>>2];Ds=Ks+(Is>>>3)|0;Hs=q[a+300>>2];if(Ds>>>0>=Hs>>>0){break g}Es=r[Ds|0];Ds=Is+1|0;q[a+304>>2]=Ds;if(!(Es>>>(Is&7)&1)){break g}Ms=Ds>>>3;Es=Ks+Ms|0;i:{if(Es>>>0>=Hs>>>0){Es=Ds;Cs=0;break i}Fs=r[Es|0];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0,Gs);Ds=q[Gs+68>>2]}q[Ds+ -4>>2]=Ps;Cs=0}Ii(Us,q[Ds+ -4>>2]);K:{if(!Cs){break K}Ds=q[Ws>>2];if((Ds|0)==q[a+36>>2]){break K}Hs=(Ls^-1)+us|0;while(1){Es=-1;Cs=q[Ds+ -8>>2];if(Cs>>>0>Hs>>>0){break c}if((Cs|0)!=(Hs|0)){break K}Cs=r[Ds+ -4|0];Ds=Ds+ -12|0;Fs=q[Ds>>2];q[Ws>>2]=Ds;if((Fs|0)<0){break c}Es=q[q[Gs+68>>2]+ -4>>2];q[Gs+20>>2]=(Fs^-1)+us;q[Gs+88>>2]=Gs+20;Bi(Gs,Gs+40|0,Gs+20|0,Gs+88|0);Fs=q[Gs>>2];L:{if(Cs&1){Cs=-1;if((Es|0)==-1){break L}Ds=Es+1|0;Cs=(Ds>>>0)%3|0?Ds:Es+ -2|0;break L}Cs=-1;if((Es|0)==-1){break L}Cs=Es+ -1|0;if((Es>>>0)%3){break L}Cs=Es+2|0}q[Fs+12>>2]=Cs;Ds=q[Ws>>2];if((Ds|0)!=q[a+36>>2]){continue}break}}Ls=Ls+1|0;if((Ls|0)!=(us|0)){continue}break}Hs=us}Es=-1;Js=q[a+8>>2];if(q[Js+28>>2]-q[Js+24>>2]>>2>(Ss|0)){break c}Ds=q[Gs+68>>2];if((Ds|0)!=q[Gs+64>>2]){Ps=a+72|0;us=a+60|0;Zs=a+312|0;_s=a+352|0;Ys=a+8|0;Os=a+68|0;Qs=a+80|0;Ws=a+76|0;while(1){Cs=Ds+ -4|0;Ds=q[Cs>>2];q[Gs+68>>2]=Cs;q[Gs>>2]=Ds;M:{N:{O:{P:{if(s[a+270>>1]<=513){if(!r[a+364|0]){break O}Cs=q[a+360>>2];Ds=q[_s>>2]+(Cs>>>3)|0;if(Ds>>>0>=t[a+356>>2]){break N}Ds=r[Ds|0];q[a+360>>2]=Cs+1;Cs=Ds>>>(Cs&7)&1;break P}Cs=dh(Zs)}if(!Cs){break N}}Is=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hs|0)){break c}Es=q[Js+28>>2]-q[Js+24>>2]>>2;us=q[Gs+24>>2];Ks=q[Gs+28>>2];if((us|0)==(Ks|0)){break b}Fs=a+8|0;while(1){Is=q[us>>2];Hs=q[Js+24>>2];Ds=Es+ -1|0;T:{if(q[Hs+(Ds<<2)>>2]!=-1){Ls=Es;break T}Hs=q[Js+24>>2];while(1){Ds=Es+ -2|0;Ls=Es+ -1|0;Es=Ls;if(q[(Ds<<2)+Hs>>2]==-1){continue}break}}if(!(Ds>>>0>>0)){q[Gs>>2]=Js;Cs=Ds<<2;Es=q[Cs+Hs>>2];o[Gs+12|0]=1;q[Gs+8>>2]=Es;q[Gs+4>>2]=Es;if((Es|0)!=-1){while(1){q[q[Js>>2]+(Es<<2)>>2]=Is;lg(Gs);Js=q[Fs>>2];Es=q[Gs+8>>2];if((Es|0)!=-1){continue}break}}Es=Cs;Cs=q[Js+24>>2];Es=Es+Cs|0;if((Is|0)!=-1){q[Cs+(Is<<2)>>2]=q[Es>>2]}q[Es>>2]=-1;Ys=1<<(Is&31);Es=q[a+120>>2];Is=Es+(Is>>>3&536870908)|0;Cs=Is;Hs=Es+(Ds>>>3&536870908)|0;Ds=1<<(Ds&31);Es=Ys|q[Is>>2];U:{if(q[Hs>>2]&Ds){break U}Es=q[Is>>2]&(Ys^-1)}q[Cs>>2]=Es;q[Hs>>2]=q[Hs>>2]&(Ds^-1);Ls=Ls+ -1|0}Es=Ls;us=us+4|0;if((Ks|0)!=(us|0)){continue}break}}us=q[Gs+24>>2]}if(us){q[Gs+28>>2]=us;An(us)}Ds=q[Gs+48>>2];if(Ds){while(1){a=q[Ds>>2];An(Ds);Ds=a;if(Ds){continue}break}}a=q[Gs+40>>2];q[Gs+40>>2]=0;if(a){An(a)}a=q[Gs+64>>2];if(a){q[Gs+68>>2]=a;An(a)}T=Gs+96|0;return Es}bn();F()}function Ii(a,us){var bt=0,ct=0,dt=0,et=0,ft=0;ct=-1;ft=-1;a:{if((us|0)==-1){break a}bt=us+1|0;ct=(bt>>>0)%3|0?bt:us+ -2|0;ft=us+ -1|0;if((us>>>0)%3){break a}ft=us+2|0}bt=q[a+184>>2];b:{if(bt>>>0>7){break b}c:{d:{switch(bt-2|0){default:dt=q[a+148>>2];bt=-1;bt=(ct|0)!=-1?q[q[dt>>2]+(ct<<2)>>2]:bt;ct=1;et=bt<<2;bt=q[a+156>>2];et=et+bt|0;q[et>>2]=q[et>>2]+1;bt=(((ft|0)!=-1?q[q[dt>>2]+(ft<<2)>>2]:-1)<<2)+bt|0;break c;case 3:et=q[a+148>>2];bt=q[a+156>>2];dt=bt+(((us|0)!=-1?q[q[et>>2]+(us<<2)>>2]:-1)<<2)|0;q[dt>>2]=q[dt>>2]+1;dt=(((ct|0)!=-1?q[q[et>>2]+(ct<<2)>>2]:-1)<<2)+bt|0;q[dt>>2]=q[dt>>2]+1;ct=2;bt=(((ft|0)!=-1?q[q[et>>2]+(ft<<2)>>2]:-1)<<2)+bt|0;break c;case 1:et=q[a+148>>2];bt=q[a+156>>2];dt=bt+(((us|0)!=-1?q[q[et>>2]+(us<<2)>>2]:-1)<<2)|0;q[dt>>2]=q[dt>>2]+1;dt=(((ct|0)!=-1?q[q[et>>2]+(ct<<2)>>2]:-1)<<2)+bt|0;q[dt>>2]=q[dt>>2]+2;ct=1;bt=(((ft|0)!=-1?q[q[et>>2]+(ft<<2)>>2]:-1)<<2)+bt|0;break c;case 0:case 2:case 4:break b;case 5:break d}}et=q[a+148>>2];bt=q[a+156>>2];dt=bt+(((us|0)!=-1?q[q[et>>2]+(us<<2)>>2]:-1)<<2)|0;q[dt>>2]=q[dt>>2]+2;dt=(((ct|0)!=-1?q[q[et>>2]+(ct<<2)>>2]:-1)<<2)+bt|0;q[dt>>2]=q[dt>>2]+2;ct=2;bt=(((ft|0)!=-1?q[q[et>>2]+(ft<<2)>>2]:-1)<<2)+bt|0}q[bt>>2]=q[bt>>2]+ct;bt=q[a+184>>2]}e:{if(bt>>>0>5){break e}f:{switch(bt-1|0){case 0:case 1:case 2:case 3:break e;default:break f}}bt=a;ft=bt;bt=q[bt+156>>2];ct=-1;g:{if((us|0)==-1){break g}ct=us+1|0;us=(ct>>>0)%3|0?ct:us+ -2|0;ct=-1;if((us|0)==-1){break g}ct=q[q[q[a+148>>2]>>2]+(us<<2)>>2]}q[ft+188>>2]=q[bt+(ct<<2)>>2]>5?0:5;return}q[a+188>>2]=-1}function Ji(a){q[a>>2]=11372;Dn(a+4|0,0,80);q[a+96>>2]=0;q[a+100>>2]=0;q[a+92>>2]=-1;q[a+84>>2]=-1;q[a+88>>2]=-1;q[a+104>>2]=0;q[a+108>>2]=0;q[a+112>>2]=0;q[a+116>>2]=0;q[a+120>>2]=0;q[a+124>>2]=0;q[a+128>>2]=0;q[a+132>>2]=0;q[a+136>>2]=0;q[a+140>>2]=0;q[a+144>>2]=0;q[a+148>>2]=0;q[a+156>>2]=0;q[a+160>>2]=0;q[a+152>>2]=1065353216;q[a+164>>2]=0;q[a+168>>2]=0;q[a+172>>2]=0;q[a+176>>2]=0;q[a+180>>2]=0;q[a+184>>2]=0;q[a+188>>2]=0;q[a+192>>2]=0;q[a+196>>2]=0;q[a+200>>2]=0;q[a+204>>2]=0;q[a+208>>2]=0;q[a+212>>2]=-1;q[a+216>>2]=0;q[a+220>>2]=0;q[a+224>>2]=0;ci(a+232|0);q[a+388>>2]=0;q[a+392>>2]=0;q[a+380>>2]=0;q[a+384>>2]=0;q[a+416>>2]=0;q[a+420>>2]=0;q[a+412>>2]=7;q[a+404>>2]=-1;q[a+408>>2]=2;q[a+396>>2]=0;q[a+400>>2]=-1;q[a+424>>2]=0;q[a+428>>2]=0;q[a+432>>2]=0;q[a+436>>2]=0}function Ki(a){a=a|0;var us=0,gt=0,ht=0,it=0,jt=0,kt=0,lt=0,mt=0,nt=0,ot=0,pt=0,qt=0,rt=0,st=0,tt=0,ut=0,vt=0;mt=T+ -64|0;T=mt;q[a+132>>2]=0;if(q[a+148>>2]){ht=a+144|0;gt=q[ht>>2];if(gt){while(1){us=q[gt>>2];An(gt);gt=us;if(us){continue}break}}q[ht>>2]=0;us=q[a+140>>2];if(us){ht=a+136|0;gt=0;while(1){q[q[ht>>2]+(gt<<2)>>2]=0;gt=gt+1|0;if((us|0)!=(gt|0)){continue}break}}q[a+148>>2]=0}a:{b:{c:{d:{e:{f:{gt=q[a+4>>2];ht=r[gt+36|0];us=ht<<8|r[gt+37|0];g:{if(us>>>0>513){break g}kt=q[gt+32>>2];if(us>>>0<=511){it=q[kt+12>>2];us=q[kt+20>>2];lt=q[kt+16>>2];jt=lt+4|0;if(jt>>>0<4){us=us+1|0}nt=jt;jt=us;if((it|0)<(us|0)?1:(it|0)<=(us|0)?t[kt+8>>2]>=nt>>>0?0:1:0){break f}us=lt+q[kt>>2]|0;us=r[us|0]|r[us+1|0]<<8|(r[us+2|0]<<16|r[us+3|0]<<24);q[mt>>2]=us;q[kt+16>>2]=nt;q[kt+20>>2]=jt;q[a+132>>2]=us;break g}if(!oi(1,mt,kt)){break f}gt=q[a+4>>2];ht=r[gt+36|0];q[a+132>>2]=q[mt>>2]}gt=q[gt+32>>2];h:{i:{j:{if((ht&255)>>>0<=1){ht=0;kt=q[gt+12>>2];us=q[gt+20>>2];it=q[gt+16>>2];jt=it+4|0;if(jt>>>0<4){us=us+1|0}lt=jt;jt=us;if((kt|0)<(us|0)?1:(kt|0)<=(us|0)?t[gt+8>>2]>=lt>>>0?0:1:0){break a}us=it+q[gt>>2]|0;us=r[us|0]|r[us+1|0]<<8|(r[us+2|0]<<16|r[us+3|0]<<24);q[mt+60>>2]=us;q[gt+16>>2]=lt;q[gt+20>>2]=jt;q[a+156>>2]=us;pt=a+156|0;break j}ht=0;if(!oi(1,mt+60|0,gt)){break a}us=q[a+4>>2];gt=q[us+32>>2];us=r[us+36|0];q[a+156>>2]=q[mt+60>>2];pt=a+156|0;if(us>>>0>1){break i}}kt=q[gt+12>>2];us=q[gt+20>>2];it=q[gt+16>>2];jt=it+4|0;if(jt>>>0<4){us=us+1|0}nt=jt;jt=us;if((kt|0)<(us|0)?1:(kt|0)<=(us|0)?t[gt+8>>2]>=nt>>>0?0:1:0){break a}us=it+q[gt>>2]|0;lt=r[us|0]|r[us+1|0]<<8|(r[us+2|0]<<16|r[us+3|0]<<24);q[mt+56>>2]=lt;q[gt+16>>2]=nt;q[gt+20>>2]=jt;break h}if(!oi(1,mt+56|0,gt)){break a}lt=q[mt+56>>2]}if(lt>>>0>1431655765|t[pt>>2]>w(lt,3)>>>0){break a}qt=q[a+4>>2];jt=q[qt+32>>2];rt=q[jt+8>>2];ot=q[jt+16>>2];kt=q[jt+12>>2];us=kt;gt=q[jt+20>>2];if((us|0)<(gt|0)?1:(us|0)<=(gt|0)?rt>>>0>ot>>>0?0:1:0){break a}tt=q[jt>>2];nt=r[tt+ot|0];us=gt;st=ot+1|0;if(st>>>0<1){us=us+1|0}q[jt+16>>2]=st;q[jt+20>>2]=us;k:{if(r[qt+36|0]<=1){us=gt;gt=ot+5|0;if(gt>>>0<5){us=us+1|0}it=gt;gt=us;if((kt|0)<(us|0)?1:(kt|0)<=(us|0)?rt>>>0>=it>>>0?0:1:0){break a}us=st+tt|0;kt=r[us|0]|r[us+1|0]<<8|(r[us+2|0]<<16|r[us+3|0]<<24);q[mt+52>>2]=kt;q[jt+16>>2]=it;q[jt+20>>2]=gt;break k}if(!oi(1,mt+52|0,jt)){break a}kt=q[mt+52>>2]}if(lt>>>0>>0|lt>>>0>((kt>>>0)/3|0)+kt>>>0){break a}us=q[a+4>>2];jt=q[us+32>>2];l:{if(r[us+36|0]<=1){it=q[jt+12>>2];us=q[jt+20>>2];ot=q[jt+16>>2];gt=ot+4|0;if(gt>>>0<4){us=us+1|0}qt=gt;gt=us;if((it|0)<(us|0)?1:(it|0)<=(us|0)?t[jt+8>>2]>=qt>>>0?0:1:0){break a}us=ot+q[jt>>2]|0;ot=r[us|0]|r[us+1|0]<<8|(r[us+2|0]<<16|r[us+3|0]<<24);q[mt+48>>2]=ot;q[jt+16>>2]=qt;q[jt+20>>2]=gt;break l}if(!oi(1,mt+48|0,jt)){break a}ot=q[mt+48>>2]}if(ot>>>0>kt>>>0){break a}q[a+28>>2]=q[a+24>>2];gt=Mm(88);jk(gt);us=q[a+8>>2];q[a+8>>2]=gt;jt=a+8|0;if(us){wa(jt,us);if(!q[jt>>2]){break a}}us=q[a+160>>2];q[a+164>>2]=us;m:{if(q[a+168>>2]-us>>2>>>0>=lt>>>0){break m}if(lt>>>0>=1073741824){break e}ht=lt<<2;gt=Mm(ht);q[a+164>>2]=gt;q[a+160>>2]=gt;q[a+168>>2]=gt+ht;if(!us){break m}An(us)}us=q[a+172>>2];q[a+176>>2]=us;n:{if(q[a+180>>2]-us>>2>>>0>=lt>>>0){break n}if(lt>>>0>=1073741824){break d}ht=lt<<2;gt=Mm(ht);q[a+176>>2]=gt;q[a+172>>2]=gt;q[a+180>>2]=gt+ht;if(!us){break n}An(us)}q[a+92>>2]=-1;q[a+84>>2]=-1;q[a+88>>2]=-1;q[a+40>>2]=q[a+36>>2];q[a- -64>>2]=0;q[a+52>>2]=q[a+48>>2];q[a+76>>2]=q[a+72>>2];qt=a+216|0;gt=q[a+220>>2];ht=q[a+216>>2];if((gt|0)==(ht|0)){break c}while(1){us=q[gt+ -12>>2];if(us){q[gt+ -8>>2]=us;An(us)}us=q[gt+ -28>>2];if(us){q[gt+ -24>>2]=us;An(us)}us=gt+ -144|0;it=q[gt+ -40>>2];if(it){q[gt+ -36>>2]=it;An(it)}pi(gt+ -140|0);gt=us;if((ht|0)!=(us|0)){continue}break}us=q[qt>>2];break b}ht=0;break a}ab(12024);F()}ab(12024);F()}us=ht}q[a+220>>2]=ht;gt=(ht-us|0)/144|0;o:{if(gt>>>0>>0){qi(qt,nt-gt|0);break o}if(gt>>>0<=nt>>>0){break o}gt=us+w(nt,144)|0;if((gt|0)!=(ht|0)){while(1){us=q[ht+ -12>>2];if(us){q[ht+ -8>>2]=us;An(us)}us=q[ht+ -28>>2];if(us){q[ht+ -24>>2]=us;An(us)}us=ht+ -144|0;it=q[ht+ -40>>2];if(it){q[ht+ -36>>2]=it;An(it)}pi(ht+ -140|0);ht=us;if((us|0)!=(gt|0)){continue}break}}q[a+220>>2]=gt}ht=0;if(!tk(q[jt>>2],lt,q[pt>>2]+ot|0)){break a}us=q[a+156>>2];o[mt|0]=1;bb(a+120|0,us+ot|0,mt);gt=q[a+4>>2];us=s[gt+36>>1];us=(us<<24|us<<8&16711680)>>>16;p:{if(us>>>0<=513){it=q[gt+32>>2];q:{if(us>>>0<=511){lt=q[it+12>>2];us=q[it+20>>2];pt=q[it+16>>2];gt=pt+4|0;if(gt>>>0<4){us=us+1|0}rt=gt;gt=us;if((lt|0)<(us|0)?1:(lt|0)<=(us|0)?t[it+8>>2]>=rt>>>0?0:1:0){break a}us=pt+q[it>>2]|0;lt=r[us|0]|r[us+1|0]<<8|(r[us+2|0]<<16|r[us+3|0]<<24);q[mt+44>>2]=lt;q[it+16>>2]=rt;q[it+20>>2]=gt;break q}if(!oi(1,mt+44|0,it)){break a}lt=q[mt+44>>2]}if(!lt){break a}us=q[q[a+4>>2]+32>>2];gt=q[us+8>>2];it=q[us+16>>2];us=q[us+12>>2]-(q[us+20>>2]+(gt>>>0>>0)|0)|0;if((us|0)<0?1:(us|0)<=0?gt-it>>>0>=lt>>>0?0:1:0){break a}it=Yj(mt);gt=q[q[a+4>>2]+32>>2];us=q[gt+16>>2];pt=q[gt+8>>2];Zj(it,(us+q[gt>>2]|0)+lt|0,(pt-us|0)-lt|0,s[gt+38>>1]);gt=ri(a,it);if((gt|0)==-1){break a}us=gt;it=us>>31;break p}us=-1;it=-1;if((ri(a,q[gt+32>>2])|0)==-1){break a}}q[a+376>>2]=a;pt=a+232|0;gt=q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2];rt=q[gt>>2]+q[gt+16>>2]|0;lt=q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2];gt=q[lt+8>>2];ht=q[lt+16>>2];Zj(pt,rt,gt-ht|0,s[q[(n[q[q[a>>2]+32>>2]](a)|0)+32>>2]+38>>1]);ut=a,vt=n[q[q[a>>2]+36>>2]](a)|0,q[ut+380>>2]=vt;q[a+372>>2]=nt;q[a+384>>2]=q[a+156>>2]+ot;ht=0;gt=Yj(mt);r:{if(!Li(pt,gt)){break r}lt=Mi(a,kt);if((lt|0)==-1){break r}kt=q[q[a+4>>2]+32>>2];ht=q[gt+16>>2];nt=ht+q[gt>>2]|0;gt=q[gt+8>>2];Zj(kt,nt,gt-ht|0,s[kt+38>>1]);gt=q[a+4>>2];ht=s[gt+36>>1];kt=(ht<<24|ht<<8&16711680)>>>16;if(kt>>>0<=513){ht=q[gt+32>>2];nt=ht;rt=ht;gt=it+q[ht+20>>2]|0;ht=us+q[ht+16>>2]|0;if(ht>>>0>>0){gt=gt+1|0}q[rt+16>>2]=ht;q[nt+20>>2]=gt}s:{if(q[a+220>>2]==q[a+216>>2]){break s}gt=q[jt>>2];us=q[gt+4>>2];gt=q[gt>>2];t:{if(kt>>>0>=513){if((us|0)==(gt|0)){break s}gt=0;break t}if((us|0)==(gt|0)){break s}gt=0;while(1){if(ui(a,gt)){gt=gt+3|0;us=q[jt>>2];if(gt>>>0>2]-q[us>>2]>>2>>>0){continue}break s}break}ht=0;break r}while(1){if(vi(a,gt)){gt=gt+3|0;us=q[jt>>2];if(gt>>>0>2]-q[us>>2]>>2>>>0){continue}break s}break}ht=0;break r}if(r[a+308|0]){ak(a+272|0)}if(s[a+270>>1]<=513){ak(a+328|0)}gt=q[a+216>>2];it=a+220|0;if((gt|0)!=q[it>>2]){kt=0;while(1){us=w(kt,144);Ek((us+gt|0)+4|0,q[jt>>2]);ht=q[qt>>2];nt=us+ht|0;gt=q[nt+132>>2];nt=q[nt+136>>2];if((gt|0)!=(nt|0)){while(1){Gk((us+ht|0)+4|0,q[gt>>2]);ht=q[qt>>2];gt=gt+4|0;if((nt|0)!=(gt|0)){continue}break}}Fk((us+ht|0)+4|0);kt=kt+1|0;gt=q[a+216>>2];if(kt>>>0<(q[it>>2]-gt|0)/144>>>0){continue}break}}us=q[a+8>>2];wi(a+184|0,q[us+28>>2]-q[us+24>>2]>>2);ht=q[a+216>>2];if((ht|0)!=q[it>>2]){gt=0;kt=a+220|0;while(1){us=w(gt,144)+ht|0;ht=q[us+60>>2]-q[us+56>>2]>>2;nt=us+104|0;us=q[jt>>2];us=q[us+28>>2]-q[us+24>>2]>>2;wi(nt,(ht|0)<(us|0)?us:ht);gt=gt+1|0;ht=q[a+216>>2];if(gt>>>0<(q[kt>>2]-ht|0)/144>>>0){continue}break}}ht=xi(a,lt)}}T=mt- -64|0;return ht|0}function Li(a,wt){var xt=0,yt=0,zt=0,At=0,Bt=0,Ct=0,Dt=0,Et=0,Ft=0,Gt=0,Ht=0,It=0;Et=T-16|0;T=Et;xt=q[a+144>>2];xt=s[(n[q[q[xt>>2]+32>>2]](xt)|0)+36>>1];a:{if((xt<<24|xt<<8&16711680)>>>16>>>0<=513){xt=q[a+4>>2];q[a+40>>2]=q[a>>2];q[a+44>>2]=xt;zt=a+32|0;xt=zt;yt=q[xt+4>>2];q[a+72>>2]=q[xt>>2];q[a+76>>2]=yt;yt=q[a+28>>2];xt=a- -64|0;q[xt>>2]=q[a+24>>2];q[xt+4>>2]=yt;xt=q[a+20>>2];q[a+56>>2]=q[a+16>>2];q[a+60>>2]=xt;xt=q[a+12>>2];q[a+48>>2]=q[a+8>>2];q[a+52>>2]=xt;b:{xt=a+40|0;if(_j(xt,1,Et+8|0)){yt=q[xt+4>>2];q[a>>2]=q[xt>>2];q[a+4>>2]=yt;yt=q[xt+36>>2];q[zt>>2]=q[xt+32>>2];q[zt+4>>2]=yt;zt=q[xt+28>>2];q[a+24>>2]=q[xt+24>>2];q[a+28>>2]=zt;yt=q[xt+20>>2];Bt=yt;zt=q[xt+16>>2];q[a+16>>2]=zt;q[a+20>>2]=yt;yt=q[xt+12>>2];xt=q[xt+8>>2];q[a+8>>2]=xt;q[a+12>>2]=yt;Ct=xt-zt|0;Dt=q[Et+12>>2];xt=yt-((xt>>>0>>0)+Bt|0)|0;yt=q[Et+8>>2];if((Dt|0)==(xt|0)&yt>>>0<=Ct>>>0|Dt>>>0>>0){break b}}At=0;break a}xt=Bt+Dt|0;zt=zt+yt|0;if(zt>>>0>>0){xt=xt+1|0}q[a+16>>2]=zt;q[a+20>>2]=xt}c:{if(s[a+38>>1]<=513){xt=q[a+4>>2];q[a+96>>2]=q[a>>2];q[a+100>>2]=xt;zt=a+32|0;xt=zt;yt=q[xt+4>>2];q[a+128>>2]=q[xt>>2];q[a+132>>2]=yt;yt=a+24|0;xt=yt;At=q[xt+4>>2];q[a+120>>2]=q[xt>>2];q[a+124>>2]=At;At=a+16|0;xt=At;Bt=q[xt+4>>2];q[a+112>>2]=q[xt>>2];q[a+116>>2]=Bt;Bt=a+8|0;xt=Bt;Ct=q[xt+4>>2];q[a+104>>2]=q[xt>>2];q[a+108>>2]=Ct;d:{xt=a+96|0;if(_j(xt,1,Et+8|0)){Ct=q[xt+4>>2];q[a>>2]=q[xt>>2];q[a+4>>2]=Ct;Ct=q[xt+36>>2];q[zt>>2]=q[xt+32>>2];q[zt+4>>2]=Ct;zt=q[xt+28>>2];q[yt>>2]=q[xt+24>>2];q[yt+4>>2]=zt;yt=q[xt+20>>2];Ct=yt;zt=q[xt+16>>2];q[At>>2]=zt;q[At+4>>2]=yt;yt=q[xt+12>>2];xt=q[xt+8>>2];q[Bt>>2]=xt;q[Bt+4>>2]=yt;Bt=xt-zt|0;Dt=q[Et+12>>2];yt=yt-((xt>>>0>>0)+Ct|0)|0;xt=q[Et+8>>2];if((Dt|0)==(yt|0)&xt>>>0<=Bt>>>0|Dt>>>0>>0){break d}}At=0;break a}At=Ct+Dt|0;zt=xt+zt|0;if(zt>>>0>>0){At=At+1|0}q[a+16>>2]=zt;q[a+20>>2]=At;break c}At=0;if(!bh(a+80|0,a)){break a}}At=0;if(!Ai(a)){break a}xt=q[a+4>>2];q[wt>>2]=q[a>>2];q[wt+4>>2]=xt;xt=q[a+36>>2];q[wt+32>>2]=q[a+32>>2];q[wt+36>>2]=xt;xt=q[a+28>>2];q[wt+24>>2]=q[a+24>>2];q[wt+28>>2]=xt;xt=q[a+20>>2];q[wt+16>>2]=q[a+16>>2];q[wt+20>>2]=xt;xt=q[a+12>>2];q[wt+8>>2]=q[a+8>>2];q[wt+12>>2]=xt;xt=q[a+144>>2];xt=s[(n[q[q[xt>>2]+32>>2]](xt)|0)+36>>1];e:{if((xt<<24|xt<<8&16711680)>>>16>>>0<=513){xt=q[a+144>>2];f:{if(r[(n[q[q[xt>>2]+32>>2]](xt)|0)+36|0]<=1){yt=q[wt+12>>2];xt=q[wt+20>>2];Bt=q[wt+16>>2];zt=Bt+4|0;if(zt>>>0<4){xt=xt+1|0}Ct=zt;zt=xt;if((yt|0)<(xt|0)?1:(yt|0)<=(xt|0)?t[wt+8>>2]>=Ct>>>0?0:1:0){break a}xt=Bt+q[wt>>2]|0;yt=r[xt|0]|r[xt+1|0]<<8|(r[xt+2|0]<<16|r[xt+3|0]<<24);q[Et+8>>2]=yt;q[wt+16>>2]=Ct;q[wt+20>>2]=zt;break f}if(!oi(1,Et+8|0,wt)){break a}yt=q[Et+8>>2]}xt=q[a+152>>2];if(yt>>>0>=xt>>>0){break a}Bt=q[wt+16>>2];yt=q[wt+12>>2];zt=q[wt+20>>2];if((yt|0)<(zt|0)?1:(yt|0)<=(zt|0)?t[wt+8>>2]>Bt>>>0?0:1:0){break a}Ct=r[Bt+q[wt>>2]|0];Bt=Bt+1|0;if(Bt>>>0<1){zt=zt+1|0}yt=wt;q[yt+16>>2]=Bt;q[yt+20>>2]=zt;if(Ct){break a}q[a+176>>2]=2;q[a+180>>2]=7;break e}q[a+176>>2]=2;q[a+180>>2]=7;xt=q[a+152>>2]}if((xt|0)<0){break a}q[Et+8>>2]=0;At=2;Bt=q[a+156>>2];yt=q[a+160>>2]-Bt>>2;g:{if(xt>>>0>yt>>>0){Ad(a+156|0,xt-yt|0,Et+8|0);At=q[a+176>>2];zt=q[a+180>>2];break g}zt=7;if(xt>>>0>=yt>>>0){break g}q[a+160>>2]=Bt+(xt<<2)}Bt=a+184|0;zt=(zt-At|0)+1|0;At=a+188|0;xt=q[At>>2];Ct=q[a+184>>2];yt=(xt-Ct|0)/12|0;h:{if(zt>>>0>yt>>>0){Ni(Bt,zt-yt|0);zt=q[At>>2];break h}if(zt>>>0>=yt>>>0){zt=xt;break h}zt=Ct+w(zt,12)|0;if((zt|0)!=(xt|0)){while(1){yt=xt+ -12|0;At=q[yt>>2];if(At){q[xt+ -8>>2]=At;An(At)}xt=yt;if((xt|0)!=(zt|0)){continue}break}}q[a+188>>2]=zt}Ct=a+196|0;xt=q[a+184>>2];yt=(zt-xt|0)/12|0;Dt=q[a+196>>2];At=q[a+200>>2]-Dt>>2;i:{if(yt>>>0>At>>>0){Fa(Ct,yt-At|0);zt=q[a+188>>2];xt=q[a+184>>2];break i}if(yt>>>0>=At>>>0){break i}q[a+200>>2]=Dt+(yt<<2)}At=1;if((xt|0)==(zt|0)){break a}xt=0;It=a+188|0;while(1){oi(1,Et+8|0,wt);zt=q[Et+8>>2];if(zt){yt=q[Bt>>2];Ft=w(xt,12);At=yt+Ft|0;Gt=At+4|0;Ht=q[At>>2];Dt=q[Gt>>2]-Ht>>2;j:{if(zt>>>0>Dt>>>0){Fa(At,zt-Dt|0);yt=q[Bt>>2];break j}if(zt>>>0>=Dt>>>0){break j}q[Gt>>2]=(zt<<2)+Ht}qh(zt,1,wt,q[yt+Ft>>2]);q[q[Ct>>2]+(xt<<2)>>2]=zt}At=1;xt=xt+1|0;if(xt>>>0<(q[It>>2]-q[a+184>>2]|0)/12>>>0){continue}break}}T=Et+16|0;return At} - - - -function Mi(a,b){var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,p=0,u=0,v=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,G=0,H=0,I=0;g=T-96|0;T=g;q[g+72>>2]=0;q[g+64>>2]=0;q[g+68>>2]=0;q[g+48>>2]=0;q[g+52>>2]=0;q[g+40>>2]=0;q[g+44>>2]=0;q[g+56>>2]=1065353216;q[g+32>>2]=0;q[g+24>>2]=0;q[g+28>>2]=0;C=q[a+124>>2];a:{b:{c:{if((b|0)>=1){A=a+232|0;B=a+8|0;D=a+40|0;G=a+388|0;E=q[a+216>>2]!=q[a+220>>2];while(1){h=Oi(A);d:{if(!h){d=q[g+68>>2];if((d|0)==q[g+64>>2]){e=-1;break c}n=-1;u=q[B>>2];i=q[u+24>>2];f=i;h=d+ -4|0;v=q[h>>2];c=-1;e:{if((v|0)==-1){break e}e=v+1|0;e=(e>>>0)%3|0?e:v+ -2|0;c=-1;if((e|0)==-1){break e}c=q[q[u>>2]+(e<<2)>>2]}f=q[f+(c<<2)>>2];if((f|0)!=-1){e=f+1|0;n=(e>>>0)%3|0?e:f+ -2|0}f=q[u+12>>2];x=w(j,3);e=x+1|0;q[f+(v<<2)>>2]=e;e=e<<2;q[e+f>>2]=v;y=x+2|0;q[f+(n<<2)>>2]=y;k=y<<2;q[k+f>>2]=n;p=q[u>>2];q[p+(x<<2)>>2]=c;m=e+p|0;f=-1;f:{if((n|0)==-1){break f}e=n+1|0;e=(e>>>0)%3|0?e:n+ -2|0;f=-1;if((e|0)==-1){break f}f=q[p+(e<<2)>>2]}q[m>>2]=f;g:{h:{if((v|0)!=-1){e=v+((v>>>0)%3|0?-1:2)|0;if((e|0)!=-1){break h}}q[k+p>>2]=-1;break g}e=q[p+(e<<2)>>2];q[k+p>>2]=e;if((e|0)==-1){break g}q[i+(e<<2)>>2]=y}f=q[a+120>>2]+(c>>>3&536870908)|0;e=q[f>>2];H=f,I=eo(c)&e,q[H>>2]=I;q[h>>2]=x;c=0;break d}e=-1;d=h+ -1|0;if(d>>>0>6){break c}i:{j:{k:{l:{switch(d-1|0){case 1:case 3:f=q[g+68>>2];if((f|0)==q[g+64>>2]){break c}e=q[B>>2];c=q[e+12>>2];y=w(j,3);i=(h|0)==5;h=y+(i?2:1)|0;d=h<<2;p=q[f+ -4>>2];q[c+d>>2]=p;q[c+(p<<2)>>2]=h;f=e+24|0;m=q[e+32>>2];e=e+28|0;c=q[e>>2];m:{if((m|0)!=(c|0)){q[c>>2]=-1;u=c+4|0;q[e>>2]=u;break m}zi(f,11312);u=q[e>>2]}e=-1;c=q[B>>2];k=q[c+24>>2];if(q[c+28>>2]-k>>2>(C|0)){break c}e=y+2|0;x=q[c>>2];m=x+d|0;c=u-q[f>>2]|0;d=(c>>2)+ -1|0;q[m>>2]=d;if(c){q[k+(d<<2)>>2]=h}e=i?y:e;f=x+(i+y<<2)|0;n:{o:{p:{if((p|0)!=-1){d=p+((p>>>0)%3|0?-1:2)|0;if((d|0)==-1){break p}d=q[x+(d<<2)>>2];q[x+(e<<2)>>2]=d;if((d|0)==-1){break o}q[k+(d<<2)>>2]=e;break o}q[x+(e<<2)>>2]=-1;c=-1;break n}q[x+(e<<2)>>2]=-1}d=p+1|0;d=(d>>>0)%3|0?d:p+ -2|0;c=-1;if((d|0)==-1){break n}c=q[x+(d<<2)>>2]}q[f>>2]=c;d=q[g+68>>2];q[d+ -4>>2]=y;break k;default:d=q[g+68>>2];u=q[g+64>>2];if((d|0)==(u|0)){break c}c=d+ -4|0;z=q[c>>2];q[g+68>>2]=c;k=q[g+44>>2];q:{if(!k){d=c;break q}i=co(k)>>>0>1;r:{if(!i){f=k+2147483647&j;break r}f=j;if(f>>>0>>0){break r}f=(j>>>0)%(k>>>0)|0}h=q[q[g+40>>2]+(f<<2)>>2];if(!h){d=c;break q}l=q[h>>2];if(!l){d=c;break q}h=k+ -1|0;s:{while(1){n=q[l+4>>2];t:{if((j|0)!=(n|0)){u:{if(!i){n=h&n;break u}if(n>>>0>>0){break u}n=(n>>>0)%(k>>>0)|0}if((f|0)==(n|0)){break t}d=c;break q}if(q[l+8>>2]==(j|0)){break s}}l=q[l>>2];if(l){continue}break}d=c;break q}f=l+12|0;if((c|0)!=q[g+72>>2]){q[c>>2]=q[f>>2];q[g+68>>2]=d;break q}zi(g- -64|0,f);d=q[g+68>>2];u=q[g+64>>2]}if((d|0)==(u|0)){break c}p=q[d+ -4>>2];f=(p|0)==-1;v=q[B>>2];if(q[q[v+12>>2]+(p<<2)>>2]!=-1?!f:0){break c}i=(z|0)==-1;k=v+12|0;h=q[k>>2];if(q[h+(z<<2)>>2]!=-1?!i:0){break c}x=w(j,3);y=x+2|0;q[h+(p<<2)>>2]=y;u=y<<2;q[u+h>>2]=p;c=x+1|0;q[h+(z<<2)>>2]=c;m=h;h=c<<2;q[m+h>>2]=z;if(f){break j}n=-1;m=q[v>>2];f=m+(x<<2)|0;c=p+((p>>>0)%3|0?-1:2)|0;if((c|0)!=-1){n=q[(c<<2)+m>>2]}q[f>>2]=n;c=p+1|0;c=(c>>>0)%3|0?c:p+ -2|0;if((c|0)==-1){break i}e=q[(c<<2)+m>>2];break i;case 5:break l;case 0:case 2:case 4:break c}}q[g>>2]=w(j,3);d=q[B>>2];f=d+24|0;i=q[d+32>>2];c=d+28|0;d=q[c>>2];v:{if((i|0)!=(d|0)){q[d>>2]=-1;m=d+4|0;q[c>>2]=m;break v}zi(f,11312);m=q[c>>2]}u=q[B>>2];n=q[u>>2];d=q[g>>2];k=m-q[f>>2]|0;y=k>>2;c=y+ -1|0;q[n+(d<<2)>>2]=c;d=d+1|0;i=u+24|0;h=u+28|0;f=q[h>>2];w:{if((f|0)!=q[u+32>>2]){q[f>>2]=-1;m=f+4|0;q[h>>2]=m;break w}zi(i,11312);m=q[h>>2];n=q[u>>2]}q[(d<<2)+n>>2]=(m-q[i>>2]>>2)+ -1;d=q[g>>2]+2|0;i=q[B>>2];f=i+28|0;h=q[f>>2];x:{if((h|0)!=q[i+32>>2]){q[h>>2]=-1;n=h+4|0;q[f>>2]=n;break x}zi(i+24|0,11312);n=q[f>>2]}q[q[i>>2]+(d<<2)>>2]=(n-q[i+24>>2]>>2)+ -1;d=q[B>>2];f=q[d+24>>2];if(q[d+28>>2]-f>>2>(C|0)){break c}d=q[g>>2];y:{z:{if(!k){e=1;q[f+(y<<2)>>2]=d+1;break z}q[f+(c<<2)>>2]=d;e=0;if((k|0)==-4){break z}q[f+(y<<2)>>2]=q[g>>2]+1;e=y+1|0;if((e|0)==-1){break y}}q[f+(e<<2)>>2]=q[g>>2]+2}d=q[g+68>>2];if((d|0)!=q[g+72>>2]){q[d>>2]=q[g>>2];d=d+4|0;q[g+68>>2]=d;break k}zi(g- -64|0,g);d=q[g+68>>2]}c=1;break d}n=-1;m=q[v>>2];q[m+(x<<2)>>2]=-1}q[h+m>>2]=e;A:{B:{C:{if(!i){c=z+((z>>>0)%3|0?-1:2)|0;if((c|0)==-1){break C}c=q[(c<<2)+m>>2];q[u+m>>2]=c;if((c|0)==-1){break B}q[q[v+24>>2]+(c<<2)>>2]=y;break B}q[u+m>>2]=-1;l=-1;e=-1;break A}q[u+m>>2]=-1}l=-1;c=z+1|0;c=(c>>>0)%3|0?c:z+ -2|0;e=-1;if((c|0)==-1){break A}l=q[(c<<2)+m>>2];e=c}q[g>>2]=l;h=q[G>>2];f=n<<2;c=h+f|0;q[c>>2]=q[c>>2]+q[h+(l<<2)>>2];h=q[v+24>>2];if((n|0)!=-1){q[f+h>>2]=q[h+(q[g>>2]<<2)>>2]}D:{if((e|0)==-1){break D}f=q[v>>2];while(1){q[f+(e<<2)>>2]=n;c=e+1|0;c=(c>>>0)%3|0?c:e+ -2|0;if((c|0)==-1){break D}e=q[q[k>>2]+(c<<2)>>2];if((e|0)==-1){break D}c=e+1|0;e=(c>>>0)%3|0?c:e+ -2|0;if((e|0)!=-1){continue}break}}q[h+(q[g>>2]<<2)>>2]=-1;E:{if(E){break E}c=q[g+28>>2];if((c|0)!=q[g+32>>2]){q[c>>2]=q[g>>2];q[g+28>>2]=c+4;break E}zi(g+24|0,g);d=q[g+68>>2]}q[d+ -4>>2]=x;c=0}Pi(A,q[d+ -4>>2]);F:{if(!c){break F}d=q[D>>2];if((d|0)==q[a+36>>2]){break F}h=(j^-1)+b|0;while(1){e=-1;c=q[d+ -8>>2];if(c>>>0>h>>>0){break c}if((c|0)!=(h|0)){break F}c=r[d+ -4|0];d=d+ -12|0;f=q[d>>2];q[D>>2]=d;if((f|0)<0){break c}e=q[q[g+68>>2]+ -4>>2];q[g+20>>2]=(f^-1)+b;q[g+88>>2]=g+20;Bi(g,g+40|0,g+20|0,g+88|0);f=q[g>>2];G:{if(c&1){c=-1;if((e|0)==-1){break G}d=e+1|0;c=(d>>>0)%3|0?d:e+ -2|0;break G}c=-1;if((e|0)==-1){break G}c=e+ -1|0;if((e>>>0)%3){break G}c=e+2|0}q[f+12>>2]=c;d=q[D>>2];if((d|0)!=q[a+36>>2]){continue}break}}j=j+1|0;if((j|0)!=(b|0)){continue}break}h=b}e=-1;l=q[a+8>>2];if(q[l+28>>2]-q[l+24>>2]>>2>(C|0)){break c}d=q[g+68>>2];if((d|0)!=q[g+64>>2]){C=a+72|0;b=a+60|0;y=a+312|0;G=a+352|0;E=a+8|0;D=a+68|0;x=a+80|0;v=a+76|0;while(1){c=d+ -4|0;d=q[c>>2];q[g+68>>2]=c;q[g>>2]=d;H:{I:{J:{K:{if(s[a+270>>1]<=513){if(!r[a+364|0]){break J}c=q[a+360>>2];d=q[G>>2]+(c>>>3)|0;if(d>>>0>=t[a+356>>2]){break I}d=r[d|0];q[a+360>>2]=c+1;c=d>>>(c&7)&1;break K}c=dh(y)}if(!c){break I}}k=q[E>>2];z=q[k>>2];if((h|0)>=((q[k+4>>2]-z>>2>>>0)/3|0)){break c}j=-1;l=-1;i=q[k+24>>2];f=i;A=q[g>>2];d=-1;L:{if((A|0)==-1){break L}c=A+1|0;c=(c>>>0)%3|0?c:A+ -2|0;d=-1;if((c|0)==-1){break L}d=q[z+(c<<2)>>2]}f=q[f+(d<<2)>>2];M:{if((f|0)==-1){break M}c=f+1|0;c=(c>>>0)%3|0?c:f+ -2|0;if((c|0)==-1){break M}j=c+1|0;j=(j>>>0)%3|0?j:c+ -2|0;if((j|0)!=-1){l=q[z+(j<<2)>>2]}j=c}p=-1;m=-1;i=q[i+(l<<2)>>2];f=-1;N:{if((i|0)==-1){break N}c=i+1|0;c=(c>>>0)%3|0?c:i+ -2|0;f=-1;if((c|0)==-1){break N}f=c+1|0;f=(f>>>0)%3|0?f:c+ -2|0;if((f|0)!=-1){m=q[z+(f<<2)>>2]}f=c}c=w(h,3);q[g+88>>2]=c;i=q[k+12>>2];q[i+(c<<2)>>2]=A;q[i+(A<<2)>>2]=c;c=q[g+88>>2]+1|0;q[i+(c<<2)>>2]=j;q[i+(j<<2)>>2]=c;c=q[g+88>>2]+2|0;q[i+(c<<2)>>2]=f;q[i+(f<<2)>>2]=c;c=q[g+88>>2];q[z+(c<<2)>>2]=l;u=c+1|0;k=z+(u<<2)|0;q[k>>2]=m;i=c+2|0;f=z+(i<<2)|0;q[f>>2]=d;A=q[a+120>>2];j=u>>>0>>0?-1:l;c=A+(j>>>3&536870908)|0;d=q[c>>2];H=c,I=eo(j)&d,q[H>>2]=I;p=(u|0)!=-1?q[k>>2]:p;c=A+(p>>>3&536870908)|0;d=q[c>>2];H=c,I=eo(p)&d,q[H>>2]=I;d=-1;d=(i|0)!=-1?q[f>>2]:d;j=A+(d>>>3&536870908)|0;c=q[j>>2];H=j,I=eo(d)&c,q[H>>2]=I;d=q[a+64>>2];f=q[D>>2];if((d|0)==f<<5){if((d+1|0)<=-1){break a}c=b;if(d>>>0<=1073741822){j=d+32&-32;d=f<<6;d=d>>>0>>0?j:d}else{d=2147483647}cb(c,d);d=q[a+64>>2]}h=h+1|0;q[a+64>>2]=d+1;c=q[a+60>>2]+(d>>>3&536870908)|0;q[c>>2]=q[c>>2]|1<<(d&31);d=q[v>>2];if((d|0)!=q[x>>2]){q[d>>2]=q[g+88>>2];q[v>>2]=d+4;break H}zi(C,g+88|0);break H}d=q[a+64>>2];f=q[D>>2];if((d|0)==f<<5){if((d+1|0)<=-1){break a}c=b;if(d>>>0<=1073741822){j=d+32&-32;d=f<<6;d=d>>>0>>0?j:d}else{d=2147483647}cb(c,d);d=q[a+64>>2]}q[a+64>>2]=d+1;j=q[a+60>>2]+(d>>>3&536870908)|0;c=q[j>>2];H=j,I=eo(d)&c,q[H>>2]=I;d=q[v>>2];if((d|0)!=q[x>>2]){q[d>>2]=q[g>>2];q[v>>2]=d+4;break H}zi(C,g)}d=q[g+68>>2];if((d|0)!=q[g+64>>2]){continue}break}l=q[a+8>>2]}if(((q[l+4>>2]-q[l>>2]>>2>>>0)/3|0)!=(h|0)){break c}e=q[l+28>>2]-q[l+24>>2]>>2;b=q[g+24>>2];i=q[g+28>>2];if((b|0)==(i|0)){break b}f=a+8|0;while(1){k=q[b>>2];h=q[l+24>>2];d=e+ -1|0;O:{if(q[h+(d<<2)>>2]!=-1){j=e;break O}h=q[l+24>>2];while(1){d=e+ -2|0;j=e+ -1|0;e=j;if(q[(d<<2)+h>>2]==-1){continue}break}}if(d>>>0>=k>>>0){q[g>>2]=l;c=d<<2;e=q[c+h>>2];o[g+12|0]=1;q[g+8>>2]=e;q[g+4>>2]=e;if((e|0)!=-1){while(1){q[q[l>>2]+(e<<2)>>2]=k;lg(g);l=q[f>>2];e=q[g+8>>2];if((e|0)!=-1){continue}break}}e=c;c=q[l+24>>2];e=e+c|0;if((k|0)!=-1){q[c+(k<<2)>>2]=q[e>>2]}q[e>>2]=-1;E=1<<(k&31);e=q[a+120>>2];k=e+(k>>>3&536870908)|0;c=k;h=e+(d>>>3&536870908)|0;d=1<<(d&31);e=E|q[k>>2];P:{if(q[h>>2]&d){break P}e=q[k>>2]&(E^-1)}q[c>>2]=e;q[h>>2]=q[h>>2]&(d^-1);j=j+ -1|0}e=j;b=b+4|0;if((i|0)!=(b|0)){continue}break}}b=q[g+24>>2]}if(b){q[g+28>>2]=b;An(b)}d=q[g+48>>2];if(d){while(1){a=q[d>>2];An(d);d=a;if(d){continue}break}}a=q[g+40>>2];q[g+40>>2]=0;if(a){An(a)}a=q[g+64>>2];if(a){q[g+68>>2]=a;An(a)}T=g+96|0;return e}bn();F()}function Ni(a,b){var o=0,r=0,s=0,t=0,J=0,K=0,L=0,M=0,N=0;s=q[a+8>>2];t=a+4|0;o=q[t>>2];if((s-o|0)/12>>>0>=b>>>0){a=w(b,12);M=t,N=Dn(o,0,a)+a|0,q[M>>2]=N;return}a:{t=q[a>>2];r=(o-t|0)/12|0;J=r+b|0;if(J>>>0<357913942){L=w(r,12);s=(s-t|0)/12|0;r=s<<1;r=s>>>0<178956970?r>>>0>>0?J:r:357913941;if(r){if(r>>>0>=357913942){break a}K=Mm(w(r,12))}s=K+L|0;Dn(s,0,w(b,12));b=w(J,12)+K|0;J=w(r,12)+K|0;if((o|0)!=(t|0)){while(1){s=s+ -12|0;q[s>>2]=0;q[s+4>>2]=0;r=s+8|0;q[r>>2]=0;o=o+ -12|0;q[s>>2]=q[o>>2];q[s+4>>2]=q[o+4>>2];K=r;r=o+8|0;q[K>>2]=q[r>>2];q[r>>2]=0;q[o>>2]=0;q[o+4>>2]=0;if((o|0)!=(t|0)){continue}break}t=q[a>>2];o=q[a+4>>2]}q[a>>2]=s;q[a+8>>2]=J;q[a+4>>2]=b;if((o|0)!=(t|0)){while(1){a=o+ -12|0;b=q[a>>2];if(b){q[o+ -8>>2]=b;An(b)}o=a;if((o|0)!=(t|0)){continue}break}}if(t){An(t)}return}bn();F()}ab(12024);F()}function Oi(a){var b=0,F=0,O=0,P=0,Q=0,R=0,S=0;b=q[a+172>>2];if((b|0)!=-1){F=q[a+196>>2]+(b<<2)|0;O=q[F>>2];b=O+ -1|0;q[F>>2]=b;if((O|0)<1){return 9}F=a;a=q[(q[q[q[a+184>>2]+w(q[a+172>>2],12)>>2]+(b<<2)>>2]<<2)+12096>>2];q[F+168>>2]=a;return a}b=7;F=q[a+144>>2];F=s[(n[q[q[F>>2]+32>>2]](F)|0)+36>>1];a:{if((F<<24|F<<8&16711680)>>>16>>>0>513){break a}if(!r[a+76|0]){q[a+168>>2]=1;return 1}b=0;Q=q[a- -64>>2];O=q[a+72>>2];F=Q+(O>>>3)|0;R=q[a+68>>2];if(F>>>0>=R>>>0){break a}P=r[F|0];F=O+1|0;q[a+72>>2]=F;if(!(P>>>(O&7)&1)){break a}P=F>>>3;b=Q+P|0;b:{if(b>>>0>=R>>>0){b=F;F=0;break b}S=r[b|0];b=O+2|0;q[a+72>>2]=b;P=b>>>3;F=S>>>(F&7)&1}O=P+Q|0;if(O>>>0>>0){O=r[O|0];q[a+72>>2]=b+1;b=O>>>(b&7)<<1&2}else{b=0}b=(F|b)<<1|1}q[a+168>>2]=b;return b}function Pi(a,w){var T=0,U=0,V=0,W=0,X=0;W=-1;U=-1;a:{if((w|0)==-1){break a}U=w+1|0;W=(U>>>0)%3|0?U:w+ -2|0;U=w+ -1|0;if((w>>>0)%3){break a}U=w+2|0}T=q[a+168>>2];b:{if(T>>>0>7){break b}c:{d:{switch(T-2|0){default:T=q[a+148>>2];V=1;w=q[a+156>>2];X=w+(((W|0)!=-1?q[q[T>>2]+(W<<2)>>2]:-1)<<2)|0;q[X>>2]=q[X>>2]+1;w=(((U|0)!=-1?q[q[T>>2]+(U<<2)>>2]:-1)<<2)+w|0;break c;case 3:V=q[a+148>>2];T=-1;T=((w|0)!=-1?q[q[V>>2]+(w<<2)>>2]:T)<<2;w=q[a+156>>2];T=T+w|0;q[T>>2]=q[T>>2]+1;T=(((W|0)!=-1?q[q[V>>2]+(W<<2)>>2]:-1)<<2)+w|0;q[T>>2]=q[T>>2]+1;T=-1;T=(U|0)!=-1?q[q[V>>2]+(U<<2)>>2]:T;V=2;w=w+(T<<2)|0;break c;case 1:V=q[a+148>>2];T=-1;T=((w|0)!=-1?q[q[V>>2]+(w<<2)>>2]:T)<<2;w=q[a+156>>2];T=T+w|0;q[T>>2]=q[T>>2]+1;T=(((W|0)!=-1?q[q[V>>2]+(W<<2)>>2]:-1)<<2)+w|0;q[T>>2]=q[T>>2]+2;w=(((U|0)!=-1?q[q[V>>2]+(U<<2)>>2]:-1)<<2)+w|0;V=1;break c;case 0:case 2:case 4:break b;case 5:break d}}V=q[a+148>>2];T=-1;T=((w|0)!=-1?q[q[V>>2]+(w<<2)>>2]:T)<<2;w=q[a+156>>2];T=T+w|0;q[T>>2]=q[T>>2]+2;T=(((W|0)!=-1?q[q[V>>2]+(W<<2)>>2]:-1)<<2)+w|0;q[T>>2]=q[T>>2]+2;T=-1;T=(U|0)!=-1?q[q[V>>2]+(U<<2)>>2]:T;V=2;w=w+(T<<2)|0}q[w>>2]=q[w>>2]+V}T=-1;T=(W|0)!=-1?q[q[q[a+148>>2]>>2]+(W<<2)>>2]:T;W=q[a+176>>2];w=W;U=a;T=q[q[a+156>>2]+(T<<2)>>2];if((T|0)>=(w|0)){a=q[a+180>>2];w=(T|0)>(a|0)?a:T}q[U+172>>2]=w-W}function Qi(a){a=a|0;var w=0,Y=0,Z=0,_=0,$=0;q[a>>2]=11272;w=a+368|0;Z=q[w>>2];q[w>>2]=0;if(Z){Y=Z+ -4|0;w=q[Y>>2];if(w){w=Z+(w<<4)|0;while(1){w=w+ -16|0;if((Z|0)!=(w|0)){continue}break}}An(Y)}Z=q[a+216>>2];if(Z){$=a+220|0;w=q[$>>2];Y=Z;a:{if((Z|0)==(w|0)){break a}while(1){Y=q[w+ -12>>2];if(Y){q[w+ -8>>2]=Y;An(Y)}Y=q[w+ -28>>2];if(Y){q[w+ -24>>2]=Y;An(Y)}Y=w+ -144|0;_=q[w+ -40>>2];if(_){q[w+ -36>>2]=_;An(_)}pi(w+ -140|0);w=Y;if((Z|0)!=(w|0)){continue}break}Y=q[a+216>>2]}q[$>>2]=Z;An(Y)}w=q[a+196>>2];if(w){q[a+200>>2]=w;An(w)}w=q[a+184>>2];if(w){q[a+188>>2]=w;An(w)}w=q[a+172>>2];if(w){q[a+176>>2]=w;An(w)}w=q[a+160>>2];if(w){q[a+164>>2]=w;An(w)}w=q[a+144>>2];if(w){while(1){Z=q[w>>2];An(w);w=Z;if(w){continue}break}}Z=a+136|0;w=q[Z>>2];q[Z>>2]=0;if(w){An(w)}w=q[a+120>>2];if(w){An(w)}w=q[a+108>>2];if(w){An(w)}w=q[a+96>>2];if(w){An(w)}w=q[a+72>>2];if(w){q[a+76>>2]=w;An(w)}w=q[a+60>>2];if(w){An(w)}w=q[a+48>>2];if(w){q[a+52>>2]=w;An(w)}w=q[a+36>>2];if(w){q[a+40>>2]=w;An(w)}w=q[a+24>>2];if(w){q[a+28>>2]=w;An(w)}w=q[a+12>>2];if(w){q[a+16>>2]=w;An(w)}w=q[a+8>>2];q[a+8>>2]=0;if(w){wa(a+8|0,w)}return a|0}function Ri(a){a=a|0;An(Qi(a))}function Si(a){a=a|0;var aa=0,ba=0,ca=0,da=0,ea=0;q[a>>2]=11324;aa=q[a+388>>2];if(aa){q[a+392>>2]=aa;An(aa)}aa=a+368|0;ca=q[aa>>2];q[aa>>2]=0;if(ca){ba=ca+ -4|0;aa=q[ba>>2];if(aa){aa=ca+(aa<<4)|0;while(1){aa=aa+ -16|0;if((ca|0)!=(aa|0)){continue}break}}An(ba)}ca=q[a+216>>2];if(ca){ea=a+220|0;aa=q[ea>>2];ba=ca;a:{if((ca|0)==(aa|0)){break a}while(1){ba=q[aa+ -12>>2];if(ba){q[aa+ -8>>2]=ba;An(ba)}ba=q[aa+ -28>>2];if(ba){q[aa+ -24>>2]=ba;An(ba)}ba=aa+ -144|0;da=q[aa+ -40>>2];if(da){q[aa+ -36>>2]=da;An(da)}pi(aa+ -140|0);aa=ba;if((ca|0)!=(aa|0)){continue}break}ba=q[a+216>>2]}q[ea>>2]=ca;An(ba)}aa=q[a+196>>2];if(aa){q[a+200>>2]=aa;An(aa)}aa=q[a+184>>2];if(aa){q[a+188>>2]=aa;An(aa)}aa=q[a+172>>2];if(aa){q[a+176>>2]=aa;An(aa)}aa=q[a+160>>2];if(aa){q[a+164>>2]=aa;An(aa)}aa=q[a+144>>2];if(aa){while(1){ca=q[aa>>2];An(aa);aa=ca;if(aa){continue}break}}ca=a+136|0;aa=q[ca>>2];q[ca>>2]=0;if(aa){An(aa)}aa=q[a+120>>2];if(aa){An(aa)}aa=q[a+108>>2];if(aa){An(aa)}aa=q[a+96>>2];if(aa){An(aa)}aa=q[a+72>>2];if(aa){q[a+76>>2]=aa;An(aa)}aa=q[a+60>>2];if(aa){An(aa)}aa=q[a+48>>2];if(aa){q[a+52>>2]=aa;An(aa)}aa=q[a+36>>2];if(aa){q[a+40>>2]=aa;An(aa)}aa=q[a+24>>2];if(aa){q[a+28>>2]=aa;An(aa)}aa=q[a+12>>2];if(aa){q[a+16>>2]=aa;An(aa)}aa=q[a+8>>2];q[a+8>>2]=0;if(aa){wa(a+8|0,aa)}return a|0}function Ti(a){a=a|0;An(Si(a))}function Ui(a){a=a|0;var fa=0,ga=0,ha=0,ia=0,ja=0;q[a>>2]=11372;Vi(a+232|0);ia=q[a+216>>2];if(ia){ga=ia;ja=a+220|0;fa=q[ja>>2];ha=ga;a:{if((ga|0)==(fa|0)){break a}while(1){ga=q[fa+ -12>>2];if(ga){q[fa+ -8>>2]=ga;An(ga)}ga=q[fa+ -28>>2];if(ga){q[fa+ -24>>2]=ga;An(ga)}ga=fa+ -144|0;ha=q[fa+ -40>>2];if(ha){q[fa+ -36>>2]=ha;An(ha)}pi(fa+ -140|0);fa=ga;if((ia|0)!=(fa|0)){continue}break}ha=q[a+216>>2]}ga=ha;q[ja>>2]=ia;An(ga)}fa=q[a+196>>2];if(fa){q[a+200>>2]=fa;An(fa)}fa=q[a+184>>2];if(fa){q[a+188>>2]=fa;An(fa)}fa=q[a+172>>2];if(fa){q[a+176>>2]=fa;An(fa)}fa=q[a+160>>2];if(fa){q[a+164>>2]=fa;An(fa)}fa=q[a+144>>2];if(fa){while(1){ga=q[fa>>2];An(fa);fa=ga;if(fa){continue}break}}fa=a+136|0;ga=q[fa>>2];q[fa>>2]=0;if(ga){An(ga)}fa=q[a+120>>2];if(fa){An(fa)}fa=q[a+108>>2];if(fa){An(fa)}fa=q[a+96>>2];if(fa){An(fa)}fa=q[a+72>>2];if(fa){q[a+76>>2]=fa;An(fa)}fa=q[a+60>>2];if(fa){An(fa)}fa=q[a+48>>2];if(fa){q[a+52>>2]=fa;An(fa)}fa=q[a+36>>2];if(fa){q[a+40>>2]=fa;An(fa)}fa=q[a+24>>2];if(fa){q[a+28>>2]=fa;An(fa)}fa=q[a+12>>2];if(fa){q[a+16>>2]=fa;An(fa)}fa=q[a+8>>2];q[a+8>>2]=0;if(fa){wa(a+8|0,fa)}return a|0}function Vi(a){var ka=0,la=0,ma=0,na=0,oa=0;ka=q[a+196>>2];if(ka){q[a+200>>2]=ka;An(ka)}ka=q[a+184>>2];if(ka){oa=a+188|0;la=q[oa>>2];ma=ka;a:{if((ka|0)==(la|0)){break a}while(1){ma=la+ -12|0;na=q[ma>>2];if(na){q[la+ -8>>2]=na;An(na)}la=ma;if((la|0)!=(ka|0)){continue}break}ma=q[a+184>>2]}q[oa>>2]=ka;An(ma)}ka=q[a+156>>2];if(ka){q[a+160>>2]=ka;An(ka)}ka=a+136|0;a=q[ka>>2];q[ka>>2]=0;if(a){la=a+ -4|0;ka=q[la>>2];if(ka){ka=a+(ka<<4)|0;while(1){ka=ka+ -16|0;if((a|0)!=(ka|0)){continue}break}}An(la)}}function Wi(a){a=a|0;An(Ui(a))}function Xi(a){a=a|0;var pa=0;q[a>>2]=11760;pa=q[a+48>>2];if(pa){q[a+52>>2]=pa;An(pa)}q[a>>2]=12012;pa=q[a+36>>2];if(pa){An(pa)}pa=q[a+24>>2];if(pa){An(pa)}An(a)}function Yi(a){a=a|0;var qa=0;q[a>>2]=12012;qa=q[a+36>>2];if(qa){An(qa)}qa=q[a+24>>2];if(qa){An(qa)}return a|0}function Zi(a){a=a|0;var ra=0;q[a>>2]=12012;ra=q[a+36>>2];if(ra){An(ra)}ra=q[a+24>>2];if(ra){An(ra)}An(a)}function _i(a,sa,ta){a=a|0;sa=sa|0;ta=ta|0;var ua=0,va=0;ua=T-16|0;T=ua;q[a+4>>2]=sa;va=q[sa+4>>2];sa=q[sa>>2];o[ua+15|0]=0;bb(a+24|0,(va-sa>>2>>>0)/3|0,ua+15|0);sa=q[a+4>>2];va=q[sa+28>>2];sa=q[sa+24>>2];o[ua+14|0]=0;bb(a+36|0,va-sa>>2,ua+14|0);sa=q[ta+12>>2];q[a+16>>2]=q[ta+8>>2];q[a+20>>2]=sa;sa=q[ta+4>>2];q[a+8>>2]=q[ta>>2];q[a+12>>2]=sa;T=ua+16|0}function $i(a,sa){var ta=0,wa=0,xa=0;a:{if((a|0)!=(sa|0)){xa=a;ta=q[sa+4>>2];wa=0;b:{if(!ta){break b}c:{if(ta>>>0<=q[a+8>>2]<<5>>>0){wa=q[a>>2];break c}wa=q[a>>2];if(wa){An(wa);q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;ta=q[sa+4>>2]}if((ta|0)<=-1){break a}ta=(ta+ -1>>>5)+1|0;wa=Mm(ta<<2);q[a+8>>2]=ta;q[a+4>>2]=0;q[a>>2]=wa;ta=q[sa+4>>2]}En(wa,q[sa>>2],(ta+ -1>>>3&536870908)+4|0);wa=q[sa+4>>2]}q[xa+4>>2]=wa}return}bn();F()}function aj(a){a=a|0;var sa=0;q[a>>2]=12336;sa=q[a+88>>2];if(sa){q[a+92>>2]=sa;An(sa)}sa=q[a+72>>2];if(sa){q[a+76>>2]=sa;An(sa)}sa=q[a+60>>2];if(sa){q[a- -64>>2]=sa;An(sa)}sa=q[a+48>>2];if(sa){q[a+52>>2]=sa;An(sa)}q[a>>2]=12572;sa=q[a+36>>2];if(sa){An(sa)}sa=q[a+24>>2];if(sa){An(sa)}return a|0}function bj(a){a=a|0;var ya=0;q[a>>2]=12124;q[a+8>>2]=12336;ya=q[a+96>>2];if(ya){q[a+100>>2]=ya;An(ya)}ya=q[a+80>>2];if(ya){q[a+84>>2]=ya;An(ya)}ya=q[a+68>>2];if(ya){q[a+72>>2]=ya;An(ya)}ya=q[a+56>>2];if(ya){q[a+60>>2]=ya;An(ya)}q[a+8>>2]=12572;ya=q[a+44>>2];if(ya){An(ya)}ya=q[a+32>>2];if(ya){An(ya)}return a|0}function cj(a){a=a|0;var za=0;q[a>>2]=12124;q[a+8>>2]=12336;za=q[a+96>>2];if(za){q[a+100>>2]=za;An(za)}za=q[a+80>>2];if(za){q[a+84>>2]=za;An(za)}za=q[a+68>>2];if(za){q[a+72>>2]=za;An(za)}za=q[a+56>>2];if(za){q[a+60>>2]=za;An(za)}q[a+8>>2]=12572;za=q[a+44>>2];if(za){An(za)}za=q[a+32>>2];if(za){An(za)}An(a)}function dj(a,Aa){a=a|0;Aa=Aa|0;var Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0;Ja=q[a+12>>2];Ba=q[a+108>>2];Ca=q[Ba+80>>2];o[Aa+84|0]=0;Fa=q[Aa+68>>2];Da=q[Aa+72>>2]-Fa>>2;a:{if(Ca>>>0>Da>>>0){md(Aa+68|0,Ca-Da|0,12324);Ba=q[a+108>>2];Ca=q[Ba+80>>2];break a}if(Ca>>>0>=Da>>>0){break a}q[Aa+72>>2]=Fa+(Ca<<2)}Ia=q[Ba+96>>2];Ba=q[Ba+100>>2]-Ia|0;Ka=(Ba|0)/12|0;if(!Ba){return 1}La=Aa+68|0;Aa=0;b:{while(1){c:{if((Aa|0)==1431655765){break c}Ba=q[Ja>>2]+(w(Aa,3)<<2)|0;Fa=q[Ba>>2];if((Fa|0)==-1){break c}Da=w(Aa,12)+Ia|0;Ga=q[Da>>2];if(Ga>>>0>=Ca>>>0){break c}Ea=Fa<<2;Fa=q[q[a+112>>2]+12>>2];Ea=q[Ea+Fa>>2];if(Ea>>>0>=Ca>>>0){break c}Ha=Ga<<2;Ga=q[La>>2];q[Ha+Ga>>2]=Ea;Ea=q[Ba+4>>2];if((Ea|0)==-1){break c}Ha=q[Da+4>>2];if(Ha>>>0>=Ca>>>0){break c}Ea=q[Fa+(Ea<<2)>>2];if(Ea>>>0>=Ca>>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break u}zi(bb+48|0,Ya+24|0)}if(q[a+84>>2]<=(Wa|0)){break t}q[a+84>>2]=Wa}if(Xa){break m}}Ua=-1;Xa=0;Ua=(Va|0)!=-1?q[q[q[db>>2]>>2]+(Va<<2)>>2]:Ua;if(!(q[q[$a>>2]+(Ua>>>3&536870908)>>2]>>>(Ua&31)&1)){Xa=q[cb>>2]+(Ua<<2)|0;Ua=q[Xa>>2];q[Xa>>2]=Ua+1;Xa=(Ua|0)<1?2:1}if((Xa|0)>q[a+84>>2]){break q}Ua=Va}q[Ya+8>>2]=Ua;Xa=q[Za>>2];continue}break}q[Ya+24>>2]=Va;Wa=w(Xa,12)+a|0;_a=Wa+52|0;Ua=q[_a>>2];v:{if((Ua|0)!=q[Wa+56>>2]){q[Ua>>2]=Va;q[_a>>2]=Ua+4;break v}zi(Wa+48|0,Ya+24|0)}Va=q[a+84>>2];if((Va|0)<=(Xa|0)){break l}q[a+84>>2]=Xa;Va=Xa;break l}Va=q[a+84>>2]}if((Va|0)<3){continue}break}}q[Ya+8>>2]=-1}T=Ya+32|0;return 1}function gj(a){a=a|0;var Ua=0;q[a>>2]=12336;Ua=q[a+88>>2];if(Ua){q[a+92>>2]=Ua;An(Ua)}Ua=q[a+72>>2];if(Ua){q[a+76>>2]=Ua;An(Ua)}Ua=q[a+60>>2];if(Ua){q[a- -64>>2]=Ua;An(Ua)}Ua=q[a+48>>2];if(Ua){q[a+52>>2]=Ua;An(Ua)}q[a>>2]=12572;Ua=q[a+36>>2];if(Ua){An(Ua)}Ua=q[a+24>>2];if(Ua){An(Ua)}An(a)}function hj(a){a=a|0;var gb=0;q[a>>2]=12572;gb=q[a+36>>2];if(gb){An(gb)}gb=q[a+24>>2];if(gb){An(gb)}return a|0}function ij(a){a=a|0;var hb=0;q[a>>2]=12572;hb=q[a+36>>2];if(hb){An(hb)}hb=q[a+24>>2];if(hb){An(hb)}An(a)}function jj(a){a=a|0;var ib=0;q[a>>2]=12756;ib=q[a+48>>2];if(ib){q[a+52>>2]=ib;An(ib)}q[a>>2]=12572;ib=q[a+36>>2];if(ib){An(ib)}ib=q[a+24>>2];if(ib){An(ib)}return a|0}function kj(a){a=a|0;var jb=0,kb=0;q[a>>2]=12592;kb=a+8|0;q[kb>>2]=12756;jb=q[a+56>>2];if(jb){q[a+60>>2]=jb;An(jb)}q[kb>>2]=12572;jb=q[a+44>>2];if(jb){An(jb)}jb=q[a+32>>2];if(jb){An(jb)}return a|0}function lj(a){a=a|0;var lb=0,mb=0;q[a>>2]=12592;mb=a+8|0;q[mb>>2]=12756;lb=q[a+56>>2];if(lb){q[a+60>>2]=lb;An(lb)}q[mb>>2]=12572;lb=q[a+44>>2];if(lb){An(lb)}lb=q[a+32>>2];if(lb){An(lb)}An(a)}function mj(a,nb){a=a|0;nb=nb|0;var ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0;wb=q[a+12>>2];ob=q[a+68>>2];pb=q[ob+80>>2];o[nb+84|0]=0;sb=q[nb+68>>2];qb=q[nb+72>>2]-sb>>2;a:{if(pb>>>0>qb>>>0){md(nb+68|0,pb-qb|0,12324);ob=q[a+68>>2];pb=q[ob+80>>2];break a}if(pb>>>0>=qb>>>0){break a}q[nb+72>>2]=sb+(pb<<2)}vb=q[ob+96>>2];ob=q[ob+100>>2]-vb|0;xb=(ob|0)/12|0;if(!ob){return 1}yb=nb+68|0;nb=0;b:{while(1){c:{if((nb|0)==1431655765){break c}ob=q[wb>>2]+(w(nb,3)<<2)|0;sb=q[ob>>2];if((sb|0)==-1){break c}qb=w(nb,12)+vb|0;tb=q[qb>>2];if(tb>>>0>=pb>>>0){break c}rb=sb<<2;sb=q[q[a+72>>2]+12>>2];rb=q[rb+sb>>2];if(rb>>>0>=pb>>>0){break c}ub=tb<<2;tb=q[yb>>2];q[ub+tb>>2]=rb;rb=q[ob+4>>2];if((rb|0)==-1){break c}ub=q[qb+4>>2];if(ub>>>0>=pb>>>0){break c}rb=q[sb+(rb<<2)>>2];if(rb>>>0>=pb>>>0){break c}q[tb+(ub<<2)>>2]=rb;ob=q[ob+8>>2];if((ob|0)==-1){break c}qb=q[qb+8>>2];if(qb>>>0>=pb>>>0){break c}ob=q[sb+(ob<<2)>>2];if(ob>>>0>=pb>>>0){break c}q[tb+(qb<<2)>>2]=ob;ob=1;nb=nb+1|0;if(nb>>>0>>0){continue}break b}break}ob=0}return ob|0}function nj(a){a=a|0;var nb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0;Bb=q[a+4>>2];nb=q[Bb>>2];a:{zb=q[a+12>>2];Ab=q[zb+28>>2]-q[zb+24>>2]|0;zb=Ab>>2;b:{if(q[Bb+8>>2]-nb>>2>>>0>=zb>>>0){break b}if(zb>>>0>=1073741824){break a}Eb=Bb+4|0;Cb=q[Eb>>2];Db=zb<<2;zb=Mm(Ab);Db=Db+zb|0;Ab=Cb-nb|0;Cb=Ab+zb|0;if((Ab|0)>=1){Cn(zb,nb,Ab)}q[Bb>>2]=zb;q[Bb+8>>2]=Db;q[Eb>>2]=Cb;if(!nb){break b}An(nb)}zb=a+8|0;c:{d:{nb=q[a+76>>2];if(nb){Bb=q[nb>>2];Ab=1;if((Bb|0)==q[nb+4>>2]){break c}nb=0;while(1){if(!oj(zb,q[(nb<<2)+Bb>>2])){break d}Ab=q[a+76>>2];Bb=q[Ab>>2];nb=nb+1|0;if(nb>>>0>2]-Bb>>2>>>0){continue}break}return 1}nb=0;a=q[a+12>>2];a=(q[a+4>>2]-q[a>>2]>>2>>>0)/3|0;if((a|0)<=0){return 1}while(1){if(!oj(zb,w(nb,3))){break d}nb=nb+1|0;if(nb>>>0>>0){continue}break}return 1}Ab=0}return Ab|0}ab(12024);F()}function oj(a,Fb){var Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0;Kb=T-32|0;T=Kb;q[Kb+8>>2]=Fb;a:{if((Fb|0)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8|0;q[Wb>>2]=11760;Vb=q[a+56>>2];if(Vb){q[a+60>>2]=Vb;An(Vb)}q[Wb>>2]=12012;Vb=q[a+44>>2];if(Vb){An(Vb)}Vb=q[a+32>>2];if(Vb){An(Vb)}return a|0}function rj(a){a=a|0;var Xb=0,Yb=0;q[a>>2]=12884;Yb=a+8|0;q[Yb>>2]=11760;Xb=q[a+56>>2];if(Xb){q[a+60>>2]=Xb;An(Xb)}q[Yb>>2]=12012;Xb=q[a+44>>2];if(Xb){An(Xb)}Xb=q[a+32>>2];if(Xb){An(Xb)}An(a)}function sj(a,Zb){a=a|0;Zb=Zb|0;var _b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0;dc=q[a+12>>2];_b=q[a+68>>2];$b=q[_b+80>>2];o[Zb+84|0]=0;cc=q[Zb+68>>2];ac=q[Zb+72>>2]-cc>>2;a:{if($b>>>0>ac>>>0){md(Zb+68|0,$b-ac|0,12324);_b=q[a+68>>2];$b=q[_b+80>>2];break a}if($b>>>0>=ac>>>0){break a}q[Zb+72>>2]=cc+($b<<2)}fc=q[_b+96>>2];_b=q[_b+100>>2]-fc|0;gc=(_b|0)/12|0;if(!_b){return 1}hc=q[dc+28>>2];ic=Zb+68|0;Zb=0;b:{while(1){c:{_b=(w(Zb,3)<<2)+hc|0;dc=q[_b>>2];if((dc|0)==-1){break c}ac=w(Zb,12)+fc|0;cc=q[ac>>2];if(cc>>>0>=$b>>>0){break c}bc=dc<<2;dc=q[q[a+72>>2]+12>>2];bc=q[bc+dc>>2];if(bc>>>0>=$b>>>0){break c}ec=cc<<2;cc=q[ic>>2];q[ec+cc>>2]=bc;bc=q[_b+4>>2];if((bc|0)==-1){break c}ec=q[ac+4>>2];if(ec>>>0>=$b>>>0){break c}bc=q[dc+(bc<<2)>>2];if(bc>>>0>=$b>>>0){break c}q[cc+(ec<<2)>>2]=bc;_b=q[_b+8>>2];if((_b|0)==-1){break c}ac=q[ac+8>>2];if(ac>>>0>=$b>>>0){break c}_b=q[dc+(_b<<2)>>2];if(_b>>>0>=$b>>>0){break c}q[cc+(ac<<2)>>2]=_b;_b=1;Zb=Zb+1|0;if(Zb>>>0>>0){continue}break b}break}_b=0}return _b|0}function tj(a){a=a|0;var Zb=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0;lc=q[a+4>>2];Zb=q[lc>>2];a:{jc=q[a+12>>2];kc=q[jc+56>>2]-q[jc+52>>2]|0;jc=kc>>2;b:{if(q[lc+8>>2]-Zb>>2>>>0>=jc>>>0){break b}if(jc>>>0>=1073741824){break a}oc=lc+4|0;mc=q[oc>>2];nc=jc<<2;jc=Mm(kc);nc=nc+jc|0;kc=mc-Zb|0;mc=kc+jc|0;if((kc|0)>=1){Cn(jc,Zb,kc)}q[lc>>2]=jc;q[lc+8>>2]=nc;q[oc>>2]=mc;if(!Zb){break b}An(Zb)}jc=a+8|0;c:{d:{Zb=q[a+76>>2];if(Zb){lc=q[Zb>>2];kc=1;if((lc|0)==q[Zb+4>>2]){break c}Zb=0;while(1){if(!uj(jc,q[(Zb<<2)+lc>>2])){break d}kc=q[a+76>>2];lc=q[kc>>2];Zb=Zb+1|0;if(Zb>>>0>2]-lc>>2>>>0){continue}break}return 1}Zb=0;a=q[q[a+12>>2]+64>>2];a=(q[a+4>>2]-q[a>>2]>>2>>>0)/3|0;if((a|0)<=0){return 1}while(1){if(!uj(jc,w(Zb,3))){break d}Zb=Zb+1|0;if(Zb>>>0>>0){continue}break}return 1}kc=0}return kc|0}ab(12024);F()}function uj(a,pc){var qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0;uc=T-32|0;T=uc;q[uc+8>>2]=pc;a:{if((pc|0)==-1){qc=1;break a}qc=1;tc=(pc>>>0)/3|0;if(q[q[a+24>>2]+(tc>>>3&268435452)>>2]>>>(tc&31)&1){break a}tc=a+52|0;qc=q[a+48>>2];q[tc>>2]=qc;zc=a+48|0;b:{if((qc|0)!=q[a+56>>2]){q[qc>>2]=pc;q[tc>>2]=qc+4;break b}zi(zc,uc+8|0)}rc=-1;qc=q[a+4>>2];pc=q[uc+8>>2];c:{if((pc|0)==-1){tc=q[qc+28>>2];qc=q[tc+ -4>>2];break c}tc=q[qc+28>>2];qc=pc+1|0;qc=q[tc+(((qc>>>0)%3|0?qc:pc+ -2|0)<<2)>>2];if((pc>>>0)%3){rc=pc+ -1|0;break c}rc=pc+2|0}if((qc|0)==-1){qc=0;break a}tc=q[(rc<<2)+tc>>2];if((tc|0)==-1){qc=0;break a}pc=q[a+36>>2];sc=pc+(qc>>>3&536870908)|0;rc=q[sc>>2];vc=1<<(qc&31);if(!(rc&vc)){q[sc>>2]=rc|vc;rc=-1;pc=q[uc+8>>2];if((pc|0)!=-1){sc=pc+1|0;rc=(sc>>>0)%3|0?sc:pc+ -2|0}q[uc+16>>2]=rc;pc=q[a+20>>2];sc=(rc>>>0)/3|0;rc=q[(q[q[a+16>>2]+96>>2]+w(sc,12)|0)+(rc-w(sc,3)<<2)>>2];q[uc+24>>2]=rc;sc=q[pc+4>>2];vc=sc+4|0;pc=q[vc>>2];d:{if((pc|0)!=q[sc+8>>2]){q[pc>>2]=rc;q[vc>>2]=pc+4;break d}zi(sc,uc+24|0)}sc=a+12|0;rc=q[sc>>2];vc=rc+4|0;pc=q[vc>>2];e:{if((pc|0)!=q[rc+8>>2]){q[pc>>2]=q[uc+16>>2];q[vc>>2]=pc+4;break e}zi(rc,uc+16|0);rc=q[sc>>2]}q[q[rc+12>>2]+(qc<<2)>>2]=q[rc+24>>2];q[rc+24>>2]=q[rc+24>>2]+1;pc=q[a+36>>2]}pc=(tc>>>3&536870908)+pc|0;qc=q[pc>>2];sc=1<<(tc&31);if(!(qc&sc)){q[pc>>2]=qc|sc;pc=uc;rc=pc;sc=q[pc+8>>2];qc=-1;f:{if((sc|0)==-1){break f}qc=sc+ -1|0;if((sc>>>0)%3){break f}qc=sc+2|0}q[rc+16>>2]=qc;pc=q[a+20>>2];sc=(qc>>>0)/3|0;sc=q[(q[q[a+16>>2]+96>>2]+w(sc,12)|0)+(qc-w(sc,3)<<2)>>2];q[uc+24>>2]=sc;qc=q[pc+4>>2];rc=qc+4|0;pc=q[rc>>2];g:{if((pc|0)!=q[qc+8>>2]){q[pc>>2]=sc;q[rc>>2]=pc+4;break g}zi(qc,uc+24|0)}sc=a+12|0;qc=q[sc>>2];rc=qc+4|0;pc=q[rc>>2];h:{if((pc|0)!=q[qc+8>>2]){q[pc>>2]=q[uc+16>>2];q[rc>>2]=pc+4;break h}zi(qc,uc+16|0);qc=q[sc>>2]}q[q[qc+12>>2]+(tc<<2)>>2]=q[qc+24>>2];q[qc+24>>2]=q[qc+24>>2]+1}vc=a+52|0;pc=q[vc>>2];if((pc|0)==q[a+48>>2]){qc=1;break a}xc=a+24|0;yc=a+4|0;Bc=a+36|0;Cc=a+16|0;Dc=a+20|0;Ec=a+56|0;while(1){tc=pc+ -4|0;pc=q[tc>>2];q[uc+8>>2]=pc;qc=(pc>>>0)/3|0;i:{j:{k:{if((pc|0)==-1){break k}pc=q[xc>>2]+(qc>>>3&268435452)|0;sc=q[pc>>2];qc=1<<(qc&31);if(sc&qc){break k}q[pc>>2]=qc|sc;rc=q[yc>>2];pc=q[uc+8>>2];qc=q[q[rc+28>>2]+(pc<<2)>>2];if((qc|0)!=-1){break j}qc=0;break a}q[vc>>2]=tc;break i}l:{m:{n:{while(1){o:{p:{tc=q[Bc>>2]+(qc>>>3&536870908)|0;sc=q[tc>>2];wc=1<<(qc&31);if(sc&wc){break p}Ac=qc<<2;qc=q[Ac+q[rc+40>>2]>>2];pc=1;q:{if((qc|0)==-1){break q}pc=qc+1|0;pc=(pc>>>0)%3|0?pc:qc+ -2|0;r:{if((pc|0)==-1|q[q[rc>>2]+(pc>>>3&536870908)>>2]>>>(pc&31)&1){break r}qc=q[q[q[rc+64>>2]+12>>2]+(pc<<2)>>2];if((qc|0)==-1){break r}rc=qc+1|0;pc=0;if((((rc>>>0)%3|0?rc:qc+ -2|0)|0)!=-1){break q}}pc=1}qc=pc;q[tc>>2]=sc|wc;pc=q[uc+8>>2];q[uc+16>>2]=pc;tc=q[Dc>>2];sc=(pc>>>0)/3|0;sc=q[(q[q[Cc>>2]+96>>2]+w(sc,12)|0)+(pc-w(sc,3)<<2)>>2];q[uc+24>>2]=sc;tc=q[tc+4>>2];rc=tc+4|0;pc=q[rc>>2];s:{if((pc|0)!=q[tc+8>>2]){q[pc>>2]=sc;q[rc>>2]=pc+4;break s}zi(tc,uc+24|0)}sc=a+12|0;pc=q[sc>>2];rc=pc+4|0;tc=q[rc>>2];t:{if((tc|0)!=q[pc+8>>2]){q[tc>>2]=q[uc+16>>2];q[rc>>2]=tc+4;break t}zi(pc,uc+16|0);pc=q[sc>>2]}q[q[pc+12>>2]+Ac>>2]=q[pc+24>>2];q[pc+24>>2]=q[pc+24>>2]+1;rc=q[yc>>2];pc=q[uc+8>>2];if(qc){break p}qc=-1;u:{if((pc|0)==-1){break u}tc=pc+1|0;pc=(tc>>>0)%3|0?tc:pc+ -2|0;if((pc|0)==-1|q[q[rc>>2]+(pc>>>3&536870908)>>2]>>>(pc&31)&1){break u}qc=q[q[q[rc+64>>2]+12>>2]+(pc<<2)>>2]}q[uc+8>>2]=qc;pc=(qc>>>0)/3|0;break o}if((pc|0)==-1){break m}tc=-1;sc=uc;wc=pc+1|0;wc=(wc>>>0)%3|0?wc:pc+ -2|0;qc=-1;v:{if((wc|0)==-1){break v}qc=-1;if(q[q[rc>>2]+(wc>>>3&536870908)>>2]>>>(wc&31)&1){break v}qc=q[q[q[rc+64>>2]+12>>2]+(wc<<2)>>2]}q[sc+24>>2]=qc;pc=((pc>>>0)%3|0?-1:2)+pc|0;if(!((pc|0)==-1|q[q[rc>>2]+(pc>>>3&536870908)>>2]>>>(pc&31)&1)){tc=q[q[q[rc+64>>2]+12>>2]+(pc<<2)>>2]}sc=(tc>>>0)/3|0;pc=(qc>>>0)/3|0;rc=(qc|0)==-1;w:{if(rc){pc=-1;rc=1;break w}rc=rc?-1:pc;rc=q[q[xc>>2]+(rc>>>3&536870908)>>2]>>>(rc&31)&1}x:{if((tc|0)!=-1){wc=(tc|0)==-1?-1:sc;wc=q[q[xc>>2]+(wc>>>3&536870908)>>2]&1<<(wc&31);if(rc){qc=tc;pc=sc;if(!wc){break x}break l}if(wc){break x}pc=q[vc>>2];q[pc+ -4>>2]=tc;if((pc|0)==q[Ec>>2]){break n}q[pc>>2]=q[uc+24>>2];q[vc>>2]=pc+4;break i}if(rc){break l}}q[uc+8>>2]=qc}qc=q[xc>>2]+(pc>>>3&536870908)|0;q[qc>>2]=q[qc>>2]|1<<(pc&31);rc=q[yc>>2];pc=q[uc+8>>2];qc=q[q[rc+28>>2]+(pc<<2)>>2];if((qc|0)!=-1){continue}break}qc=0;break a}zi(zc,uc+24|0);break i}q[uc+24>>2]=-1}q[vc>>2]=q[vc>>2]+ -4}qc=1;pc=q[vc>>2];if((pc|0)!=q[a+48>>2]){continue}break}}T=uc+32|0;return qc}function vj(a,pc){var Fc=0,Gc=0,Hc=0;q[a>>2]=q[pc>>2];q[a+4>>2]=q[pc+4>>2];q[a+8>>2]=q[pc+8>>2];Fc=pc+12|0;q[a+12>>2]=q[Fc>>2];q[Fc>>2]=0;q[pc+4>>2]=0;q[pc+8>>2]=0;Fc=pc+16|0;q[a+16>>2]=q[Fc>>2];q[a+20>>2]=q[pc+20>>2];Gc=pc+24|0;q[a+24>>2]=q[Gc>>2];q[Gc>>2]=0;q[Fc>>2]=0;q[Fc+4>>2]=0;Gc=r[pc+28|0];Hc=a+40|0;q[Hc>>2]=0;Fc=a+32|0;q[Fc>>2]=0;q[Fc+4>>2]=0;o[a+28|0]=Gc;Gc=Fc;Fc=pc+32|0;q[Gc>>2]=q[Fc>>2];q[a+36>>2]=q[pc+36>>2];Gc=pc+40|0;q[Hc>>2]=q[Gc>>2];q[Gc>>2]=0;q[Fc>>2]=0;q[Fc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=a+116|0;q[Fc>>2]=0;q[Fc+4>>2]=0;Hc=Fc;Fc=pc+116|0;q[Hc>>2]=q[Fc>>2];q[a+120>>2]=q[pc+120>>2];Hc=Gc;Gc=pc+124|0;q[Hc>>2]=q[Gc>>2];q[Gc>>2]=0;q[Fc>>2]=0;q[Fc+4>>2]=0;Fc=q[pc+128>>2];Gc=a+140|0;q[Gc>>2]=0;q[a+132>>2]=0;q[a+136>>2]=0;q[a+128>>2]=Fc;q[a+132>>2]=q[pc+132>>2];q[a+136>>2]=q[pc+136>>2];Fc=pc+140|0;q[Gc>>2]=q[Fc>>2];q[Fc>>2]=0;q[pc+132>>2]=0;q[pc+136>>2]=0;return a}function wj(a){var pc=0,Ic=0,Jc=0;Ic=q[a+8>>2];Jc=q[a+4>>2];if((Ic|0)!=(Jc|0)){while(1){pc=Ic+ -144|0;q[a+8>>2]=pc;pc=q[pc+132>>2];if(pc){q[Ic+ -8>>2]=pc;An(pc)}pc=q[Ic+ -28>>2];if(pc){q[Ic+ -24>>2]=pc;An(pc)}pc=q[Ic+ -40>>2];if(pc){q[Ic+ -36>>2]=pc;An(pc)}pi(Ic+ -140|0);Ic=q[a+8>>2];if((Jc|0)!=(Ic|0)){continue}break}}a=q[a>>2];if(a){An(a)}}function xj(a,Kc){var Lc=0,Mc=0,Nc=x(0);Lc=2;a:{if((Kc|0)==1){break a}Lc=Kc;if(!(Kc+ -1&Kc)){break a}Lc=jm(Kc)}Mc=q[a+4>>2];if(Lc>>>0>Mc>>>0){yj(a,Lc);return}b:{if(Lc>>>0>=Mc>>>0){break b}Nc=x(D(x(x(t[a+12>>2])/u[a+16>>2])));c:{if(Nc=x(0)){Kc=~~Nc>>>0;break c}Kc=0}d:{e:{if(Mc>>>0<3){break e}if(co(Mc)>>>0>1){break e}Kc=Kc>>>0<2?Kc:1<<32-z(Kc+ -1|0);break d}Kc=jm(Kc)}Kc=Lc>>>0>>0?Kc:Lc;if(Kc>>>0>=Mc>>>0){break b}yj(a,Kc)}}function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d=_c;_c=Kc;if(($c|0)>(Kc|0)?1:($c|0)>=(Kc|0)?fd>>>0

    >>0?0:1:0){continue}break}break d}g:{if(t[q[a+44>>2]+80>>2]>2097151){break g}_c=s[a+36>>1];if((_c<<24|_c<<8&16711680)>>>16>>>0<514){break g}if(!hd){break c}_c=Zc+16|0;q[_c>>2]=0;q[Zc+8>>2]=0;q[Zc+12>>2]=0;if(!Aj(1,Zc+4|0,Yc)){break d}Kc=a+32|0;$c=a+44|0;while(1){q[Zc+8>>2]=q[Zc+4>>2];if(!Aj(1,Zc+4|0,q[Kc>>2])){break d}q[Zc+12>>2]=q[Zc+4>>2];if(!Aj(1,Zc+4|0,q[Kc>>2])){break d}q[Zc+16>>2]=q[Zc+4>>2];Yc=q[$c>>2];ad=Yc+100|0;Xc=q[ad>>2];h:{if((Xc|0)==q[Yc+104>>2]){Cj(Yc+96|0,Zc+8|0);break h}Yc=q[Zc+12>>2];q[Xc>>2]=q[Zc+8>>2];q[Xc+4>>2]=Yc;q[Xc+8>>2]=q[_c>>2];q[ad>>2]=q[ad>>2]+12}cd=cd+1|0;if((cd|0)==(hd|0)){break c}Xc=q[Kc>>2];q[_c>>2]=0;q[Zc+8>>2]=0;q[Zc+12>>2]=0;if(Aj(1,Zc+4|0,Xc)){continue}break}break d}if(!hd){break c}gd=Zc+16|0;q[gd>>2]=0;q[Zc+8>>2]=0;q[Zc+12>>2]=0;ad=q[Yc+12>>2];cd=ad;_c=$c+5|0;if(_c>>>0<5){Kc=Kc+1|0}ed=q[Yc+8>>2];dd=_c;_c=Kc;if((cd|0)<(Kc|0)?1:(cd|0)<=(Kc|0)?ed>>>0>=dd>>>0?0:1:0){break d}jd=a+44|0;kd=a+32|0;while(1){cd=q[Yc>>2];Kc=cd+bd|0;Kc=r[Kc|0]|r[Kc+1|0]<<8|(r[Kc+2|0]<<16|r[Kc+3|0]<<24);q[Yc+16>>2]=dd;q[Yc+20>>2]=_c;q[Zc+8>>2]=Kc;_c=ad;Kc=Xc;$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>2];if((od|0)<(pd|0)?1:(od|0)<=(pd|0)?t[nd+8>>2]>qd>>>0?0:1:0){break a}od=r[qd+q[nd>>2]|0];qd=qd+1|0;if(qd>>>0<1){pd=pd+1|0}q[nd+16>>2]=qd;q[nd+20>>2]=pd;pd=md;if(od&128){if(!Aj(a+1|0,md,nd)){break a}a=q[md>>2]<<7;q[md>>2]=a;od=a|od&127}q[pd>>2]=od;rd=1}return rd}function Bj(a,md){var nd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0;nd=T-32|0;T=nd;q[nd+24>>2]=0;q[nd+16>>2]=0;q[nd+20>>2]=0;a:{ud=w(md,3);if(ud){if(ud>>>0>=1073741824){break a}sd=w(md,12);vd=Mm(sd);q[nd+16>>2]=vd;q[nd+24>>2]=(ud<<2)+vd;zd=nd,Ad=Dn(vd,0,sd)+sd|0,q[zd+20>>2]=Ad}b:{if(!qh(ud,1,q[a+32>>2],vd)){break b}td=1;if(!md){break b}yd=a+44|0;vd=0;while(1){ud=nd+8|0;q[ud>>2]=0;q[nd>>2]=0;q[nd+4>>2]=0;a=q[nd+16>>2]+(vd<<2)|0;sd=q[a>>2];td=sd>>>1;sd=(sd&1?0-td|0:td)+wd|0;q[nd>>2]=sd;td=q[a+4>>2];wd=td>>>1;sd=sd+(td&1?0-wd|0:wd)|0;q[nd+4>>2]=sd;a=q[a+8>>2];td=a>>>1;wd=sd+(a&1?0-td|0:td)|0;q[ud>>2]=wd;sd=q[yd>>2];td=sd+100|0;a=q[td>>2];c:{if((a|0)!=q[sd+104>>2]){sd=q[nd+4>>2];q[a>>2]=q[nd>>2];q[a+4>>2]=sd;q[a+8>>2]=q[ud>>2];q[td>>2]=q[td>>2]+12;break c}Cj(sd+96|0,nd)}vd=vd+3|0;td=1;xd=xd+1|0;if((xd|0)!=(md|0)){continue}break}}a=q[nd+16>>2];if(a){q[nd+20>>2]=a;An(a)}T=nd+32|0;return td}bn();F()}function Cj(a,md){var Bd=0,Cd=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](a);break a}n[q[q[Ld>>2]+4>>2]](Ld)}a=q[Kd+8>>2];q[Kd+8>>2]=0;if(a){n[q[q[a>>2]+4>>2]](a)}T=Kd+16|0;return Id|0}function Ej(a){a=a|0;var md=0,Od=0,Pd=0,Qd=0,Rd=0;q[a>>2]=13300;md=q[a+20>>2];if(md){q[a+24>>2]=md;An(md)}Pd=q[a+8>>2];if(Pd){md=Pd;Rd=a+12|0;Od=q[Rd>>2];Qd=md;a:{if((md|0)==(Od|0)){break a}while(1){Od=Od+ -4|0;md=q[Od>>2];q[Od>>2]=0;if(md){n[q[q[md>>2]+4>>2]](md)}if((Od|0)!=(Pd|0)){continue}break}Qd=q[a+8>>2]}md=Qd;q[Rd>>2]=Pd;An(md)}An(a)}function Fj(a,Sd){a=a|0;Sd=Sd|0;o[Sd+84|0]=1;q[Sd+72>>2]=q[Sd+68>>2];return 1}function Gj(a){a=a|0;var Sd=0,Td=0,Ud=0,Vd=0;a:{Sd=q[a+8>>2];b:{if((Sd|0)<0){break b}Td=q[a+4>>2];Vd=q[Td>>2];Ud=q[Td+4>>2]-Vd>>2;c:{if(Sd>>>0>Ud>>>0){Hj(Td,Sd-Ud|0);Sd=q[a+8>>2];break c}if(Sd>>>0>=Ud>>>0){break c}q[Td+4>>2]=Vd+(Sd<<2)}Vd=1;if((Sd|0)<1){break b}a=q[a+4>>2];Td=q[a>>2];Ud=q[a+4>>2]-Td>>2;a=0;while(1){if((a|0)==(Ud|0)){break a}q[Td+(a<<2)>>2]=a;a=a+1|0;if((a|0)<(Sd|0)){continue}break}}return Vd|0}cn();F()}function Hj(a,Wd){var Xd=0,Yd=0,Zd=0,_d=0,$d=0,ae=0,be=0,ce=0,de=0;Yd=q[a+8>>2];Zd=a+4|0;Xd=q[Zd>>2];if(Yd-Xd>>2>>>0>=Wd>>>0){a=Wd<<2;ce=Zd,de=Dn(Xd,0,a)+a|0,q[ce>>2]=de;return}a:{Zd=q[a>>2];$d=Xd-Zd|0;Xd=$d>>2;_d=Xd+Wd|0;if(_d>>>0<1073741824){be=Xd<<2;Yd=Yd-Zd|0;Xd=Yd>>1;Yd=Yd>>2>>>0<536870911?Xd>>>0<_d>>>0?_d:Xd:1073741823;Xd=0;b:{if(!Yd){break b}if(Yd>>>0>=1073741824){break a}ae=Mm(Yd<<2);Xd=ae}Dn(be+Xd|0,0,Wd<<2);Wd=Xd+(_d<<2)|0;_d=Xd+(Yd<<2)|0;if(($d|0)>=1){Cn(ae,Zd,$d)}q[a>>2]=Xd;q[a+8>>2]=_d;q[a+4>>2]=Wd;if(Zd){An(Zd)}return}bn();F()}ab(13160);F()}function Ij(a){q[a+40>>2]=0;q[a>>2]=13300;q[a+4>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;q[a+32>>2]=0;p[a+36>>1]=0}function Jj(a,Wd,ee){var fe=0,ge=0,he=0,ie=0,je=0,ke=0;ge=T-16|0;T=ge;ie=q[Wd+12>>2];fe=q[Wd+20>>2];he=q[Wd+16>>2];je=he+5|0;if(je>>>0<5){fe=fe+1|0}a:{if((ie|0)<(fe|0)?1:(ie|0)<=(fe|0)?t[Wd+8>>2]>=je>>>0?0:1:0){Wd=Mm(32);q[ge>>2]=Wd;q[ge+4>>2]=29;q[ge+8>>2]=-2147483616;o[Wd+29|0]=0;ee=r[13369]|r[13370]<<8|(r[13371]<<16|r[13372]<<24);fe=r[13365]|r[13366]<<8|(r[13367]<<16|r[13368]<<24);o[Wd+21|0]=fe;o[Wd+22|0]=fe>>>8;o[Wd+23|0]=fe>>>16;o[Wd+24|0]=fe>>>24;o[Wd+25|0]=ee;o[Wd+26|0]=ee>>>8;o[Wd+27|0]=ee>>>16;o[Wd+28|0]=ee>>>24;ee=q[3341];fe=q[3340];o[Wd+16|0]=fe;o[Wd+17|0]=fe>>>8;o[Wd+18|0]=fe>>>16;o[Wd+19|0]=fe>>>24;o[Wd+20|0]=ee;o[Wd+21|0]=ee>>>8;o[Wd+22|0]=ee>>>16;o[Wd+23|0]=ee>>>24;ee=q[3339];fe=q[3338];o[Wd+8|0]=fe;o[Wd+9|0]=fe>>>8;o[Wd+10|0]=fe>>>16;o[Wd+11|0]=fe>>>24;o[Wd+12|0]=ee;o[Wd+13|0]=ee>>>8;o[Wd+14|0]=ee>>>16;o[Wd+15|0]=ee>>>24;ee=q[3337];fe=q[3336];o[Wd|0]=fe;o[Wd+1|0]=fe>>>8;o[Wd+2|0]=fe>>>16;o[Wd+3|0]=fe>>>24;o[Wd+4|0]=ee;o[Wd+5|0]=ee>>>8;o[Wd+6|0]=ee>>>16;o[Wd+7|0]=ee>>>24;q[a>>2]=-2;Rm(a+4|0,ge);if(o[ge+11|0]>-1){break a}An(q[ge>>2]);break a}fe=he+q[Wd>>2]|0;ie=r[fe|0]|r[fe+1|0]<<8|(r[fe+2|0]<<16|r[fe+3|0]<<24);o[ee|0]=ie;o[ee+1|0]=ie>>>8;o[ee+2|0]=ie>>>16;o[ee+3|0]=ie>>>24;o[ee+4|0]=r[fe+4|0];ie=Wd;fe=q[Wd+20>>2];he=q[Wd+16>>2]+5|0;if(he>>>0<5){fe=fe+1|0}je=he;he=fe;q[ie+16>>2]=je;q[ie+20>>2]=fe;if(cm(ee,13374,5)){Wd=Mm(32);q[ge>>2]=Wd;q[ge+4>>2]=17;q[ge+8>>2]=-2147483616;o[Wd+17|0]=0;o[Wd+16|0]=r[13396];ee=r[13392]|r[13393]<<8|(r[13394]<<16|r[13395]<<24);fe=r[13388]|r[13389]<<8|(r[13390]<<16|r[13391]<<24);o[Wd+8|0]=fe;o[Wd+9|0]=fe>>>8;o[Wd+10|0]=fe>>>16;o[Wd+11|0]=fe>>>24;o[Wd+12|0]=ee;o[Wd+13|0]=ee>>>8;o[Wd+14|0]=ee>>>16;o[Wd+15|0]=ee>>>24;ee=r[13384]|r[13385]<<8|(r[13386]<<16|r[13387]<<24);fe=r[13380]|r[13381]<<8|(r[13382]<<16|r[13383]<<24);o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1){break a}An(q[ge>>2]);break a}o[ee+5|0]=r[je+q[Wd>>2]|0];fe=q[Wd+20>>2];he=q[Wd+16>>2]+1|0;if(he>>>0<1){fe=fe+1|0}q[Wd+16>>2]=he;q[ie+20>>2]=fe;ie=q[Wd+12>>2];if((ie|0)<(fe|0)?1:(ie|0)<=(fe|0)?t[Wd+8>>2]>he>>>0?0:1:0){Wd=Mm(32);q[ge>>2]=Wd;q[ge+4>>2]=29;q[ge+8>>2]=-2147483616;o[Wd+29|0]=0;ee=r[13369]|r[13370]<<8|(r[13371]<<16|r[13372]<<24);fe=r[13365]|r[13366]<<8|(r[13367]<<16|r[13368]<<24);o[Wd+21|0]=fe;o[Wd+22|0]=fe>>>8;o[Wd+23|0]=fe>>>16;o[Wd+24|0]=fe>>>24;o[Wd+25|0]=ee;o[Wd+26|0]=ee>>>8;o[Wd+27|0]=ee>>>16;o[Wd+28|0]=ee>>>24;ee=q[3341];fe=q[3340];o[Wd+16|0]=fe;o[Wd+17|0]=fe>>>8;o[Wd+18|0]=fe>>>16;o[Wd+19|0]=fe>>>24;o[Wd+20|0]=ee;o[Wd+21|0]=ee>>>8;o[Wd+22|0]=ee>>>16;o[Wd+23|0]=ee>>>24;ee=q[3339];fe=q[3338];o[Wd+8|0]=fe;o[Wd+9|0]=fe>>>8;o[Wd+10|0]=fe>>>16;o[Wd+11|0]=fe>>>24;o[Wd+12|0]=ee;o[Wd+13|0]=ee>>>8;o[Wd+14|0]=ee>>>16;o[Wd+15|0]=ee>>>24;ee=q[3337];fe=q[3336];o[Wd|0]=fe;o[Wd+1|0]=fe>>>8;o[Wd+2|0]=fe>>>16;o[Wd+3|0]=fe>>>24;o[Wd+4|0]=ee;o[Wd+5|0]=ee>>>8;o[Wd+6|0]=ee>>>16;o[Wd+7|0]=ee>>>24;q[a>>2]=-2;Rm(a+4|0,ge);if(o[ge+11|0]>-1){break a}An(q[ge>>2]);break a}o[ee+6|0]=r[he+q[Wd>>2]|0];fe=q[Wd+20>>2];he=q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=0;q[a+4>>2]=0}T=ge+16|0}function Kj(a,Wd){var ee=0,le=0,me=0,ne=0;le=T-48|0;T=le;ee=Mm(36);me=ee+4|0;q[me>>2]=0;q[me+4>>2]=0;ne=ee+16|0;q[ne>>2]=0;q[ne+4>>2]=0;q[ee>>2]=me;q[ee+32>>2]=0;q[ee+24>>2]=0;q[ee+28>>2]=0;q[ee+12>>2]=ne;q[le+40>>2]=ee;ee=le+32|0;q[ee>>2]=0;a:{if(!Ok(ee,q[Wd+32>>2],q[le+40>>2])){q[le+24>>2]=0;q[le+16>>2]=0;q[le+20>>2]=0;Wd=Mm(32);q[le+16>>2]=Wd;q[le+20>>2]=26;q[le+24>>2]=-2147483616;o[Wd+26|0]=0;ee=r[13422]|r[13423]<<8;o[Wd+24|0]=ee;o[Wd+25|0]=ee>>>8;ee=r[13418]|r[13419]<<8|(r[13420]<<16|r[13421]<<24);me=r[13414]|r[13415]<<8|(r[13416]<<16|r[13417]<<24);o[Wd+16|0]=me;o[Wd+17|0]=me>>>8;o[Wd+18|0]=me>>>16;o[Wd+19|0]=me>>>24;o[Wd+20|0]=ee;o[Wd+21|0]=ee>>>8;o[Wd+22|0]=ee>>>16;o[Wd+23|0]=ee>>>24;ee=r[13410]|r[13411]<<8|(r[13412]<<16|r[13413]<<24);me=r[13406]|r[13407]<<8|(r[13408]<<16|r[13409]<<24);o[Wd+8|0]=me;o[Wd+9|0]=me>>>8;o[Wd+10|0]=me>>>16;o[Wd+11|0]=me>>>24;o[Wd+12|0]=ee;o[Wd+13|0]=ee>>>8;o[Wd+14|0]=ee>>>16;o[Wd+15|0]=ee>>>24;ee=r[13402]|r[13403]<<8|(r[13404]<<16|r[13405]<<24);me=r[13398]|r[13399]<<8|(r[13400]<<16|r[13401]<<24);o[Wd|0]=me;o[Wd+1|0]=me>>>8;o[Wd+2|0]=me>>>16;o[Wd+3|0]=me>>>24;o[Wd+4|0]=ee;o[Wd+5|0]=ee>>>8;o[Wd+6|0]=ee>>>16;o[Wd+7|0]=ee>>>24;q[a>>2]=-1;Rm(a+4|0,le+16|0);if(o[le+27|0]>-1){break a}An(q[le+16>>2]);break a}Wd=q[Wd+4>>2];q[le+8>>2]=0;me=q[le+40>>2];q[le+40>>2]=0;ee=q[Wd+4>>2];q[Wd+4>>2]=me;b:{if(!ee){q[le+8>>2]=0;break b}Lj(ee);Wd=q[le+8>>2];q[le+8>>2]=0;if(!Wd){break b}Lj(Wd)}q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0}a=q[le+40>>2];q[le+40>>2]=0;if(a){Lj(a)}T=le+48|0}function Lj(a){var Wd=0,oe=0,pe=0,qe=0,re=0;if(a){pe=q[a+24>>2];if(pe){Wd=pe;re=a+28|0;oe=q[re>>2];qe=Wd;a:{if((oe|0)==(Wd|0)){break a}while(1){oe=oe+ -4|0;Wd=q[oe>>2];q[oe>>2]=0;if(Wd){Hc(Wd+12|0,q[Wd+16>>2]);Ic(Wd,q[Wd+4>>2]);An(Wd)}if((oe|0)!=(pe|0)){continue}break}qe=q[a+24>>2]}Wd=qe;q[re>>2]=pe;An(Wd)}Hc(a+12|0,q[a+16>>2]);Ic(a,q[a+4>>2]);An(a)}}function Mj(a,se,te,ue,ve){var we=0,xe=0;we=T-32|0;T=we;q[se+32>>2]=ue;q[se+40>>2]=te;q[se+4>>2]=ve;Jj(a,ue,we+16|0);a:{if(q[a>>2]){break a}te=a+4|0;if(o[a+15|0]<=-1){An(q[te>>2])}ve=r[we+23|0];if((n[q[q[se>>2]+8>>2]](se)|0)!=(ve|0)){se=Mm(64);q[we>>2]=se;q[we+4>>2]=50;q[we+8>>2]=-2147483584;o[se+50|0]=0;ue=r[13473]|r[13474]<<8;o[se+48|0]=ue;o[se+49|0]=ue>>>8;ue=r[13469]|r[13470]<<8|(r[13471]<<16|r[13472]<<24);ve=r[13465]|r[13466]<<8|(r[13467]<<16|r[13468]<<24);o[se+40|0]=ve;o[se+41|0]=ve>>>8;o[se+42|0]=ve>>>16;o[se+43|0]=ve>>>24;o[se+44|0]=ue;o[se+45|0]=ue>>>8;o[se+46|0]=ue>>>16;o[se+47|0]=ue>>>24;ue=r[13461]|r[13462]<<8|(r[13463]<<16|r[13464]<<24);ve=r[13457]|r[13458]<<8|(r[13459]<<16|r[13460]<<24);o[se+32|0]=ve;o[se+33|0]=ve>>>8;o[se+34|0]=ve>>>16;o[se+35|0]=ve>>>24;o[se+36|0]=ue;o[se+37|0]=ue>>>8;o[se+38|0]=ue>>>16;o[se+39|0]=ue>>>24;ue=r[13453]|r[13454]<<8|(r[13455]<<16|r[13456]<<24);ve=r[13449]|r[13450]<<8|(r[13451]<<16|r[13452]<<24);o[se+24|0]=ve;o[se+25|0]=ve>>>8;o[se+26|0]=ve>>>16;o[se+27|0]=ve>>>24;o[se+28|0]=ue;o[se+29|0]=ue>>>8;o[se+30|0]=ue>>>16;o[se+31|0]=ue>>>24;ue=r[13445]|r[13446]<<8|(r[13447]<<16|r[13448]<<24);ve=r[13441]|r[13442]<<8|(r[13443]<<16|r[13444]<<24);o[se+16|0]=ve;o[se+17|0]=ve>>>8;o[se+18|0]=ve>>>16;o[se+19|0]=ve>>>24;o[se+20|0]=ue;o[se+21|0]=ue>>>8;o[se+22|0]=ue>>>16;o[se+23|0]=ue>>>24;ue=r[13437]|r[13438]<<8|(r[13439]<<16|r[13440]<<24);ve=r[13433]|r[13434]<<8|(r[13435]<<16|r[13436]<<24);o[se+8|0]=ve;o[se+9|0]=ve>>>8;o[se+10|0]=ve>>>16;o[se+11|0]=ve>>>24;o[se+12|0]=ue;o[se+13|0]=ue>>>8;o[se+14|0]=ue>>>16;o[se+15|0]=ue>>>24;ue=r[13429]|r[13430]<<8|(r[13431]<<16|r[13432]<<24);ve=r[13425]|r[13426]<<8|(r[13427]<<16|r[13428]<<24);o[se|0]=ve;o[se+1|0]=ve>>>8;o[se+2|0]=ve>>>16;o[se+3|0]=ve>>>24;o[se+4|0]=ue;o[se+5|0]=ue>>>8;o[se+6|0]=ue>>>16;o[se+7|0]=ue>>>24;q[a>>2]=-1;Rm(te,we);if(o[we+11|0]>-1){break a}An(q[we>>2]);break a}ue=r[we+21|0];o[se+36|0]=ue;xe=r[we+22|0];o[se+37|0]=xe;if((ue+ -1&255)>>>0>=2){se=Mm(32);q[we>>2]=se;q[we+4>>2]=22;q[we+8>>2]=-2147483616;o[se+22|0]=0;ue=r[13494]|r[13495]<<8|(r[13496]<<16|r[13497]<<24);ve=r[13490]|r[13491]<<8|(r[13492]<<16|r[13493]<<24);o[se+14|0]=ve;o[se+15|0]=ve>>>8;o[se+16|0]=ve>>>16;o[se+17|0]=ve>>>24;o[se+18|0]=ue;o[se+19|0]=ue>>>8;o[se+20|0]=ue>>>16;o[se+21|0]=ue>>>24;ue=r[13488]|r[13489]<<8|(r[13490]<<16|r[13491]<<24);ve=r[13484]|r[13485]<<8|(r[13486]<<16|r[13487]<<24);o[se+8|0]=ve;o[se+9|0]=ve>>>8;o[se+10|0]=ve>>>16;o[se+11|0]=ve>>>24;o[se+12|0]=ue;o[se+13|0]=ue>>>8;o[se+14|0]=ue>>>16;o[se+15|0]=ue>>>24;ue=r[13480]|r[13481]<<8|(r[13482]<<16|r[13483]<<24);ve=r[13476]|r[13477]<<8|(r[13478]<<16|r[13479]<<24);o[se|0]=ve;o[se+1|0]=ve>>>8;o[se+2|0]=ve>>>16;o[se+3|0]=ve>>>24;o[se+4|0]=ue;o[se+5|0]=ue>>>8;o[se+6|0]=ue>>>16;o[se+7|0]=ue>>>24;q[a>>2]=-5;Rm(te,we);if(o[we+11|0]>-1){break a}An(q[we>>2]);break a}if(!((ue|0)!=2|(ve?2:3)>>>0>=xe>>>0)){se=Mm(32);q[we>>2]=se;q[we+4>>2]=22;q[we+8>>2]=-2147483616;o[se+22|0]=0;ue=r[13517]|r[13518]<<8|(r[13519]<<16|r[13520]<<24);ve=r[13513]|r[13514]<<8|(r[13515]<<16|r[13516]<<24);o[se+14|0]=ve;o[se+15|0]=ve>>>8;o[se+16|0]=ve>>>16;o[se+17|0]=ve>>>24;o[se+18|0]=ue;o[se+19|0]=ue>>>8;o[se+20|0]=ue>>>16;o[se+21|0]=ue>>>24;ue=r[13511]|r[13512]<<8|(r[13513]<<16|r[13514]<<24);ve=r[13507]|r[13508]<<8|(r[13509]<<16|r[13510]<<24);o[se+8|0]=ve;o[se+9|0]=ve>>>8;o[se+10|0]=ve>>>16;o[se+11|0]=ve>>>24;o[se+12|0]=ue;o[se+13|0]=ue>>>8;o[se+14|0]=ue>>>16;o[se+15|0]=ue>>>24;ue=r[13503]|r[13504]<<8|(r[13505]<<16|r[13506]<<24);ve=r[13499]|r[13500]<<8|(r[13501]<<16|r[13502]<<24);o[se|0]=ve;o[se+1|0]=ve>>>8;o[se+2|0]=ve>>>16;o[se+3|0]=ve>>>24;o[se+4|0]=ue;o[se+5|0]=ue>>>8;o[se+6|0]=ue>>>16;o[se+7|0]=ue>>>24;q[a>>2]=-5;Rm(te,we);if(o[we+11|0]>-1){break a}An(q[we>>2]);break a}ue=ue<<8|xe;p[q[se+32>>2]+38>>1]=ue;b:{if((ue&65535)>>>0<259|p[we+26>>1]>-1){break b}Kj(a,se);if(q[a>>2]){break a}if(o[te+11|0]>-1){break b}An(q[te>>2])}if(!n[q[q[se>>2]+12>>2]](se)){se=Mm(48);q[we>>2]=se;q[we+4>>2]=33;q[we+8>>2]=-2147483600;o[se+33|0]=0;o[se+32|0]=r[13554];ue=r[13550]|r[13551]<<8|(r[13552]<<16|r[13553]<<24);ve=r[13546]|r[13547]<<8|(r[13548]<<16|r[13549]<<24);o[se+24|0]=ve;o[se+25|0]=ve>>>8;o[se+26|0]=ve>>>16;o[se+27|0]=ve>>>24;o[se+28|0]=ue;o[se+29|0]=ue>>>8;o[se+30|0]=ue>>>16;o[se+31|0]=ue>>>24;ue=r[13542]|r[13543]<<8|(r[13544]<<16|r[13545]<<24);ve=r[13538]|r[13539]<<8|(r[13540]<<16|r[13541]<<24);o[se+16|0]=ve;o[se+17|0]=ve>>>8;o[se+18|0]=ve>>>16;o[se+19|0]=ve>>>24;o[se+20|0]=ue;o[se+21|0]=ue>>>8;o[se+22|0]=ue>>>16;o[se+23|0]=ue>>>24;ue=r[13534]|r[13535]<<8|(r[13536]<<16|r[13537]<<24);ve=r[13530]|r[13531]<<8|(r[13532]<<16|r[13533]<<24);o[se+8|0]=ve;o[se+9|0]=ve>>>8;o[se+10|0]=ve>>>16;o[se+11|0]=ve>>>24;o[se+12|0]=ue;o[se+13|0]=ue>>>8;o[se+14|0]=ue>>>16;o[se+15|0]=ue>>>24;ue=r[13526]|r[13527]<<8|(r[13528]<<16|r[13529]<<24);ve=r[13522]|r[13523]<<8|(r[13524]<<16|r[13525]<<24);o[se|0]=ve;o[se+1|0]=ve>>>8;o[se+2|0]=ve>>>16;o[se+3|0]=ve>>>24;o[se+4|0]=ue;o[se+5|0]=ue>>>8;o[se+6|0]=ue>>>16;o[se+7|0]=ue>>>24;q[a>>2]=-1;Rm(te,we);if(o[we+11|0]>-1){break a}An(q[we>>2]);break a}if(!n[q[q[se>>2]+20>>2]](se)){se=Mm(32);q[we>>2]=se;q[we+4>>2]=31;q[we+8>>2]=-2147483616;o[se+31|0]=0;ue=r[13583]|r[13584]<<8|(r[13585]<<16|r[13586]<<24);ve=r[13579]|r[13580]<<8|(r[13581]<<16|r[13582]<<24);o[se+23|0]=ve;o[se+24|0]=ve>>>8;o[se+25|0]=ve>>>16;o[se+26|0]=ve>>>24;o[se+27|0]=ue;o[se+28|0]=ue>>>8;o[se+29|0]=ue>>>16;o[se+30|0]=ue>>>24;ue=r[13576]|r[13577]<<8|(r[13578]<<16|r[13579]<<24);ve=r[13572]|r[13573]<<8|(r[13574]<<16|r[13575]<<24);o[se+16|0]=ve;o[se+17|0]=ve>>>8;o[se+18|0]=ve>>>16;o[se+19|0]=ve>>>24;o[se+20|0]=ue;o[se+21|0]=ue>>>8;o[se+22|0]=ue>>>16;o[se+23|0]=ue>>>24;ue=r[13568]|r[13569]<<8|(r[13570]<<16|r[13571]<<24);ve=r[13564]|r[13565]<<8|(r[13566]<<16|r[13567]<<24);o[se+8|0]=ve;o[se+9|0]=ve>>>8;o[se+10|0]=ve>>>16;o[se+11|0]=ve>>>24;o[se+12|0]=ue;o[se+13|0]=ue>>>8;o[se+14|0]=ue>>>16;o[se+15|0]=ue>>>24;ue=r[13560]|r[13561]<<8|(r[13562]<<16|r[13563]<<24);ve=r[13556]|r[13557]<<8|(r[13558]<<16|r[13559]<<24);o[se|0]=ve;o[se+1|0]=ve>>>8;o[se+2|0]=ve>>>16;o[se+3|0]=ve>>>24;o[se+4|0]=ue;o[se+5|0]=ue>>>8;o[se+6|0]=ue>>>16;o[se+7|0]=ue>>>24;q[a>>2]=-1;Rm(te,we);if(o[we+11|0]>-1){break a}An(q[we>>2]);break a}if(!n[q[q[se>>2]+24>>2]](se)){se=Mm(48);q[we>>2]=se;q[we+4>>2]=34;q[we+8>>2]=-2147483600;o[se+34|0]=0;ue=r[13620]|r[13621]<<8;o[se+32|0]=ue;o[se+33|0]=ue>>>8;ue=r[13616]|r[13617]<<8|(r[13618]<<16|r[13619]<<24);ve=r[13612]|r[13613]<<8|(r[13614]<<16|r[13615]<<24);o[se+24|0]=ve;o[se+25|0]=ve>>>8;o[se+26|0]=ve>>>16;o[se+27|0]=ve>>>24;o[se+28|0]=ue;o[se+29|0]=ue>>>8;o[se+30|0]=ue>>>16;o[se+31|0]=ue>>>24;ue=r[13608]|r[13609]<<8|(r[13610]<<16|r[13611]<<24);ve=r[13604]|r[13605]<<8|(r[13606]<<16|r[13607]<<24);o[se+16|0]=ve;o[se+17|0]=ve>>>8;o[se+18|0]=ve>>>16;o[se+19|0]=ve>>>24;o[se+20|0]=ue;o[se+21|0]=ue>>>8;o[se+22|0]=ue>>>16;o[se+23|0]=ue>>>24;ue=r[13600]|r[13601]<<8|(r[13602]<<16|r[13603]<<24);ve=r[13596]|r[13597]<<8|(r[13598]<<16|r[13599]<<24);o[se+8|0]=ve;o[se+9|0]=ve>>>8;o[se+10|0]=ve>>>16;o[se+11|0]=ve>>>24;o[se+12|0]=ue;o[se+13|0]=ue>>>8;o[se+14|0]=ue>>>16;o[se+15|0]=ue>>>24;ue=r[13592]|r[13593]<<8|(r[13594]<<16|r[13595]<<24);ve=r[13588]|r[13589]<<8|(r[13590]<<16|r[13591]<<24);o[se|0]=ve;o[se+1|0]=ve>>>8;o[se+2|0]=ve>>>16;o[se+3|0]=ve>>>24;o[se+4|0]=ue;o[se+5|0]=ue>>>8;o[se+6|0]=ue>>>16;o[se+7|0]=ue>>>24;q[a>>2]=-1;Rm(te,we);if(o[we+11|0]>-1){break a}An(q[we>>2]);break a}q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0}T=we+32|0}function Nj(a){a=a|0;var se=0,te=0,ue=0,ve=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0;a:{se=q[a+32>>2];ve=q[se+16>>2];ze=q[se+12>>2];ue=q[se+20>>2];b:{if((ze|0)<(ue|0)?1:(ze|0)<=(ue|0)?t[se+8>>2]>ve>>>0?0:1:0){break b}ye=r[ve+q[se>>2]|0];Ae=ve+1|0;if(Ae>>>0<1){ue=ue+1|0}q[se+16>>2]=Ae;q[se+20>>2]=ue;c:{if(!ye){break c}while(1){if(n[q[q[a>>2]+16>>2]](a,te)){te=te+1|0;if((ye|0)!=(te|0)){continue}break c}break}return 0}te=q[a+8>>2];ue=q[a+12>>2];if((te|0)!=(ue|0)){while(1){se=q[te>>2];if(!n[q[q[se>>2]+8>>2]](se,a,q[a+4>>2])){break b}te=te+4|0;if((ue|0)!=(te|0)){continue}break}}d:{if(!ye){break d}te=0;ue=a+8|0;while(1){se=q[q[ue>>2]+(te<<2)>>2];if(!n[q[q[se>>2]+12>>2]](se,q[a+32>>2])){break a}te=te+1|0;if((ye|0)!=(te|0)){continue}break}if(!ye){break d}ve=a+20|0;Be=a+8|0;ze=a+24|0;while(1){te=0;Ae=Ce<<2;se=q[Ae+q[Be>>2]>>2];ue=n[q[q[se>>2]+24>>2]](se)|0;if((ue|0)>0){while(1){se=q[q[Be>>2]+Ae>>2];se=n[q[q[se>>2]+20>>2]](se,te)|0;De=q[a+20>>2];Ee=q[ze>>2]-De>>2;e:{if(se>>>0>>0){break e}Fe=se+1|0;if(Fe>>>0>Ee>>>0){Fa(ve,Fe-Ee|0);De=q[ve>>2];break e}if(Fe>>>0>=Ee>>>0){break e}q[ze>>2]=(Fe<<2)+De}q[(se<<2)+De>>2]=Ce;te=te+1|0;if((ue|0)!=(te|0)){continue}break}}Ce=Ce+1|0;if((Ce|0)!=(ye|0)){continue}break}}Be=0;if(!n[q[q[a>>2]+28>>2]](a)){break b}Be=n[q[q[a>>2]+32>>2]](a)|0}return Be|0}return 0}function Oj(a){a=a|0;var Ge=0,He=0,Ie=0,Je=0;He=1;Ge=q[a+8>>2];Ie=q[a+12>>2];a:{if((Ge|0)==(Ie|0)){break a}while(1){Je=q[Ge>>2];if(n[q[q[Je>>2]+16>>2]](Je,q[a+32>>2])){Ge=Ge+4|0;if((Ie|0)!=(Ge|0)){continue}break a}break}He=0}return He|0}function Pj(a,Ke){var Le=0,Me=0;a:{if((Ke|0)<0){break a}Le=q[a+4>>2];if(q[Le+12>>2]-q[Le+8>>2]>>2<=(Ke|0)){break a}a=q[q[a+8>>2]+(q[q[a+20>>2]+(Ke<<2)>>2]<<2)>>2];Me=n[q[q[a>>2]+32>>2]](a,Ke)|0}return Me}function Qj(a){a=a|0;var Ke=0,Ne=0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0;Oe=q[a+32>>2];Ne=Oe;Pe=q[Ne+8>>2];Qe=q[Ne+12>>2];Ke=q[Ne+20>>2];Se=Pe;Pe=q[Ne+16>>2];Ne=Pe+4|0;if(Ne>>>0<4){Ke=Ke+1|0}Re=Ne;Ne=Ke;a:{if((Qe|0)<(Ke|0)?1:(Qe|0)<=(Ke|0)?Se>>>0>=Re>>>0?0:1:0){break a}Ke=Pe+q[Oe>>2]|0;Ke=r[Ke|0]|r[Ke+1|0]<<8|(r[Ke+2|0]<<16|r[Ke+3|0]<<24);q[Oe+16>>2]=Re;q[Oe+20>>2]=Ne;if((Ke|0)<0){break a}q[q[a+4>>2]+80>>2]=Ke;Te=1}return Te|0}function Rj(a,Ue){a=a|0;Ue=Ue|0;var Ve=0,We=0,Xe=0,Ye=0,Ze=0,_e=0;Ye=Mm(72);Id(Ye);a:{if((Ue|0)>=0){Ve=q[a+12>>2];Ze=a+8|0;_e=q[Ze>>2];We=Ve-_e>>2;b:{if((We|0)>(Ue|0)){break b}Xe=Ue+1|0;if(We>>>0<=Ue>>>0){ji(Ze,Xe-We|0);break b}if(Xe>>>0>=We>>>0){break b}Xe=_e+(Xe<<2)|0;if((Xe|0)!=(Ve|0)){while(1){Ve=Ve+ -4|0;We=q[Ve>>2];q[Ve>>2]=0;if(We){n[q[q[We>>2]+4>>2]](We)}if((Ve|0)!=(Xe|0)){continue}break}}q[a+12>>2]=Xe}Ue=q[Ze>>2]+(Ue<<2)|0;a=q[Ue>>2];q[Ue>>2]=Ye;Ve=1;if(!a){break a}n[q[q[a>>2]+4>>2]](a);return 1}n[q[q[Ye>>2]+4>>2]](Ye)}return Ve|0}function Sj(a){a=a|0;var Ue=0,$e=0,af=0,bf=0,cf=0,df=0,ef=0;af=q[a+32>>2];$e=af;bf=q[$e+8>>2];cf=q[$e+12>>2];Ue=q[$e+20>>2];ef=bf;bf=q[$e+16>>2];$e=bf+4|0;if($e>>>0<4){Ue=Ue+1|0}df=$e;$e=Ue;if((cf|0)>(Ue|0)?1:(cf|0)>=(Ue|0)?ef>>>0>>0?0:1:0){Ue=bf+q[af>>2]|0;Ue=r[Ue|0]|r[Ue+1|0]<<8|(r[Ue+2|0]<<16|r[Ue+3|0]<<24);q[af+16>>2]=df;q[af+20>>2]=$e;q[q[a+4>>2]+80>>2]=Ue;a=1}else{a=0}return a|0}function Tj(a,ff,gf){var hf=0,jf=0,kf=0;if((ff|0)>0){while(1){jf=hf<<2;kf=q[jf+a>>2];q[gf+jf>>2]=0-(kf&1)^kf>>>1;hf=hf+1|0;if((hf|0)!=(ff|0)){continue}break}}}function Uj(a){q[a+16>>2]=0;q[a+20>>2]=0;q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0}function Vj(a,q,ff,gf){return Wj(a,q,ff,gf)}function Wj(a,ff,gf,lf){var mf=0,nf=0,of=0;a:{if(!ff){ff=gf;lf=ff>>>0<0?lf+1|0:lf;if((lf|0)<0?1:(lf|0)<=0?ff>>>0>=0?0:1:0){return 0}lf=q[a>>2];gf=q[a+4>>2]-lf|0;if(gf>>>0>>0){Ha(a,ff-gf|0);break a}if(gf>>>0<=ff>>>0){break a}q[a+4>>2]=ff+lf;break a}if((lf|0)<0?1:(lf|0)<=0?gf>>>0>=0?0:1:0){return 0}nf=gf;if(gf>>>0<0){lf=lf+1|0}of=q[a>>2];mf=q[a+4>>2]-of|0;b:{if((lf|0)<0?1:(lf|0)<=0?nf>>>0>mf>>>0?0:1:0){break b}lf=nf;if(mf>>>0>>0){Ha(a,lf-mf|0);break b}if(mf>>>0<=lf>>>0){break b}q[a+4>>2]=lf+of}if(!gf){break a}En(q[a>>2],ff,gf)}ff=a+24|0;gf=ff;lf=ff;a=q[ff+4>>2];ff=q[ff>>2]+1|0;if(ff>>>0<1){a=a+1|0}q[lf>>2]=ff;q[gf+4>>2]=a;return 1}function Xj(a,ff){var gf=0,lf=0;lf=q[a>>2];gf=q[a+4>>2]-lf|0;a:{if(gf>>>0>>0){Ha(a,ff-gf|0);break a}if(gf>>>0<=ff>>>0){break a}q[a+4>>2]=ff+lf}ff=a+24|0;gf=ff;lf=ff;a=q[ff+4>>2];ff=q[ff>>2]+1|0;if(ff>>>0<1){a=a+1|0}q[lf>>2]=ff;q[gf+4>>2]=a}function Yj(a){p[a+38>>1]=0;q[a>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+16>>2]=0;q[a+20>>2]=0;q[a+24>>2]=0;q[a+28>>2]=0;o[a+29|0]=0;o[a+30|0]=0;o[a+31|0]=0;o[a+32|0]=0;o[a+33|0]=0;o[a+34|0]=0;o[a+35|0]=0;o[a+36|0]=0;return a}function Zj(a,ff,pf,qf){p[a+38>>1]=qf;q[a>>2]=ff;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=pf;q[a+12>>2]=0}function _j(a,ff,pf){var qf=0,rf=0,sf=0,tf=0;a:{b:{if(!ff){break b}if(s[a+38>>1]<=513){rf=q[a+12>>2];ff=q[a+20>>2];sf=q[a+16>>2];tf=sf+8|0;if(tf>>>0<8){ff=ff+1|0}if((rf|0)<(ff|0)?1:(rf|0)<=(ff|0)?t[a+8>>2]>=tf>>>0?0:1:0){break a}ff=sf+q[a>>2]|0;qf=r[ff+4|0]|r[ff+5|0]<<8|(r[ff+6|0]<<16|r[ff+7|0]<<24);q[pf>>2]=r[ff|0]|r[ff+1|0]<<8|(r[ff+2|0]<<16|r[ff+3|0]<<24);q[pf+4>>2]=qf;pf=q[a+20>>2];qf=q[a+16>>2]+8|0;if(qf>>>0<8){pf=pf+1|0}q[a+16>>2]=qf;q[a+20>>2]=pf;break b}if(!$j(1,pf,a)){break a}}o[a+36|0]=1;q[a+32>>2]=0;ff=q[a+16>>2];pf=ff+q[a>>2]|0;q[a+24>>2]=pf;qf=a;a=q[a+8>>2];q[qf+28>>2]=pf+(a-ff|0);qf=1}return qf}function $j(a,ff,pf){var uf=0,vf=0,wf=0,xf=0,yf=0,zf=0;a:{if(a>>>0>10){break a}wf=q[pf+16>>2];uf=q[pf+12>>2];vf=q[pf+20>>2];xf=vf;if((uf|0)<(xf|0)?1:(uf|0)<=(xf|0)?t[pf+8>>2]>wf>>>0?0:1:0){break a}yf=o[wf+q[pf>>2]|0];uf=wf+1|0;if(uf>>>0<1){vf=vf+1|0}q[pf+16>>2]=uf;q[pf+20>>2]=vf;xf=ff;wf=ff;uf=yf;b:{if((uf|0)<=-1){if(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a}o[q[a+28>>2]]=0;q[a+32>>2]=0;if(o[a+39|0]>-1){break a}An(q[a+28>>2]);q[a+36>>2]=0}a=q[Gf+12>>2];q[Ff>>2]=q[Gf+8>>2];q[Ff+4>>2]=a;q[Ff+8>>2]=q[Gf+16>>2];T=Gf+48|0}function fk(a,Ff){var Hf=0,Mf=0,Nf=0,Of=0,Pf=0,Qf=0,Rf=0,Sf=0;Pf=a+4|0;a=q[Pf>>2];a:{b:{if(!a){break b}Hf=r[Ff+11|0];Mf=Hf<<24>>24<0;Nf=Mf?q[Ff+4>>2]:Hf;Rf=Mf?q[Ff>>2]:Ff;Hf=Pf;while(1){Ff=r[a+27|0];Sf=Ff<<24>>24<0;Qf=Sf?q[a+20>>2]:Ff;Of=Nf>>>0>>0;Mf=Of?Nf:Qf;c:{if(Mf){Ff=a+16|0;Ff=cm(Sf?q[Ff>>2]:Ff,Rf,Mf);if(Ff){break c}}Ff=Qf>>>0>>0?-1:Of}Hf=(Ff|0)<0?Hf:a;a=q[(Ff>>>29&4)+a>>2];if(a){continue}break}if((Hf|0)==(Pf|0)){break b}a=r[Hf+27|0];Of=a<<24>>24<0;d:{Mf=Of?q[Hf+20>>2]:a;Ff=Mf>>>0>>0?Mf:Nf;if(Ff){a=Hf+16|0;a=cm(Rf,Of?q[a>>2]:a,Ff);if(a){break d}}if(Nf>>>0>>0){break b}break a}if((a|0)>-1){break a}}Hf=Pf}return Hf}function gk(a,Ff){var Tf=0;Ff=fk(a,Ff);a:{if((Ff|0)==(a+4|0)){break a}a=Ff+28|0;if(o[Ff+39|0]<=-1){a=q[a>>2]}a=bm(a);if((a|0)==-1){break a}Tf=(a|0)!=0}return Tf}function hk(a){q[a>>2]=1065353216;return a}function ik(a,q,Ff){if((Ff|0)<1){return 0}u[a>>2]=q/x(Ff|0);return 1}function jk(a){var Ff=0;q[a>>2]=0;q[a+4>>2]=0;q[a+56>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+40>>2]=0;q[a+44>>2]=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>>0){mk(a,_f-ag|0);Yf=q[bg>>2];Zf=q[Uf>>2];break a}if(_f>>>0>=ag>>>0){break a}q[a+4>>2]=(_f<<2)+cg}if((Yf|0)!=(Zf|0)){ag=(Yf-Zf|0)/12|0;bg=q[a>>2];Uf=0;while(1){_f=w(Uf,12);Yf=_f+bg|0;_f=Zf+_f|0;q[Yf>>2]=q[_f>>2];q[Yf+4>>2]=q[_f+4>>2];q[Yf+8>>2]=q[_f+8>>2];Uf=Uf+1|0;if(Uf>>>0>>0){continue}break}}q[$f+12>>2]=-1;Uf=0;if(nk(a,$f+12|0)){ok(a);pk(a,q[$f+12>>2]);Uf=1}T=$f+16|0;return Uf}function mk(a,Uf){var dg=0,eg=0,fg=0,gg=0,hg=0,ig=0,jg=0,kg=0,lg=0;eg=q[a+8>>2];fg=a+4|0;dg=q[fg>>2];if(eg-dg>>2>>>0>=Uf>>>0){a=Uf<<2;kg=fg,lg=Dn(dg,0,a)+a|0,q[kg>>2]=lg;return}a:{fg=q[a>>2];hg=dg-fg|0;dg=hg>>2;gg=dg+Uf|0;if(gg>>>0<1073741824){jg=dg<<2;eg=eg-fg|0;dg=eg>>1;eg=eg>>2>>>0<536870911?dg>>>0>>0?gg:dg:1073741823;dg=0;b:{if(!eg){break b}if(eg>>>0>=1073741824){break a}ig=Mm(eg<<2);dg=ig}Dn(jg+dg|0,0,Uf<<2);Uf=dg+(gg<<2)|0;gg=dg+(eg<<2)|0;if((hg|0)>=1){Cn(ig,fg,hg)}q[a>>2]=dg;q[a+8>>2]=gg;q[a+4>>2]=Uf;if(fg){An(fg)}return}bn();F()}ab(13904);F()}function nk(a,Uf){var mg=0,ng=0,og=0,pg=0,qg=0,rg=0,sg=0,tg=0,ug=0,vg=0,wg=0,xg=0,yg=0,zg=0,Ag=0,Bg=0,Cg=0,Dg=0,Eg=0,Fg=0,Gg=0;og=T-48|0;T=og;if(Uf){Dg=a+12|0;ng=a+4|0;tg=q[ng>>2];ug=q[a>>2];rg=tg-ug|0;pg=rg>>2;mg=q[a+12>>2];qg=q[a+16>>2]-mg>>2;a:{if(pg>>>0>qg>>>0){qk(Dg,pg-qg|0);tg=q[ng>>2];ug=q[a>>2];rg=tg-ug|0;pg=rg>>2;break a}if(pg>>>0>=qg>>>0){break a}q[a+16>>2]=mg+(pg<<2)}ng=0;q[og+40>>2]=0;q[og+32>>2]=0;q[og+36>>2]=0;b:{c:{d:{if(!pg){mg=0;qg=0;break d}if(pg>>>0>=1073741824){break c}mg=Mm(rg);q[og+36>>2]=mg;q[og+32>>2]=mg;q[og+40>>2]=(pg<<2)+mg;qg=mg}e:{if(!rg){break e}sg=a+4|0;ng=qg;wg=ng;rg=0;while(1){vg=q[(rg<<2)+ug>>2];wg=wg-ng>>2;if(vg>>>0>=wg>>>0){q[og+16>>2]=0;mg=vg+1|0;f:{if(mg>>>0>wg>>>0){Ad(og+32|0,mg-wg|0,og+16|0);tg=q[sg>>2];ug=q[a>>2];break f}if(mg>>>0>=wg>>>0){break f}q[og+36>>2]=(mg<<2)+ng}mg=q[og+32>>2];qg=mg}ng=(vg<<2)+mg|0;q[ng>>2]=q[ng>>2]+1;rg=rg+1|0;ng=tg-ug|0;pg=ng>>2;if(rg>>>0>=pg>>>0){break e}wg=q[og+36>>2];ng=mg;continue}}q[og+24>>2]=0;q[og+16>>2]=0;q[og+20>>2]=0;rg=0;g:{if(ng){if(pg>>>0>=536870912){break g}rg=Mm(ng<<1);q[og+16>>2]=rg;q[og+20>>2]=rg;ng=pg<<3;q[og+24>>2]=ng+rg;ng=Dn(rg,255,ng);while(1){ng=ng+8|0;pg=pg+ -1|0;if(pg){continue}break}q[og+20>>2]=ng}q[og+8>>2]=0;q[og>>2]=0;q[og+4>>2]=0;ng=q[og+36>>2]-qg|0;Ag=ng>>2;h:{if(ng){if(Ag>>>0>=1073741824){break h}xg=Mm(ng);q[og>>2]=xg;q[og+8>>2]=(Ag<<2)+xg;pg=0;sg=Dn(xg,0,ng);q[og+4>>2]=sg+ng;ng=0;while(1){qg=ng<<2;q[qg+sg>>2]=pg;pg=q[mg+qg>>2]+pg|0;ng=ng+1|0;if(ng>>>0>>0){continue}break}}if((tg|0)==(ug|0)){break b}Gg=tg-ug>>2;sg=0;Eg=q[og+32>>2];while(1){Bg=sg<<2;wg=q[Bg+ug>>2];tg=-1;ng=sg+1|0;mg=(ng>>>0)%3|0?ng:sg+ -2|0;if((mg|0)!=-1){tg=q[(mg<<2)+ug>>2]}yg=-1;qg=(sg>>>0)%3|0;mg=(qg?-1:2)+sg|0;if((mg|0)!=-1){yg=q[(mg<<2)+ug>>2]}i:{j:{if(qg){break j}k:{if((tg|0)==(yg|0)){break k}mg=q[ug+Bg>>2];if((mg|0)==(tg|0)){break k}if((mg|0)!=(yg|0)){break j}}q[a+40>>2]=q[a+40>>2]+1;ng=sg+3|0;break i}mg=yg<<2;Cg=q[mg+Eg>>2];l:{m:{if((Cg|0)<1){break m}mg=q[mg+xg>>2];pg=0;while(1){vg=(mg<<3)+rg|0;qg=q[vg>>2];if((qg|0)==-1){break m}n:{if((qg|0)!=(tg|0)){break n}zg=q[vg+4>>2];if((zg|0)!=-1){qg=q[(zg<<2)+ug>>2]}else{qg=-1}if((qg|0)==(wg|0)){break n}while(1){qg=mg;pg=pg+1|0;o:{if((pg|0)>=(Cg|0)){break o}Fg=(qg<<3)+rg|0;mg=qg+1|0;wg=(mg<<3)+rg|0;vg=q[wg>>2];q[Fg>>2]=vg;q[Fg+4>>2]=q[wg+4>>2];if((vg|0)!=-1){continue}}break}q[(qg<<3)+rg>>2]=-1;if((zg|0)==-1){break m}mg=q[Dg>>2];q[mg+Bg>>2]=zg;q[mg+(zg<<2)>>2]=sg;break l}mg=mg+1|0;pg=pg+1|0;if((Cg|0)!=(pg|0)){continue}break}}mg=tg<<2;qg=q[mg+Eg>>2];if((qg|0)<1){break l}mg=q[mg+xg>>2];pg=0;while(1){vg=(mg<<3)+rg|0;if(q[vg>>2]==-1){q[vg>>2]=yg;q[vg+4>>2]=sg;break l}mg=mg+1|0;pg=pg+1|0;if((qg|0)!=(pg|0)){continue}break}}}sg=ng;if(sg>>>0>>0){continue}break}break b}bn();F()}bn();F()}ab(13904);F()}q[Uf>>2]=Ag;if(xg){q[og+4>>2]=xg;An(xg)}a=q[og+16>>2];if(a){q[og+20>>2]=a;An(a)}a=q[og+32>>2];if(a){q[og+36>>2]=a;An(a)}a=1}else{a=0}T=og+48|0;return a}function ok(a){var Uf=0,Hg=0,Ig=0,Jg=0,Kg=0,Lg=0,Mg=0,Ng=0,Og=0,Pg=0,Qg=0,Rg=0,Sg=0,Tg=0,Ug=0;Ig=T-48|0;T=Ig;Qg=a+4|0;Uf=q[Qg>>2];Og=q[a>>2];o[Ig+16|0]=0;Rg=rk(Ig+32|0,Uf-Og>>2,Ig+16|0);q[Ig+24>>2]=0;q[Ig+16>>2]=0;q[Ig+20>>2]=0;Uf=q[Qg>>2];Mg=q[a>>2];Ng=a+12|0;while(1){Sg=0;Lg=0;a:{if((Uf|0)==(Mg|0)){break a}while(1){Jg=q[Rg>>2];b:{if(q[Jg+(Lg>>>3&536870908)>>2]>>>(Lg&31)&1){break b}Kg=q[Ig+16>>2];q[Ig+20>>2]=Kg;Uf=Lg;while(1){Hg=Uf+1|0;Og=Uf;Uf=(Hg>>>0)%3|0?Hg:Uf+ -2|0;c:{if((Uf|0)==-1){break c}Uf=q[q[Ng>>2]+(Uf<<2)>>2];if((Uf|0)==-1){break c}Hg=Uf+1|0;Uf=(Hg>>>0)%3|0?Hg:Uf+ -2|0;if((Lg|0)==(Uf|0)|(Uf|0)==-1){break c}if(!(q[(Uf>>>3&536870908)+Jg>>2]>>>(Uf&31)&1)){continue}}break}Uf=Kg;Hg=Og;while(1){Jg=(Hg>>>3&536870908)+Jg|0;q[Jg>>2]=q[Jg>>2]|1<<(Hg&31);Jg=Hg+1|0;Tg=(Jg>>>0)%3|0?Jg:Hg+ -2|0;Jg=((Hg>>>0)%3|0?-1:2)+Hg|0;if((Uf|0)!=(Kg|0)){Ug=q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ue}break}}ih=ih+1|0;Wg=q[a>>2];if(ih>>>0<(q[gh>>2]-Wg>>2>>>0)/3>>>0){continue}break b}break}bn();F()}q[a+44>>2]=0;Vg=q[ah>>2];Wg=q[ah+4>>2];Yg=Wg>>>5;Zg=Wg&31;if(Yg|Zg){Yg=(Yg<<2)+Vg|0;Xg=Vg;Wg=0;while(1){if(!(q[Xg>>2]>>>Wg&1)){lh=lh+1|0;q[a+44>>2]=lh}_g=(Wg|0)==31;Wg=_g?0:Wg+1|0;Xg=_g?Xg+4|0:Xg;if((Yg|0)!=(Xg|0)|(Wg|0)!=(Zg|0)){continue}break}}a=q[ch>>2];if(a){An(a);Vg=q[ah>>2]}if(Vg){An(Vg)}T=$g+48|0}function qk(a,Vg){var rh=0,sh=0,th=0,uh=0,vh=0,wh=0;th=q[a+8>>2];rh=q[a+4>>2];if(th-rh>>2>>>0>=Vg>>>0){while(1){q[rh>>2]=q[3475];rh=rh+4|0;Vg=Vg+ -1|0;if(Vg){continue}break}q[a+4>>2]=rh;return}a:{uh=q[a>>2];vh=rh-uh|0;wh=vh>>2;rh=wh+Vg|0;if(rh>>>0<1073741824){th=th-uh|0;sh=th>>1;rh=th>>2>>>0<536870911?sh>>>0>>0?rh:sh:1073741823;sh=0;b:{if(!rh){break b}if(rh>>>0>=1073741824){break a}sh=Mm(rh<<2)}th=sh+(rh<<2)|0;rh=sh+(wh<<2)|0;while(1){q[rh>>2]=q[3475];rh=rh+4|0;Vg=Vg+ -1|0;if(Vg){continue}break}if((vh|0)>=1){Cn(sh,uh,vh)}q[a>>2]=sh;q[a+8>>2]=th;q[a+4>>2]=rh;if(uh){An(uh)}return}bn();F()}ab(13904);F()}function rk(a,Vg,xh){var yh=0,zh=0,Ah=0;q[a>>2]=0;q[a+4>>2]=0;q[a+8>>2]=0;a:{b:{if(!Vg){break b}if((Vg|0)<=-1){break a}zh=Vg+ -1>>>5;Ah=zh+1|0;yh=Mm(Ah<<2);q[a+8>>2]=Ah;q[a>>2]=yh;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Ih;q[Jh>>2]=Kh;if(!Vg){break c}An(Vg)}q[a+80>>2]=0;q[a+84>>2]=0;Gh=a+76|0;Vg=q[Gh>>2];q[Gh>>2]=0;if(Vg){An(Vg)}q[a+68>>2]=0;q[a+72>>2]=0;Vg=a- -64|0;a=q[Vg>>2];q[Vg>>2]=0;Hh=1;if(!a){break b}An(a)}return Hh}ab(13904);F()}function uk(a,Vg,Gh){var Lh=0,Mh=0,Nh=0,Oh=0,Ph=0;Lh=q[a+8>>2];Mh=q[a>>2];if(Lh-Mh>>2>>>0>=Vg>>>0){Nh=q[a+4>>2];Oh=Nh-Mh>>2;Ph=Oh>>>0>>0?Oh:Vg;if(Ph){Lh=Mh;while(1){q[Lh>>2]=q[Gh>>2];Lh=Lh+4|0;Ph=Ph+ -1|0;if(Ph){continue}break}}if(Oh>>>0>>0){Lh=Vg-Oh|0;while(1){q[Nh>>2]=q[Gh>>2];Nh=Nh+4|0;Lh=Lh+ -1|0;if(Lh){continue}break}q[a+4>>2]=Nh;return}q[a+4>>2]=(Vg<<2)+Mh;return}if(Mh){q[a+4>>2]=Mh;An(Mh);q[a+8>>2]=0;q[a>>2]=0;q[a+4>>2]=0;Lh=0}a:{if(Vg>>>0>=1073741824){break a}Mh=Lh>>1;Mh=Lh>>2>>>0<536870911?Mh>>>0>>0?Vg:Mh:1073741823;if(Mh>>>0>=1073741824){break a}Mh=Mh<<2;Lh=Mm(Mh);q[a>>2]=Lh;q[a+4>>2]=Lh;q[a+8>>2]=Lh+Mh;while(1){q[Lh>>2]=q[Gh>>2];Lh=Lh+4|0;Vg=Vg+ -1|0;if(Vg){continue}break}q[a+4>>2]=Lh;return}bn();F()}function vk(a){al(a);q[a+84>>2]=0;q[a+88>>2]=0;q[a>>2]=13980;q[a+92>>2]=0;q[a+96>>2]=0;q[a+100>>2]=0;q[a+104>>2]=0;return a}function wk(a){a=a|0;var Vg=0,Gh=0,Qh=0,Rh=0,Sh=0;q[a>>2]=14380;Vg=q[a+68>>2];if(V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_h=0,$h=0,ai=0,bi=0;_h=q[a+8>>2];Wh=q[a+4>>2];if(_h-Wh>>2>>>0>=Vh>>>0){while(1){q[Wh>>2]=1;Wh=Wh+4|0;Vh=Vh+ -1|0;if(Vh){continue}break}q[a+4>>2]=Wh;return}a:{$h=q[a>>2];ai=Wh-$h|0;bi=ai>>2;Wh=bi+Vh|0;if(Wh>>>0<1073741824){_h=_h-$h|0;Zh=_h>>1;Wh=_h>>2>>>0<536870911?Zh>>>0>>0?Wh:Zh:1073741823;Zh=0;b:{if(!Wh){break b}if(Wh>>>0>=1073741824){break a}Zh=Mm(Wh<<2)}_h=Zh+(Wh<<2)|0;Wh=Zh+(bi<<2)|0;while(1){q[Wh>>2]=1;Wh=Wh+4|0;Vh=Vh+ -1|0;if(Vh){continue}break}if((ai|0)>=1){Cn(Zh,$h,ai)}q[a>>2]=Zh;q[a+8>>2]=_h;q[a+4>>2]=Wh;if($h){An($h)}return}bn();F()}ab(14024);F()}function Bk(a,Vh){a=a|0;Vh=Vh|0;var ci=0,di=0,ei=0;jl(a,Vh);a:{if((Vh|0)<0){break a}ci=q[a+88>>2];di=q[a+84>>2];if(ci-di>>2<=(Vh|0)){break a}Vh=di+(Vh<<2)|0;di=Vh+4|0;ci=ci-di|0;ei=ci>>2;if(ci){En(Vh,di,ci)}q[a+88>>2]=Vh+(ei<<2)}}function Ck(a,Vh){var fi=0,gi=0,hi=0,ii=0,ji=0,ki=0;a:{hi=q[a>>2];ji=q[a+4>>2]-hi|0;fi=ji>>2;gi=fi+1|0;if(gi>>>0<1073741824){ki=fi<<2;fi=q[a+8>>2]-hi|0;ii=fi>>1;gi=fi>>2>>>0<536870911?ii>>>0>>0?gi:ii:1073741823;fi=0;b:{if(!gi){break b}if(gi>>>0>=1073741824){break a}fi=Mm(gi<<2)}ii=ki+fi|0;q[ii>>2]=q[Vh>>2];Vh=fi+(gi<<2)|0;gi=ii+4|0;if((ji|0)>=1){Cn(fi,hi,ji)}q[a>>2]=fi;q[a+8>>2]=Vh;q[a+4>>2]=gi;if(hi){An(hi)}return}bn();F()}ab(14092);F()}function Dk(a){q[a>>2]=0;q[a+4>>2]=0;o[a+24|0]=1;q[a+16>>2]=0;q[a+20>>2]=0;q[a+8>>2]=0;q[a+12>>2]=0;q[a+28>>2]=0;q[a+32>>2]=0;q[a+36>>2]=0;q[a+40>>2]=0;q[a+44>>2]=0;q[a+48>>2]=0;q[a+52>>2]=0;q[a+56>>2]=0;q[a+60>>2]=0;q[a+64>>2]=0;q[a+72>>2]=0;q[a+76>>2]=0;q[a+80>>2]=0;q[a+84>>2]=0;q[a+88>>2]=0;q[a+92>>2]=0;q[a+68>>2]=a}function Ek(a,Vh){var li=0,mi=0,ni=0,oi=0,pi=0,qi=0,ri=0,si=0;qi=T-16|0;T=qi;a:{b:{if(Vh){q[a+88>>2]=0;q[a+92>>2]=0;li=a+84|0;mi=q[li>>2];q[li>>2]=0;if(mi){An(mi)}q[a+76>>2]=0;q[a+80>>2]=0;li=a+72|0;mi=q[li>>2];q[li>>2]=0;if(mi){An(mi)}mi=Vh+4|0;li=q[mi>>2];ni=q[Vh>>2];o[qi+15|0]=0;bb(a,li-ni>>2,qi+15|0);ni=Vh+28|0;li=q[ni>>2];oi=q[Vh+24>>2];o[qi+14|0]=0;bb(a+12|0,li-oi>>2,qi+14|0);uk(a+28|0,q[mi>>2]-q[Vh>>2]>>2,14160);mi=q[a+52>>2];oi=q[ni>>2]-q[Vh+24>>2]|0;li=oi>>2;c:{if(q[a+60>>2]-mi>>2>>>0>=li>>>0){break c}if(li>>>0>=1073741824){break b}ri=a+56|0;pi=q[ri>>2];si=li<<2;li=Mm(oi);si=si+li|0;oi=pi-mi|0;pi=oi+li|0;if((oi|0)>=1){Cn(li,mi,oi)}q[a+52>>2]=li;q[a+60>>2]=si;q[ri>>2]=pi;if(!mi){break c}An(mi)}mi=q[a+40>>2];ni=q[ni>>2]-q[Vh+24>>2]|0;li=ni>>2;d:{if(q[a+48>>2]-mi>>2>>>0>=li>>>0){break d}if(li>>>0>=1073741824){break a}oi=a+44|0;ri=q[oi>>2];pi=li<<2;li=Mm(ni);pi=pi+li|0;ni=ri-mi|0;ri=ni+li|0;if((ni|0)>=1){Cn(li,mi,ni)}q[a+40>>2]=li;q[a+48>>2]=pi;q[oi>>2]=ri;if(!mi){break d}An(mi)}o[a+24|0]=1;q[a+64>>2]=Vh}T=qi+16|0;return}ab(14164);F()}ab(14164);F()}function Fk(a){var Vh=0,ti=0,ui=0,vi=0,wi=0,xi=0,yi=0,Ai=0,Bi=0,Ci=0,Di=0,Ei=0,Fi=0;ui=T-32|0;T=ui;xi=a+56|0;q[xi>>2]=q[a+52>>2];yi=a+44|0;q[yi>>2]=q[a+40>>2];Vh=q[a+64>>2];if(q[Vh+28>>2]!=q[Vh+24>>2]){Bi=a+40|0;Ci=a+52|0;Di=a+60|0;Ei=a+48|0;while(1){ti=q[q[Vh+24>>2]+(Ai<<2)>>2];a:{if((ti|0)==-1){break a}q[ui+24>>2]=wi;Vh=q[xi>>2];b:{if((Vh|0)!=q[Di>>2]){q[Vh>>2]=wi;q[xi>>2]=Vh+4;break b}Hk(Ci,ui+24|0)}q[ui+16>>2]=ti;q[ui+8>>2]=0;c:{if(!(q[q[a+12>>2]+(Ai>>>3&536870908)>>2]>>>(Ai&31)&1)){break c}d:{Vh=ti+1|0;Vh=(Vh>>>0)%3|0?Vh:ti+ -2|0;if(!((Vh|0)==-1|q[q[a>>2]+(Vh>>>3&536870908)>>2]>>>(Vh&31)&1)){Vh=q[q[q[a+64>>2]+12>>2]+(Vh<<2)>>2];if((Vh|0)!=-1){break d}}q[ui+8>>2]=-1;break c}vi=Vh+1|0;Vh=(vi>>>0)%3|0?vi:Vh+ -2|0;q[ui+8>>2]=Vh;if((Vh|0)==-1){break c}while(1){q[ui+16>>2]=Vh;e:{vi=Vh+1|0;ti=Vh;Vh=(vi>>>0)%3|0?vi:Vh+ -2|0;if(!((Vh|0)==-1|q[q[a>>2]+(Vh>>>3&536870908)>>2]>>>(Vh&31)&1)){Vh=q[q[q[a+64>>2]+12>>2]+(Vh<<2)>>2];if((Vh|0)!=-1){break e}}q[ui+8>>2]=-1;break c}vi=Vh+1|0;Vh=(vi>>>0)%3|0?vi:Vh+ -2|0;q[ui+8>>2]=Vh;if((Vh|0)!=-1){continue}break}}Fi=a+28|0;q[q[Fi>>2]+(ti<<2)>>2]=q[ui+24>>2];Vh=q[yi>>2];f:{if((Vh|0)!=q[Ei>>2]){q[Vh>>2]=q[ui+16>>2];q[yi>>2]=Vh+4;break f}zi(Bi,ui+16|0)}wi=wi+1|0;Vh=q[a+64>>2];g:{vi=q[ui+16>>2];if((vi|0)==-1){break g}ti=vi+((vi>>>0)%3|0?-1:2)|0;if((ti|0)==-1){break g}ti=q[q[Vh+12>>2]+(ti<<2)>>2];if((ti|0)==-1){break g}ti=ti+((ti>>>0)%3|0?-1:2)|0;q[ui+8>>2]=ti;if((ti|0)==-1|(ti|0)==(vi|0)){break a}while(1){Vh=ti+1|0;Vh=(Vh>>>0)%3|0?Vh:ti+ -2|0;h:{if(!(q[q[a>>2]+(Vh>>>3&536870908)>>2]>>>(Vh&31)&1)){break h}q[ui+24>>2]=wi;Vh=q[xi>>2];i:{if((Vh|0)!=q[Di>>2]){q[Vh>>2]=wi;q[xi>>2]=Vh+4;break i}Hk(Ci,ui+24|0)}wi=wi+1|0;Vh=q[yi>>2];if((Vh|0)!=q[Ei>>2]){q[Vh>>2]=q[ui+8>>2];q[yi>>2]=Vh+4;break h}zi(Bi,ui+8|0)}q[q[Fi>>2]+(q[ui+8>>2]<<2)>>2]=q[ui+24>>2];Vh=q[a+64>>2];ti=q[ui+8>>2];if((ti|0)==-1){break g}ti=ti+((ti>>>0)%3|0?-1:2)|0;if((ti|0)==-1){break g}ti=q[q[Vh+12>>2]+(ti<<2)>>2];if((ti|0)==-1){break g}ti=ti+((ti>>>0)%3|0?-1:2)|0;q[ui+8>>2]=ti;if((ti|0)==-1){break a}if(q[ui+16>>2]!=(ti|0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){continue}break}}kk(a,Ti);a=q[Ti>>2];if(!a){break a}q[Ti+4>>2]=a;An(a);break a}bn();F()}T=Ti+16|0}function Jk(a,zi,bj){var cj=0,dj=0,ej=0,fj=0,gj=0,hj=0,ij=0,jj=0,kj=0,lj=0,mj=0,nj=0,oj=0,pj=0,qj=0,rj=0;hj=T-16|0;T=hj;gj=w(zi,12)+a|0;ij=gj+12|0;nj=gj+8|0;q[ij>>2]=q[nj>>2];q[hj+8>>2]=(bj|0)==-1?-1:(bj>>>0)/3|0;oj=gj+16|0;pj=a+4|0;ej=bj;while(1){gj=dj;jj=(dj|0)==1;a:{b:{if(!jj){dj=q[hj+8>>2];break b}if((ej|0)==-1){ej=-1;Kk(a,-1);break a}if((ej|0)==-1|(Kk(a,((ej>>>0)%3|0?-1:2)+ej|0)|0)==-1){break a}bj=ej+1|0;cj=(bj>>>0)%3|0?bj:ej+ -2|0;if((cj|0)==-1){break a}bj=cj+1|0;bj=(bj>>>0)%3|0?bj:cj+ -2|0;if((bj|0)==-1){break a}cj=q[q[q[pj>>2]+12>>2]+(bj<<2)>>2];if((cj|0)==-1){break a}bj=cj+1|0;bj=(bj>>>0)%3|0?bj:cj+ -2|0;if((bj|0)==-1){break a}dj=(bj>>>0)/3|0;q[hj+8>>2]=dj}kj=1<<(dj&31);lj=q[a+56>>2]+(dj>>>3&536870908)|0;mj=q[lj>>2];c:{if(kj&mj){break c}fj=0;while(1){q[lj>>2]=kj|mj;cj=q[ij>>2];d:{if((cj|0)!=q[oj>>2]){q[cj>>2]=dj;q[ij>>2]=cj+4;break d}Ck(nj,hj+8|0)}cj=fj+1|0;e:{if(!fj){break e}if(cj&1){if((bj|0)==-1){bj=-1;break e}fj=bj+1|0;bj=(fj>>>0)%3|0?fj:bj+ -2|0;break e}ej=jj?bj:ej;if((bj|0)==-1){bj=-1;break e}if((bj>>>0)%3){bj=bj+ -1|0;break e}bj=bj+2|0}bj=Kk(a,bj);if((bj|0)!=-1){dj=(bj>>>0)/3|0;q[hj+8>>2]=dj;fj=cj;kj=1<<(dj&31);lj=q[a+56>>2]+(dj>>>3&268435452)|0;mj=q[lj>>2];if(!(kj&mj)){continue}}break}if(!(cj&1)|(gj|0)!=1){break c}jj=q[ij>>2]+ -4|0;dj=q[jj>>2];fj=q[a+56>>2]+(dj>>>3&536870908)|0;cj=q[fj>>2];qj=fj,rj=eo(dj)&cj,q[qj>>2]=rj;q[ij>>2]=jj}dj=1;if(!gj){continue}}break}q[((zi<<2)+a|0)+44>>2]=ej;zi=q[ij>>2];ej=q[nj>>2];if((zi|0)!=(ej|0)){fj=zi-ej>>2;cj=q[a+56>>2];bj=0;while(1){gj=q[ej+(bj<<2)>>2];zi=cj+(gj>>>3&536870908)|0;a=q[zi>>2];qj=zi,rj=eo(gj)&a,q[qj>>2]=rj;bj=bj+1|0;if(bj>>>0>>0){continue}break}}T=hj+16|0}function Kk(a,zi){var bj=0,sj=0,tj=0,uj=0,vj=0;sj=-1;uj=-1;tj=-1;a:{b:{if((zi|0)==-1){break b}vj=1;uj=q[q[q[a+4>>2]+12>>2]+(zi<<2)>>2];bj=zi+1|0;bj=(bj>>>0)%3|0?bj:zi+ -2|0;if((bj|0)>=0){tj=(bj>>>0)/3|0;tj=q[(q[q[a>>2]+96>>2]+w(tj,12)|0)+(bj-w(tj,3)<<2)>>2]}c:{if((uj|0)==-1){break c}vj=0;bj=((uj>>>0)%3|0?-1:2)+uj|0;if((bj|0)<0){break c}sj=(bj>>>0)/3|0;sj=q[(q[q[a>>2]+96>>2]+w(sj,12)|0)+(bj-w(sj,3)<<2)>>2]}bj=-1;if((sj|0)!=(tj|0)){break a}tj=-1;d:{zi=((zi>>>0)%3|0?-1:2)+zi|0;if((zi|0)>=0){sj=(zi>>>0)/3|0;sj=q[(q[q[a>>2]+96>>2]+w(sj,12)|0)+(zi-w(sj,3)<<2)>>2];if(vj){break b}break d}sj=-1;if(!vj){break d}break b}zi=uj+1|0;zi=(zi>>>0)%3|0?zi:uj+ -2|0;if((zi|0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q[Bj>>2]=wj;q[Bj+12>>2]=zi;q[xj+8>>2]=Bj;_k(Gj,xj+16|0,xj+8|0);zi=q[xj+8>>2];Dj=0;q[xj+8>>2]=0;if(!zi){break e}Hc(zi+12|0,q[zi+16>>2]);Ic(zi,q[zi+4>>2]);An(zi)}if(o[xj+27|0]<=-1){An(q[xj+16>>2])}if(Dj){break b}}if(!Bj){break b}q[xj+16>>2]=0;if(!Mk(1,xj+16|0,q[a>>2])){break b}zi=0;wj=q[xj+16>>2];if(wj){while(1){if(!Nk(a,Bj)){break b}zi=zi+1|0;if(zi>>>0>>0){continue}break}}q[xj+4>>2]=0;if(!Mk(1,xj+4|0,q[a>>2])){break b}Aj=q[xj+4>>2];if(Aj){Dj=0;while(1){zi=q[xj+36>>2];wj=q[xj+40>>2];f:{if(zi>>>0>>0){q[zi+4>>2]=0;q[zi>>2]=Bj;q[xj+36>>2]=q[xj+36>>2]+8;break f}Cj=q[xj+32>>2];Fj=zi-Cj|0;zi=Fj>>3;Ej=zi+1|0;if(Ej>>>0>=536870912){break d}zj=zi<<3;yj=wj-Cj|0;wj=yj>>2;yj=yj>>3>>>0<268435455?wj>>>0>>0?Ej:wj:536870911;zi=0;g:{if(!yj){break g}if(yj>>>0>=536870912){break c}zi=Mm(yj<<3)}wj=zj+zi|0;q[wj+4>>2]=0;q[wj>>2]=Bj;yj=zi+(yj<<3)|0;wj=wj+8|0;if((Fj|0)>=1){Cn(zi,Cj,Fj)}q[xj+40>>2]=yj;q[xj+36>>2]=wj;q[xj+32>>2]=zi;if(!Cj){break f}An(Cj)}Dj=Dj+1|0;if(Dj>>>0>>0){continue}break}}zi=q[xj+36>>2];wj=q[xj+32>>2];if((zi|0)!=(wj|0)){continue}break}a=1;break a}bn();F()}ab(14232);F()}wj=q[xj+32>>2];a=0}if(wj){q[xj+36>>2]=wj;An(wj)}T=xj+48|0;return a}function Mk(a,zi,Hj){var Ij=0,Jj=0,Kj=0,Lj=0;a:{if(a>>>0>5){break a}Kj=q[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+8>>2];if(!Lk(a,Wj)){break c}q[Xj>>2]=Wj;Qk(Vj,Xj);Wj=q[Xj>>2];q[Xj>>2]=0;if(Wj){Hc(Wj+12|0,q[Wj+16>>2]);Ic(Wj,q[Wj+4>>2]);An(Wj)}zi=zi+1|0;if(zi>>>0<_j>>>0){continue}break}}Wj=Lk(a,Vj);break a}Hc(Yj,q[Wj+16>>2]);Ic(Wj,q[Wj+4>>2]);An(Wj)}Wj=0}T=Xj+16|0;return Wj}function Pk(a,zi,Vj){var $j=0,ak=0,bk=0,ck=0,dk=0,ek=0,fk=0,gk=0,hk=0,ik=0,jk=0,kk=0;$j=T-16|0;T=$j;ck=q[a+24>>2];hk=q[a+28>>2];a:{if((ck|0)!=(hk|0)){jk=$j+8|0;kk=Vj+4|0;while(1){q[jk>>2]=0;q[$j>>2]=0;q[$j+4>>2]=0;a=Yk(q[ck>>2],zi,$j);dk=r[$j+11|0];gk=dk<<24>>24;b:{c:{d:{if(!a){a=3;break d}a=0;ak=r[Vj+11|0];bk=ak<<24>>24;fk=(gk|0)<0?q[$j+4>>2]:dk;if((fk|0)!=(((bk|0)<0?q[kk>>2]:ak)|0)){break d}ek=(bk|0)<0?q[Vj>>2]:Vj;bk=q[$j>>2];ak=(gk|0)<0;e:{if(!ak){if(!fk){break e}ak=$j;if(r[ek|0]!=(bk&255)){break d}while(1){dk=dk+ -1|0;if(!dk){break e}bk=r[ek+1|0];ek=ek+1|0;ak=ak+1|0;if((bk|0)==r[ak|0]){continue}break}break d}if(!fk){break e}if(cm(ak?bk:$j,ek,fk)){break c}}ik=q[ck>>2];a=1}if((gk|0)>-1){break b}}An(q[$j>>2])}if(a>>>0>3){break a}f:{switch(a-1|0){case 0:case 1:break a;default:break f}}ck=ck+4|0;if((hk|0)!=(ck|0)){continue}break}}ik=0}T=$j+16|0;return ik}function Qk(a,zi){var Vj=0,lk=0,mk=0;lk=q[zi>>2];if(!lk){return}Vj=a+28|0;mk=q[Vj>>2];if(mk>>>0>2]){q[zi>>2]=0;q[mk>>2]=lk;q[Vj>>2]=q[Vj>>2]+4;return}Rk(a+24|0,zi)}function Rk(a,zi){var nk=0,ok=0,pk=0,qk=0,rk=0;a:{b:{c:{pk=q[a>>2];qk=q[a+4>>2]-pk>>2;nk=qk+1|0;if(nk>>>0<1073741824){pk=q[a+8>>2]-pk|0;rk=pk>>1;nk=pk>>2>>>0<536870911?rk>>>0>>0?nk:rk:1073741823;if(nk){if(nk>>>0>=1073741824){break c}ok=Mm(nk<<2)}pk=q[zi>>2];q[zi>>2]=0;zi=(qk<<2)+ok|0;q[zi>>2]=pk;pk=(nk<<2)+ok|0;qk=zi+4|0;nk=q[a+4>>2];ok=q[a>>2];if((nk|0)==(ok|0)){break b}while(1){nk=nk+ -4|0;rk=q[nk>>2];q[nk>>2]=0;zi=zi+ -4|0;q[zi>>2]=rk;if((nk|0)!=(ok|0)){continue}break}ok=q[a+4>>2];nk=q[a>>2];break a}bn();F()}ab(14300);F()}nk=ok}q[a>>2]=zi;q[a+8>>2]=pk;q[a+4>>2]=qk;if((nk|0)!=(ok|0)){while(1){ok=ok+ -4|0;a=q[ok>>2];q[ok>>2]=0;if(a){Hc(a+12|0,q[a+16>>2]);Ic(a,q[a+4>>2]);An(a)}if((nk|0)!=(ok|0)){continue}break}}if(nk){An(nk)}}function Sk(a,zi,sk,tk){var uk=0,vk=0,wk=0,xk=0;uk=T-16|0;T=uk;xk=a;vk=ph(zi,uk+12|0,sk);sk=q[vk>>2];if(sk){zi=0}else{sk=Mm(32);Rm(sk+16|0,q[tk>>2]);q[sk+28>>2]=0;q[sk+8>>2]=q[uk+12>>2];q[sk>>2]=0;q[sk+4>>2]=0;q[vk>>2]=sk;tk=sk;wk=q[q[zi>>2]>>2];if(wk){q[zi>>2]=wk;tk=q[vk>>2]}nh(q[zi+4>>2],tk);zi=zi+8|0;q[zi>>2]=q[zi>>2]+1;zi=1}o[xk+4|0]=zi;q[a>>2]=sk;T=uk+16|0}function Tk(a,zi){var sk=0,tk=0,yk=0;sk=q[zi+4>>2];a:{if(!sk){tk=q[zi+8>>2];if(q[tk>>2]==(zi|0)){break a}yk=zi+8|0;while(1){sk=q[yk>>2];yk=sk+8|0;tk=q[sk+8>>2];if((sk|0)!=q[tk>>2]){continue}break}break a}while(1){tk=sk;sk=q[sk>>2];if(sk){continue}break}}if(q[a>>2]==(zi|0)){q[a>>2]=tk}tk=a+8|0;q[tk>>2]=q[tk>>2]+ -1;$k(q[a+4>>2],zi);a=q[zi+28>>2];if(a){q[zi+32>>2]=a;An(a)}if(o[zi+27|0]<=-1){An(q[zi+16>>2])}An(zi)}function Uk(a,zi,zk){var Ak=0,Bk=0,Ck=0,Dk=0,Ek=0;Ak=Mm(40);o[a+8|0]=0;q[a+4>>2]=zi+4;q[a>>2]=Ak;zi=zk+8|0;q[Ak+24>>2]=q[zi>>2];Bk=q[zk+4>>2];q[Ak+16>>2]=q[zk>>2];q[Ak+20>>2]=Bk;q[zk>>2]=0;q[zk+4>>2]=0;q[zi>>2]=0;q[Ak+36>>2]=0;q[Ak+28>>2]=0;q[Ak+32>>2]=0;Ck=zk+16|0;Bk=q[Ck>>2];zi=q[zk+12>>2];Dk=Bk-zi|0;if(Dk){zi=Ak+28|0;Ha(zi,Dk);Bk=q[Ck>>2];Ek=q[zi>>2];zi=q[zk+12>>2]}Cn(Ek,zi,Bk-zi|0);o[a+8|0]=1}function Vk(a,zi,zk){var Fk=0;Fk=a+4|0;a=fk(a,zi);a:{if((Fk|0)==(a|0)){break a}zi=q[a+32>>2];a=q[a+28>>2];if((zi-a|0)!=4){break a}q[zk>>2]=r[a|0]|r[a+1|0]<<8|(r[a+2|0]<<16|r[a+3|0]<<24)}}function Wk(a,zi,zk){var Gk=0,Hk=0,Ik=0,Jk=0;a:{zi=fk(a,zi);b:{if((zi|0)==(a+4|0)){break b}a=q[zi+28>>2];Gk=q[zi+32>>2];if((a|0)==(Gk|0)){break b}a=Gk-a|0;if(a&3){break b}Gk=a>>>2;Jk=zk+4|0;Hk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!=(a|0):0){break g}o[zk+12|0]=1;return}if(Sk){if(!r[Sk+12|0]){zk=zi;break k}zk=q[zi+4>>2]}o[zk+12|0]=1;o[zi+12|0]=0;a=q[zk>>2];q[zi+4>>2]=a;if(a){q[a+8>>2]=zi}q[zk+8>>2]=q[zi+8>>2];a=q[zi+8>>2];q[(q[a>>2]==(zi|0)?a:a+4|0)>>2]=zk;q[zk>>2]=zi;q[zi+8>>2]=zk;Sk=zi}a=zk;zk=q[zk+8>>2];o[a+12|0]=r[zk+12|0];o[zk+12|0]=1;o[Sk+12|0]=1;zi=q[zk>>2];a=q[zi+4>>2];q[zk>>2]=a;if(a){q[a+8>>2]=zk}q[zi+8>>2]=q[zk+8>>2];a=q[zk+8>>2];q[((zk|0)==q[a>>2]?a:a+4|0)>>2]=zi;q[zi+4>>2]=zk;q[zk+8>>2]=zi;return}zi=q[zk+8>>2];zk=q[(q[zi>>2]==(zk|0)?zi+4|0:zi)>>2];continue}}o[Vk+12|0]=1}return}if(r[zi+12|0]){break e}Sk=zk;break d}o[Sk+12|0]=1;o[zk+12|0]=0;a=q[Sk+4>>2];q[zk>>2]=a;if(a){q[a+8>>2]=zk}q[Sk+8>>2]=q[zk+8>>2];a=q[zk+8>>2];q[(q[a>>2]==(zk|0)?a:a+4|0)>>2]=Sk;q[Sk+4>>2]=zk;q[zk+8>>2]=Sk;zi=zk}zk=q[Sk+8>>2];o[Sk+12|0]=r[zk+12|0];o[zk+12|0]=1;o[zi+12|0]=1;zi=q[zk+4>>2];a=q[zi>>2];q[zk+4>>2]=a;if(a){q[a+8>>2]=zk}q[zi+8>>2]=q[zk+8>>2];a=q[zk+8>>2];q[((zk|0)==q[a>>2]?a:a+4|0)>>2]=zi;q[zi>>2]=zk;q[zk+8>>2]=zi}function al(a){q[a>>2]=14380;Dn(a+4|0,0,80);return a}function bl(a,zi){var Zk=0;Zk=-1;a:{if((zi|0)==-1|(zi|0)>4){break a}zi=w(zi,12)+a|0;a=q[zi+20>>2];if((q[zi+24>>2]-a|0)<1){break a}Zk=q[a>>2]}return Zk}function cl(a){var zi=0,_k=0;zi=q[a+20>>2];a:{if((q[a+24>>2]-zi|0)<1){break a}zi=q[zi>>2];if((zi|0)==-1){break a}_k=q[q[a+8>>2]+(zi<<2)>>2]}return _k}function dl(a,$k){var al=0,bl=0,cl=0;al=q[a+8>>2];a=q[a+12>>2];a:{if((al|0)==(a|0)){break a}cl=a-al>>2;a=0;while(1){bl=q[(a<<2)+al>>2];if(q[bl+60>>2]==($k|0)){break a}a=a+1|0;if(a>>>0>>0){continue}break}bl=0}return bl}function el(a,$k){var dl=0,el=0;dl=q[a+8>>2];a=q[a+12>>2];if((dl|0)!=(a|0)){el=a-dl>>2;a=0;while(1){if(q[q[(a<<2)+dl>>2]+60>>2]==($k|0)){return a}a=a+1|0;if(a>>>0>>0){continue}break}}return-1}function fl(a,$k){var fl=0,gl=0,hl=0,il=0,jl=0;fl=T-16|0;T=fl;gl=a+12|0;hl=q[gl>>2];il=q[a+8>>2];jl=q[$k>>2];q[$k>>2]=0;q[fl+8>>2]=jl;n[q[q[a>>2]+8>>2]](a,hl-il>>2,fl+8|0);$k=q[fl+8>>2];q[fl+8>>2]=0;if($k){Hb($k)}T=fl+16|0;return(q[gl>>2]-q[a+8>>2]>>2)+ -1|0}function gl(a,$k,kl){a=a|0;$k=$k|0;kl=kl|0;var ll=0,ml=0,nl=0,ol=0,pl=0,ql=0;ol=T-16|0;T=ol;q[ol+12>>2]=$k;pl=a+8|0;ll=q[a+12>>2];ql=q[a+8>>2];ml=ll-ql>>2;a:{if((ml|0)>($k|0)){break a}nl=$k+1|0;if(nl>>>0>ml>>>0){hl(pl,nl-ml|0);break a}if(nl>>>0>=ml>>>0){break a}ml=ql+(nl<<2)|0;if((ml|0)!=(ll|0)){while(1){ll=ll+ -4|0;nl=q[ll>>2];q[ll>>2]=0;if(nl){Hb(nl)}if((ll|0)!=(ml|0)){continue}break}}q[a+12>>2]=ml}ll=q[q[kl>>2]+56>>2];b:{if((ll|0)>4){break b}ll=w(ll,12)+a|0;ml=ll+24|0;a=q[ml>>2];if((a|0)!=q[ll+28>>2]){q[a>>2]=$k;q[ml>>2]=a+4;break b}il(ll+20|0,ol+12|0)}$k=q[kl>>2];a=q[ol+12>>2];q[$k+60>>2]=a;ll=q[pl>>2];q[kl>>2]=0;kl=ll+(a<<2)|0;a=q[kl>>2];q[kl>>2]=$k;if(a){Hb(a)}T=ol+16|0}function hl(a,$k){var kl=0,rl=0,sl=0,tl=0,ul=0,vl=0,wl=0,xl=0,yl=0;rl=q[a+8>>2];sl=a+4|0;kl=q[sl>>2];if(rl-kl>>2>>>0>=$k>>>0){a=$k<<2;xl=sl,yl=Dn(kl,0,a)+a|0,q[xl>>2]=yl;return}a:{sl=q[a>>2];tl=kl-sl>>2;ul=tl+$k|0;if(ul>>>0<1073741824){tl=tl<<2;rl=rl-sl|0;wl=rl>>1;rl=rl>>2>>>0<536870911?wl>>>0