mirror of
https://github.com/SamEyeBam/animate.git
synced 2025-09-27 22:45:25 +00:00
larry babby and threejs for glsl
This commit is contained in:
21
webGl/my-threejs-test/node_modules/@parcel/optimizer-image/LICENSE
generated
vendored
Normal file
21
webGl/my-threejs-test/node_modules/@parcel/optimizer-image/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-present Devon Govett
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
82
webGl/my-threejs-test/node_modules/@parcel/optimizer-image/lib/ImageOptimizer.js
generated
vendored
Normal file
82
webGl/my-threejs-test/node_modules/@parcel/optimizer-image/lib/ImageOptimizer.js
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
function _path() {
|
||||
const data = _interopRequireDefault(require("path"));
|
||||
_path = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _process() {
|
||||
const data = _interopRequireDefault(require("process"));
|
||||
_process = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _plugin() {
|
||||
const data = require("@parcel/plugin");
|
||||
_plugin = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _utils() {
|
||||
const data = require("@parcel/utils");
|
||||
_utils = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _diagnostic() {
|
||||
const data = require("@parcel/diagnostic");
|
||||
_diagnostic = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _rust() {
|
||||
const data = require("@parcel/rust");
|
||||
_rust = function () {
|
||||
return data;
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
var _default = exports.default = new (_plugin().Optimizer)({
|
||||
async optimize({
|
||||
bundle,
|
||||
contents,
|
||||
logger
|
||||
}) {
|
||||
if (!bundle.env.shouldOptimize) {
|
||||
return {
|
||||
contents
|
||||
};
|
||||
}
|
||||
let buffer = await (0, _utils().blobToBuffer)(contents);
|
||||
|
||||
// Attempt to optimize it, if the optimize fails we log a warning...
|
||||
try {
|
||||
let optimized = (0, _rust().optimizeImage)(bundle.type, buffer);
|
||||
return {
|
||||
contents: optimized.length < buffer.length ? optimized : buffer
|
||||
};
|
||||
} catch (err) {
|
||||
var _bundle$getMainEntry;
|
||||
const filepath = (_bundle$getMainEntry = bundle.getMainEntry()) === null || _bundle$getMainEntry === void 0 ? void 0 : _bundle$getMainEntry.filePath;
|
||||
const filename = filepath ? _path().default.relative(_process().default.cwd(), filepath) : 'unknown';
|
||||
logger.warn({
|
||||
message: (0, _diagnostic().md)`Could not optimize image ${filename}: ${err.message}`,
|
||||
stack: err.stack
|
||||
});
|
||||
}
|
||||
return {
|
||||
contents: buffer
|
||||
};
|
||||
}
|
||||
});
|
36
webGl/my-threejs-test/node_modules/@parcel/optimizer-image/package.json
generated
vendored
Normal file
36
webGl/my-threejs-test/node_modules/@parcel/optimizer-image/package.json
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "@parcel/optimizer-image",
|
||||
"version": "2.12.0",
|
||||
"license": "MIT",
|
||||
"main": "lib/ImageOptimizer.js",
|
||||
"source": "src/ImageOptimizer.js",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/parcel"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/parcel-bundler/parcel.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12.0.0",
|
||||
"parcel": "^2.12.0"
|
||||
},
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"@parcel/diagnostic": "2.12.0",
|
||||
"@parcel/plugin": "2.12.0",
|
||||
"@parcel/rust": "2.12.0",
|
||||
"@parcel/utils": "2.12.0",
|
||||
"@parcel/workers": "2.12.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@parcel/core": "^2.12.0"
|
||||
},
|
||||
"gitHead": "2059029ee91e5f03a273b0954d3e629d7375f986"
|
||||
}
|
Reference in New Issue
Block a user