Giter Site home page Giter Site logo

rylanbot / threejs-tetris-react Goto Github PK

View Code? Open in Web Editor NEW
337.0 4.0 28.0 82 KB

3D 俄罗斯方块 | a 3D tetris game, developed by Three.js + React

Home Page: https://project.threejs-tetris-react.rylan.cn

JavaScript 1.40% HTML 1.20% TypeScript 82.51% SCSS 14.89%
3d-game threejs

threejs-tetris-react's Issues

项目运行一直失败

执行npm run dev指令后,在浏览器打开报错!求解是什么原因? node版本:v21.0.0
尝试执行过 npm install --save-dev sass 指定、删除node_modules文件夹,仍然没有成功!
错误信息如下:
Preprocessor dependency "sass" failed to load:
Cannot read properties of undefined (reading 'indexOf')
17:42:30 [vite] Internal server error: Preprocessor dependency "sass" failed to load:
Cannot read properties of undefined (reading 'pop')
Plugin: vite:css
File: /Users/UserName/Downloads/threejs-tetris-react-main/src/assets/scss/global.scss
at Object. (/Users/UserName/Downloads/threejs-tetris-react-main/node_modules/sass/sass.node.js:2:43)
at Module._compile (node:internal/modules/cjs/loader:1369:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1201:32)
at Module._load (node:internal/modules/cjs/loader:1017:12)
at Module.require (node:internal/modules/cjs/loader:1229:19)
at require (node:internal/modules/helpers:177:18)
at loadPreprocessor (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:39264:45)
at scss (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:39310:20)
at compileCSSPreprocessors (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38735:36)
at compileCSS (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38785:42)
at async TransformContext.transform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38266:56)
at async Object.transform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:44283:30)
at async loadAndTransform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:54950:29)
at async viteTransformMiddleware (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:64345:32)
at loadPreprocessor (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:39272:29)
at scss (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:39310:20)
at compileCSSPreprocessors (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38735:36)
at compileCSS (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38785:42)
at async TransformContext.transform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:38266:56)
at async Object.transform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:44283:30)
at async loadAndTransform (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:54950:29)
at async viteTransformMiddleware (file:///Users/UserName/Downloads/threejs-tetris-react-main/node_modules/vite/dist/node/chunks/dep-df561101.js:64345:32)

i use nodejs14.16.0

i use nodejs14.16.0 can install but when i run npm run dev it has error
i found same solution type it is wrang about import @react-three/fiber
i had run npm install three @types/three @react-three/fiber then it ok!

How can i disable moving position of game-board

hello there, @RylanBot
I wish you the best of luck.

Your project is fantastic.

I do not want the user to be able to move the game board to another location on the screen, and user can do this by pressing ctrl + drag/drop or right-click + move.

I want to disable the ability for the user to change the position of the board.

how can i fix this ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.