-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添加新扩展 #273
base: main
Are you sure you want to change the base?
添加新扩展 #273
Conversation
what advantages does this extension offers over #269 ? |
It does not call the graphics card, only uses formulas for pseudo 3D rendering, making compatibility more friendly |
It also supports custom models and provides some preset models, and it can be compatible with other extensions that need to cover the stage |
webgl is supported on all modern browsers, and I realized that the extension doesn't have texture support? this makes this extension nothing more than all the 3d engines that already exist |
But all pseudo 3D engines based on the same principle do not support textures. The custom model in this extension can create textured graphics through nodes |
Its usage threshold is lower because most people do not have the ability or time to create models for their own works |
Some mobile devices have low configurations and cannot smoothly use WebGL |
this might be a good middle ground between RenderTheWorld and a custom 3d engine but i still think RenderTheWorld should be prioritize as the extension has been in review for a year now. i can teach you how to draw the 3d canvas inside Gandi's canvas if you want. Maybe having it as an option in the extension would be nice. |
Okay, I will open source this project and its internal engine code to my Github account and create an issue in that repository |
i created an issue at lazytong-tech/Cube#1, about how to draw the 3d canvas inside Gandi's canvas. |
不允许上传混淆后的代码。 |
这个代码没有经过混淆,当时使用babel进行压缩后就一直在这个状态进行开发的,是原始的版本 |
后面再进行修改也是直接在这里修改的 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is recommended not to encode the text, which may cause trouble to the reviewer. I'm working on that, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg, what are these variable names? ! Unable to read code effectively.
At the beginning of this engine, there was too much redundant code, so I compressed it using Babel. The subsequent development was built on top of this compressed version, which is the version I see now. You can choose not to read the definition of this.Cube. this.Cube is just a built-in core rendering engine, I uploaded it to https://github.com/lazytong-tech/Cube. |
You can install the remote extension (I have uploaded it at https://lt.js.org/file/Cube.js ) to test if it is usable. The custom model is not yet complete, and I will explain how to create a custom model in the documentation being written. |
This means skipping the content from line 25 to line 831 |
This is the core engine before compression, which is exactly the same as the current one except for the renderer: https://lt.js.org/file/lt3.js |
不允许上传一切混淆后的代码(允许转译器,但禁止混淆变量名)。此外,建议使用 https://github.com/FurryR/scratch-ext 进行 多文件 Gandi IDE 扩展开发,有效遵循上述限制。 |
未被重命名变量的核心部分可在https://lt.js.org/file/lt3.js 找到,是this.Cube的代码 |
这个扩展是单文件的,所有的核心部分(包括自制的VM)都在this.Cube内,调用的部分是可读的 |
核心引擎在以前进行了压缩优化,后面的开发是在优化后的基础上进行的,所以我现在也没有未经优化的最新版本 |
重构了部分代码,还原了大部分被转换的变量 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since your code has undergone variable obfuscation or other changes that cause variables to not be semantic, I can't read your code properly! I think this may not pass the review because the review team can't determine if this extension contains malicious code (although on the surface it doesn't, and I don't want to think so, it's just to be on the safe side)
The details are up to the official Gandi-IDE team, I'm just a regular community extension developer.
void (window.tempExt = { | ||
Extension: class { | ||
constructor(e) { | ||
console.log("%cLazyTong's Cube\n----------\n ▃▆█▇▄▖\n ▟◤▖ ◥█▎\n ◢◤ ▐ ▐▉\n ▗◤ ▂ ▗▖ ▕█▎\n ◤ ▗▅▖◥▄ ▀◣ █▊\n▐ ▕▎◥▖◣◤ ◢██\n█◣ ◥▅█▀ ▐██◤\n▐█▙▂ ◢██◤\n◥██◣ ◢▄◤\n ▀██▅▇▀\n----------\nVer 1.2\nhttps://lt.js.org ", 'color:green;font-weight:bolder'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should you output your extension flags in the console? To publicize your extension? This is highly discouraged. You should only use the console as a platform for outputting uncontrollable errors, and only for debugging errors caused by user usage in partially unpredictable situations.
制作了一个3D引擎扩展。扩展的文档正在同步编写。测试了一下,应该没问题