|
182 | 182 | throw new TypeError("Invalid attempt to spread non-iterable instance"); |
183 | 183 | } |
184 | 184 |
|
| 185 | + function _createSuper(Derived) { |
| 186 | + function isNativeReflectConstruct() { |
| 187 | + if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
| 188 | + if (Reflect.construct.sham) return false; |
| 189 | + if (typeof Proxy === "function") return true; |
| 190 | + |
| 191 | + try { |
| 192 | + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
| 193 | + return true; |
| 194 | + } catch (e) { |
| 195 | + return false; |
| 196 | + } |
| 197 | + } |
| 198 | + |
| 199 | + return function () { |
| 200 | + var Super = _getPrototypeOf(Derived), |
| 201 | + result; |
| 202 | + |
| 203 | + if (isNativeReflectConstruct()) { |
| 204 | + var NewTarget = _getPrototypeOf(this).constructor; |
| 205 | + |
| 206 | + result = Reflect.construct(Super, arguments, NewTarget); |
| 207 | + } else { |
| 208 | + result = Super.apply(this, arguments); |
| 209 | + } |
| 210 | + |
| 211 | + return _possibleConstructorReturn(this, result); |
| 212 | + }; |
| 213 | + } |
185 | 214 | var LensCamera = |
186 | 215 | /*#__PURE__*/ |
187 | 216 | function (_PerspectiveCamera) { |
188 | 217 | _inherits(LensCamera, _PerspectiveCamera); |
189 | 218 |
|
190 | | - function LensCamera() { |
191 | | - var _getPrototypeOf2; |
| 219 | + var _super = _createSuper(LensCamera); |
192 | 220 |
|
| 221 | + function LensCamera() { |
193 | 222 | var _this; |
194 | 223 |
|
195 | 224 | _classCallCheck(this, LensCamera); |
|
198 | 227 | args[_key] = arguments[_key]; |
199 | 228 | } |
200 | 229 |
|
201 | | - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(LensCamera)).call.apply(_getPrototypeOf2, [this].concat(args))); |
| 230 | + _this = _super.call.apply(_super, [this].concat(args)); |
202 | 231 | _this.aperture = 0.01; |
203 | 232 | return _this; |
204 | 233 | } |
|
215 | 244 | return LensCamera; |
216 | 245 | }(THREE$1.PerspectiveCamera); |
217 | 246 |
|
| 247 | + function _createSuper$1(Derived) { |
| 248 | + function isNativeReflectConstruct() { |
| 249 | + if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
| 250 | + if (Reflect.construct.sham) return false; |
| 251 | + if (typeof Proxy === "function") return true; |
| 252 | + |
| 253 | + try { |
| 254 | + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
| 255 | + return true; |
| 256 | + } catch (e) { |
| 257 | + return false; |
| 258 | + } |
| 259 | + } |
| 260 | + |
| 261 | + return function () { |
| 262 | + var Super = _getPrototypeOf(Derived), |
| 263 | + result; |
| 264 | + |
| 265 | + if (isNativeReflectConstruct()) { |
| 266 | + var NewTarget = _getPrototypeOf(this).constructor; |
| 267 | + |
| 268 | + result = Reflect.construct(Super, arguments, NewTarget); |
| 269 | + } else { |
| 270 | + result = Super.apply(this, arguments); |
| 271 | + } |
| 272 | + |
| 273 | + return _possibleConstructorReturn(this, result); |
| 274 | + }; |
| 275 | + } |
218 | 276 | var SoftDirectionalLight = |
219 | 277 | /*#__PURE__*/ |
220 | 278 | function (_DirectionalLight) { |
221 | 279 | _inherits(SoftDirectionalLight, _DirectionalLight); |
222 | 280 |
|
| 281 | + var _super = _createSuper$1(SoftDirectionalLight); |
| 282 | + |
223 | 283 | function SoftDirectionalLight(color, intensity) { |
224 | 284 | var _this; |
225 | 285 |
|
226 | 286 | var softness = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; |
227 | 287 |
|
228 | 288 | _classCallCheck(this, SoftDirectionalLight); |
229 | 289 |
|
230 | | - _this = _possibleConstructorReturn(this, _getPrototypeOf(SoftDirectionalLight).call(this, color, intensity)); |
| 290 | + _this = _super.call(this, color, intensity); |
231 | 291 | _this.softness = softness; |
232 | 292 | return _this; |
233 | 293 | } |
|
244 | 304 | return SoftDirectionalLight; |
245 | 305 | }(THREE$1.DirectionalLight); |
246 | 306 |
|
| 307 | + function _createSuper$2(Derived) { |
| 308 | + function isNativeReflectConstruct() { |
| 309 | + if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
| 310 | + if (Reflect.construct.sham) return false; |
| 311 | + if (typeof Proxy === "function") return true; |
| 312 | + |
| 313 | + try { |
| 314 | + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
| 315 | + return true; |
| 316 | + } catch (e) { |
| 317 | + return false; |
| 318 | + } |
| 319 | + } |
| 320 | + |
| 321 | + return function () { |
| 322 | + var Super = _getPrototypeOf(Derived), |
| 323 | + result; |
| 324 | + |
| 325 | + if (isNativeReflectConstruct()) { |
| 326 | + var NewTarget = _getPrototypeOf(this).constructor; |
| 327 | + |
| 328 | + result = Reflect.construct(Super, arguments, NewTarget); |
| 329 | + } else { |
| 330 | + result = Super.apply(this, arguments); |
| 331 | + } |
| 332 | + |
| 333 | + return _possibleConstructorReturn(this, result); |
| 334 | + }; |
| 335 | + } |
247 | 336 | var EnvironmentLight = |
248 | 337 | /*#__PURE__*/ |
249 | 338 | function (_Light) { |
250 | 339 | _inherits(EnvironmentLight, _Light); |
251 | 340 |
|
252 | | - function EnvironmentLight(map) { |
253 | | - var _getPrototypeOf2; |
| 341 | + var _super = _createSuper$2(EnvironmentLight); |
254 | 342 |
|
| 343 | + function EnvironmentLight(map) { |
255 | 344 | var _this; |
256 | 345 |
|
257 | 346 | _classCallCheck(this, EnvironmentLight); |
|
260 | 349 | args[_key - 1] = arguments[_key]; |
261 | 350 | } |
262 | 351 |
|
263 | | - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(EnvironmentLight)).call.apply(_getPrototypeOf2, [this].concat(args))); |
| 352 | + _this = _super.call.apply(_super, [this].concat(args)); |
264 | 353 | _this.map = map; |
265 | 354 | _this.isEnvironmentLight = true; |
266 | 355 | return _this; |
|
278 | 367 | return EnvironmentLight; |
279 | 368 | }(THREE$1.Light); |
280 | 369 |
|
| 370 | + function _createSuper$3(Derived) { |
| 371 | + function isNativeReflectConstruct() { |
| 372 | + if (typeof Reflect === "undefined" || !Reflect.construct) return false; |
| 373 | + if (Reflect.construct.sham) return false; |
| 374 | + if (typeof Proxy === "function") return true; |
| 375 | + |
| 376 | + try { |
| 377 | + Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); |
| 378 | + return true; |
| 379 | + } catch (e) { |
| 380 | + return false; |
| 381 | + } |
| 382 | + } |
| 383 | + |
| 384 | + return function () { |
| 385 | + var Super = _getPrototypeOf(Derived), |
| 386 | + result; |
| 387 | + |
| 388 | + if (isNativeReflectConstruct()) { |
| 389 | + var NewTarget = _getPrototypeOf(this).constructor; |
| 390 | + |
| 391 | + result = Reflect.construct(Super, arguments, NewTarget); |
| 392 | + } else { |
| 393 | + result = Super.apply(this, arguments); |
| 394 | + } |
| 395 | + |
| 396 | + return _possibleConstructorReturn(this, result); |
| 397 | + }; |
| 398 | + } |
281 | 399 | var RayTracingMaterial = |
282 | 400 | /*#__PURE__*/ |
283 | 401 | function (_MeshStandardMaterial) { |
284 | 402 | _inherits(RayTracingMaterial, _MeshStandardMaterial); |
285 | 403 |
|
286 | | - function RayTracingMaterial() { |
287 | | - var _getPrototypeOf2; |
| 404 | + var _super = _createSuper$3(RayTracingMaterial); |
288 | 405 |
|
| 406 | + function RayTracingMaterial() { |
289 | 407 | var _this; |
290 | 408 |
|
291 | 409 | _classCallCheck(this, RayTracingMaterial); |
|
294 | 412 | args[_key] = arguments[_key]; |
295 | 413 | } |
296 | 414 |
|
297 | | - _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(RayTracingMaterial)).call.apply(_getPrototypeOf2, [this].concat(args))); |
| 415 | + _this = _super.call.apply(_super, [this].concat(args)); |
298 | 416 | _this.solid = false; |
299 | 417 | _this.shadowCatcher = false; |
300 | 418 | return _this; |
|
555 | 673 | function upload() { |
556 | 674 | while (needsUpload.length > 0) { |
557 | 675 | var _needsUpload$pop = needsUpload.pop(), |
558 | | - type = _needsUpload$pop.type, |
559 | | - location = _needsUpload$pop.location, |
| 676 | + _type = _needsUpload$pop.type, |
| 677 | + _location = _needsUpload$pop.location, |
560 | 678 | v0 = _needsUpload$pop.v0, |
561 | 679 | v1 = _needsUpload$pop.v1, |
562 | 680 | v2 = _needsUpload$pop.v2, |
563 | 681 | v3 = _needsUpload$pop.v3; |
564 | 682 |
|
565 | | - var glMethod = typeMap[type]; |
| 683 | + var glMethod = typeMap[_type]; |
566 | 684 |
|
567 | 685 | if (v0.length) { |
568 | 686 | if (glMethod.matrix) { |
569 | 687 | var array = v0; |
570 | 688 | var transpose = v1 || false; |
571 | | - gl[glMethod.matrix](location, transpose, array); |
| 689 | + gl[glMethod.matrix](_location, transpose, array); |
572 | 690 | } else { |
573 | | - gl[glMethod.array](location, v0); |
| 691 | + gl[glMethod.array](_location, v0); |
574 | 692 | } |
575 | 693 | } else { |
576 | | - gl[glMethod.values](location, v0, v1, v2, v3); |
| 694 | + gl[glMethod.values](_location, v0, v1, v2, v3); |
577 | 695 | } |
578 | 696 | } |
579 | 697 | } |
|
610 | 728 | var vertexCompiled = vertex instanceof WebGLShader ? vertex : makeVertexShader(gl, params); |
611 | 729 | var fragmentCompiled = fragment instanceof WebGLShader ? fragment : makeFragmentShader(gl, params); |
612 | 730 | var program = createProgram(gl, vertexCompiled, fragmentCompiled); |
613 | | - return _objectSpread2({}, makeRenderPassFromProgram(gl, program), { |
| 731 | + return _objectSpread2(_objectSpread2({}, makeRenderPassFromProgram(gl, program)), {}, { |
614 | 732 | outputLocs: fragment.outputs ? getOutputLocations(fragment.outputs) : {} |
615 | 733 | }); |
616 | 734 | } |
|
0 commit comments