diff --git a/Game.js b/Game.js deleted file mode 100644 index a88c1e4..0000000 --- a/Game.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; - -require("core-js/modules/web.dom-collections.iterator.js"); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Game = void 0; - -var _drei = require("@react-three/drei"); - -var _fiber = require("@react-three/fiber"); - -var _postprocessing = require("@react-three/postprocessing"); - -var _react = _interopRequireWildcard(require("react")); - -var _CameraController = require("../components/CameraController"); - -var _Canary = require("../components/Canary"); - -var _Lights = require("../components/Lights"); - -var _Obstacle = require("../components/Obstacle"); - -var _Path = require("../components/Path"); - -var _config = require("../config"); - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -const Game = () => { - const playerRef = (0, _react.useRef)(); - return /*#__PURE__*/_react.default.createElement(_fiber.Canvas, { - shadows: true, - dpr: [1, 2], - camera: { - position: _config.canaryConfig.cameraPosition, - fov: 50 - }, - performance: { - min: 0.1 - } - }, /*#__PURE__*/_react.default.createElement(_CameraController.CameraController, null), /*#__PURE__*/_react.default.createElement(_Lights.Lights, { - config: _config.canaryConfig - }), /*#__PURE__*/_react.default.createElement(_Path.Path, { - ref: playerRef - }), /*#__PURE__*/_react.default.createElement(_Obstacle.Obstacle, { - ref: playerRef - }), /*#__PURE__*/_react.default.createElement(_react.Suspense, { - fallback: null - }, /*#__PURE__*/_react.default.createElement(_Canary.Canary, { - animation: "walk", - speed: "3", - scale: _config.canaryConfig.model.scale, - meshColorIndex: _config.canaryConfig.meshColorIndex, - meshScale: _config.canaryConfig.meshScale, - model: _config.canaryConfig.model, - ref: playerRef - }), /*#__PURE__*/_react.default.createElement(_postprocessing.EffectComposer, { - multisampling: 16 - }, /*#__PURE__*/_react.default.createElement(_postprocessing.Bloom, { - kernelSize: _config.canaryConfig.bloom.kernelSize, - luminanceThreshold: _config.canaryConfig.bloom.luminanceThreshold, - luminanceSmoothing: _config.canaryConfig.bloom.luminanceSmoothing, - intensity: _config.canaryConfig.bloom.intensity - }))), /*#__PURE__*/_react.default.createElement(_drei.OrbitControls, { - minPolarAngle: Math.PI / 2.8, - maxPolarAngle: Math.PI / 1.8 - })); -}; - -exports.Game = Game; \ No newline at end of file diff --git a/StartScreen.js b/StartScreen.js deleted file mode 100644 index ac6e333..0000000 --- a/StartScreen.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.StartScreen = void 0; - -require("core-js/modules/web.dom-collections.iterator.js"); - -var _drei = require("@react-three/drei"); - -var _fiber = require("@react-three/fiber"); - -var _postprocessing = require("@react-three/postprocessing"); - -var _react = _interopRequireWildcard(require("react")); - -var _reactDom = _interopRequireDefault(require("react-dom")); - -var _styledComponents = _interopRequireWildcard(require("styled-components")); - -var _Game = require("./Game"); - -var _Canary = require("../components/Canary"); - -var _Lights = require("../components/Lights"); - -var _config = require("../config"); - -var _templateObject, _templateObject2, _templateObject3, _templateObject4; - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } - -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } - -function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } - -const StartScreen = () => { - const [showStartScreen, setShowStartScreen] = (0, _react.useState)(true); - (0, _react.useEffect)(() => { - const handleKeyPress = event => { - if (event.key === 'Enter') { - setShowStartScreen(false); - } - }; - - document.addEventListener('keydown', handleKeyPress); - return () => { - document.removeEventListener('keydown', handleKeyPress); - }; - }, []); - const playerRef = (0, _react.useRef)(); - return showStartScreen ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_fiber.Canvas, { - shadows: true, - dpr: [1, 2], - camera: { - position: [3, 1, 3], - fov: 50 - }, - performance: { - min: 0.1 - } - }, /*#__PURE__*/_react.default.createElement(_Lights.Lights, { - config: _config.canaryConfig - }), /*#__PURE__*/_react.default.createElement(_react.Suspense, { - fallback: null - }, /*#__PURE__*/_react.default.createElement(_Canary.Canary, { - animation: "idle", - speed: "1", - position: [0, 0.2, 0], - scale: _config.canaryConfig.model.scale, - meshColorIndex: _config.canaryConfig.meshColorIndex, - meshScale: _config.canaryConfig.meshScale, - model: _config.canaryConfig.model, - ref: playerRef - }), /*#__PURE__*/_react.default.createElement(_postprocessing.EffectComposer, { - multisampling: 16 - }, /*#__PURE__*/_react.default.createElement(_postprocessing.Bloom, { - kernelSize: _config.canaryConfig.bloom.kernelSize, - luminanceThreshold: _config.canaryConfig.bloom.luminanceThreshold, - luminanceSmoothing: _config.canaryConfig.bloom.luminanceSmoothing, - intensity: _config.canaryConfig.bloom.intensity - }))), /*#__PURE__*/_react.default.createElement(_drei.OrbitControls, { - minPolarAngle: Math.PI / 2.8, - maxPolarAngle: Math.PI / 1.8 - })), /*#__PURE__*/_reactDom.default.createPortal( /*#__PURE__*/_react.default.createElement(OverlayContainer, null, /*#__PURE__*/_react.default.createElement(Title, null, "canary in a meme mine"), /*#__PURE__*/_react.default.createElement(Subtitle, null, "press enter to start")), document.body)) : /*#__PURE__*/_react.default.createElement(_Game.Game, null); -}; - -exports.StartScreen = StartScreen; -const blinkAnimation = (0, _styledComponents.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0; }\n"]))); - -const OverlayContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n"]))); - -const Title = _styledComponents.default.h1(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: #fff;\n text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;\n"]))); - -const Subtitle = _styledComponents.default.h2(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: #fff;\n margin-top: 100px;\n text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;\n animation: ", " 1500ms linear infinite;\n"])), blinkAnimation); \ No newline at end of file diff --git a/asset-manifest.json b/asset-manifest.json new file mode 100644 index 0000000..a55a854 --- /dev/null +++ b/asset-manifest.json @@ -0,0 +1,15 @@ +{ + "main.css": "/meme-mine/static/css/main.06c97be0.chunk.css", + "main.js": "/meme-mine/static/js/main.326eb99d.chunk.js", + "main.js.map": "/meme-mine/static/js/main.326eb99d.chunk.js.map", + "static/js/1.493cc1d8.chunk.js": "/meme-mine/static/js/1.493cc1d8.chunk.js", + "static/js/1.493cc1d8.chunk.js.map": "/meme-mine/static/js/1.493cc1d8.chunk.js.map", + "runtime~main.js": "/meme-mine/static/js/runtime~main.2437c755.js", + "runtime~main.js.map": "/meme-mine/static/js/runtime~main.2437c755.js.map", + "static/media/bidi.mjs": "/meme-mine/static/media/bidi.fd3f95b8.mjs", + "static/media/index.mjs": "/meme-mine/static/media/index.a045c5b8.mjs", + "static/css/main.06c97be0.chunk.css.map": "/meme-mine/static/css/main.06c97be0.chunk.css.map", + "index.html": "/meme-mine/index.html", + "precache-manifest.f46ab66dc22945e040b8d6e86ed88c43.js": "/meme-mine/precache-manifest.f46ab66dc22945e040b8d6e86ed88c43.js", + "service-worker.js": "/meme-mine/service-worker.js" +} \ No newline at end of file diff --git a/canary.glb b/assets/canary.glb similarity index 100% rename from canary.glb rename to assets/canary.glb diff --git a/canary.obj b/assets/canary.obj similarity index 100% rename from canary.obj rename to assets/canary.obj diff --git a/canary_hop.glb b/assets/canary_hop.glb similarity index 100% rename from canary_hop.glb rename to assets/canary_hop.glb diff --git a/canary_idle.glb b/assets/canary_idle.glb similarity index 100% rename from canary_idle.glb rename to assets/canary_idle.glb diff --git a/canary_walk.glb b/assets/canary_walk.glb similarity index 100% rename from canary_walk.glb rename to assets/canary_walk.glb diff --git a/sbf.jpeg b/assets/sbf.jpeg similarity index 100% rename from sbf.jpeg rename to assets/sbf.jpeg diff --git a/index.html b/index.html new file mode 100644 index 0000000..d3acaf8 --- /dev/null +++ b/index.html @@ -0,0 +1 @@ +