larry babby and threejs for glsl

This commit is contained in:
Sam
2024-06-24 21:24:00 +12:00
parent 87d5dc634d
commit 907ebae4c0
6474 changed files with 1279596 additions and 8 deletions

View 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.

View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _plugin() {
const data = require("@parcel/plugin");
_plugin = function () {
return data;
};
return data;
}
function _json() {
const data = _interopRequireDefault(require("json5"));
_json = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _default = exports.default = new (_plugin().Transformer)({
async transform({
asset
}) {
asset.type = 'js';
// Use JSON.parse("...") for faster script parsing, see
// https://v8.dev/blog/cost-of-javascript-2019#json.
// Apply `JSON.stringify` twice to make it a valid string literal.
asset.setCode(`module.exports = JSON.parse(${JSON.stringify(JSON.stringify(_json().default.parse(await asset.getCode())))});`);
return [asset];
}
});

View File

@@ -0,0 +1,27 @@
{
"name": "@parcel/transformer-json",
"version": "2.12.0",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"repository": {
"type": "git",
"url": "https://github.com/parcel-bundler/parcel.git"
},
"main": "lib/JSONTransformer.js",
"source": "src/JSONTransformer.js",
"engines": {
"node": ">= 12.0.0",
"parcel": "^2.12.0"
},
"dependencies": {
"@parcel/plugin": "2.12.0",
"json5": "^2.2.0"
},
"gitHead": "2059029ee91e5f03a273b0954d3e629d7375f986"
}

View File

@@ -0,0 +1,19 @@
// @flow
import {Transformer} from '@parcel/plugin';
import json5 from 'json5';
export default (new Transformer({
async transform({asset}) {
asset.type = 'js';
// Use JSON.parse("...") for faster script parsing, see
// https://v8.dev/blog/cost-of-javascript-2019#json.
// Apply `JSON.stringify` twice to make it a valid string literal.
asset.setCode(
`module.exports = JSON.parse(${JSON.stringify(
JSON.stringify(json5.parse(await asset.getCode())),
)});`,
);
return [asset];
},
}): Transformer);