Gandi-IDE / custom-extension

GNU Lesser General Public License v2.1
43 stars 58 forks source link

渲染世界扩展(RenderTheWorld)的提交 #232

Closed xiaochen004hao closed 1 month ago

xiaochen004hao commented 4 months ago
# 😎 渲染世界扩展 Scratch 3D扩展.
## 前言

原项目地址:

https://github.com/xiaochen004hao/RenderTheWorld/tree/main/src

PR项目地址:

https://github.com/xiaochen004hao/custom-extension/tree/main/RenderTheWorld

在这个PR的“文件更改”中有骨骼动画与相机控制的demo!!!

``` 按照要求进行了更改 / 使用了凌提供的脚手架 ```


## 正文


## TOOD1: 设计目标!

众所周知,Scratch是全球少儿图形化编程工具(语言),其对于2d游戏简单且方便的制作功能深受广大用户的青睐。
但是,也仅此2d游戏而已,我们能否提升一个高度?编写3d游戏呢?
于是,基于这样的理想,渲染世界扩展诞生了

也许有人会问: 共创世界里不是有glsl、三扩展和高清画笔吗?这不能做3d吗?
可是,glsl对于“小孩子” ^xh 来说是在是很困难,而且也要从0开始,编写各种方法,十分繁琐。至于三扩展与高清画笔,同样得对于3d渲染有一定知识储备,并不面向“小孩子”

(对于极少数的“小天才” ^xtc 来没什么问题,但我们的社区是面向“小天才”的吗?)

最后,总结一下此扩展的设计目标:开发出让3d创作更亲民,人人都能用得起的3d渲染库

## TOOD2: 扩展积木的数量及他们的分类!

在gandi里加载此文件目录下的打包后的扩展,在积木栏自然能看见分类
截至至2024/5/25,积木总数一共有44个积木

## TOOD3: 所有扩展积木的截图!

API文档(正在完善):https://learn.ccw.site/article/aa0cf6d0-6758-447a-96f5-8e5dfdbe14d6

## TOOD4: 扩展的使用方式效果描述!

在此文件目录下有一个demo 在API文档里均有描述

## TOOD5: 我需要帮助!

【必要的】 谁能教教我有关渲染层的相关技术吗(就像TurboWarp的Simple3D一样创建一个自己的渲染层,让画笔或角色都能对其影响;或者像媒体助手一样?)。
同时,对于渲染层的返回,如何“返回”一个canvas的内容?

【挺重要的】如何创建像lpp中“函数”积木一样的“内联块(InlineBlock)”?这可以实现一种更加用户可控、积木作用明了的加载材质的方法!

# 结尾 同样重要!

若能荣幸的通过PR,请将这个扩展放在“开发中的扩展”里,因为这个扩展的积木类型可能会有“大改” 其次,求求了能不能在周六把要将的都讲完。。。^ah










xiaochen004hao commented 4 months ago

```p "请在第{27150}行查看主程序,前面的是库" ```

qxsck commented 4 months ago

docs可以用 docsURI:'https://learn.ccw.site/article/e6ba96d6-17a4-4f63-b5e1-126acbbb82d4',,在getInfo里

FurryR commented 4 months ago

错误的使用方式。请另开仓库,并在仓库中提交你的更改,然后将编译后的产物提交到 Gandi 仓库,并注上原仓库。

xiaochen004hao commented 4 months ago

错误的使用方式。请另开仓库,并在仓库中提交你的更改,然后将编译后的产物提交到 Gandi 仓库,并注上原仓库。

有点懵

xiaochen004hao commented 4 months ago

谁能讲讲怎么控制并自己绘制舞台的外观呢?

xiaochen004hao commented 4 months ago

我觉得我很难阅读lpp很大原因是因为我英语不是很好(小学水平)。。。

fath11 commented 4 months ago

i dont think i can review this extension lol. My computer cant load it at all.

xiaochen004hao commented 4 months ago

我想我不能审查这个扩展哈哈。我的电脑根本无法加载它。

额,我可能pr了一个错误的版本,5月1日的时候看看

xiaochen004hao commented 4 months ago

谁能教教我替换舞台区的绘制啊?急急急(因为这样HCN说不定就能过审了)

fath11 commented 3 months ago

at this point, i think you should just PR the old version that is not made with furryr's scaffolding 💀

xiaochen004hao commented 3 months ago
image

审核不能...

请点击文件右上角的“...”,再点击“View file” https://github.com/Gandi-IDE/custom-extension/blob/738218b4b894e5227f629b2b5c6425662a2aa51b/RenderTheWorld/RenderTheWorld.js

sylarhcn commented 3 months ago

由于你提交的代码过大,你可以在 pr 描述中,补充一下以下内容吗,或者给你的扩展加个 readme

  1. 扩展的设计目标,为了解决什么问题
  2. 扩展积木的数量及他们 分类
  3. 所有扩展积木的截图
  4. 扩展的使用方式效果描述(有视频就更好了)
xiaochen004hao commented 3 months ago

由于你提交的代码过大,你可以在 pr 描述中,补充一下以下内容吗,或者给你的扩展加个 readme

  1. 扩展的设计目标,为了解决什么问题
  2. 扩展积木的数量及他们 分类
  3. 所有扩展积木的截图
  4. 扩展的使用方式效果描述(有视频就更好了)

为什么不能在周六回复我。。。只能这周六搞了

sylarhcn commented 3 months ago

由于你提交的代码过大,你可以在 pr 描述中,补充一下以下内容吗,或者给你的扩展加个 readme

  1. 扩展的设计目标,为了解决什么问题
  2. 扩展积木的数量及他们 分类
  3. 所有扩展积木的截图
  4. 扩展的使用方式效果描述(有视频就更好了)

为什么不能在周六回复我。。。只能这周六搞了

1.因为上周六我生病了 2.因为周六是周末

xiaochen004hao commented 3 months ago

由于你提交的代码过大,你可以在 pr 描述中,补充一下以下内容吗,或者给你的扩展加个 readme

  1. 扩展的设计目标,为了解决什么问题
  2. 扩展积木的数量及他们 分类
  3. 所有扩展积木的截图
  4. 扩展的使用方式效果描述(有视频就更好了)

为什么不能在周六回复我。。。只能这周六搞了

1.因为上周六我生病了 2.因为周六是周末

(这里应该没有学生党歧视吧)这个学期我只能周六用电脑

xiaochen004hao commented 3 months ago

现在有README.md了,不过在PR描述中也能看

fath11 commented 2 months ago

you should use renderer.setAnimationLoop( () => {renderer.render(scene, camera)} ) to render the scene instead of just using renderer.render(scene, camera). this will remove the need for a special render block AND make the rendering significantly faster

an example use is as follow: image this is a function for a block to rotate a cube image

the main problem i have with this extension is how laggy it is, but using this method should remove all the lags

xiaochen004hao commented 2 months ago

你应该用 renderer.setAnimationLoop( () => {renderer.render(scene, camera)} ) 来渲染场景,而不是仅仅使用 renderer.render(scene, camera).这将消除对特殊渲染块的需要,并使渲染速度显著加快

一个示例用法如下: image 这是一个用于块旋转立方体的函数 image

我对这个扩展的主要问题是它的滞后性,但使用这个方法应该可以消除所有的滞后性

这我的确知道,不过。。。 我懂该怎么做了,不过最近可能不能提交更改(升学考试)

fath11 commented 2 months ago

这我的确知道,不过。。。 我懂该怎么做了,不过最近可能不能提交更改(升学考试)

no worries, ill make a pr to your original project and this project so you just have to merge my changes

fath11 commented 2 months ago

also i forgot to mention that this snippet of code will cause a warning if you run the init block multiple times because you reached the maximum listener count. so you need to find a way to define the listener only once in RenderTheWold's constructor image

fath11 commented 1 month ago

good news! Todo 5 will be resolved soon image

for anyone interested: https://github.com/xiaochen004hao/RenderTheWorld/pull/4