-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: fix gltf sample * fix: fix chromaKey material * fix: fix grass sample * fix: fix resize * fix: fix canvas resize change gpu attachments texture * fix: fix post sample resize bug * fix: fix csm shadow. * chore: add sample * fix: Cancel automatic resizing of rendertexture in GI * feat: add graphic ribbon * fix: Wrong offset for bloom. * perf: reduce texture sample times. * feat: fix: texture Count Exceeded the maximum limit of 7 * chore: get param from setting. * feat: add new graphic face * fix index.ts * update physics car sample * fix: Auto sort transparent renderers. (#318) --------- Co-authored-by: ShuangLiu <liu.shuang@huasheng.io> Co-authored-by: hellmor <dymmky@126.com> Co-authored-by: Codeboy-cn <zhangcanbo@outlook.com>
- Loading branch information
1 parent
5becdc4
commit 2883c18
Showing
108 changed files
with
3,027 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule public
updated
30 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { Engine3D, Scene3D, Object3D, Camera3D, View3D, UIImage, HoverCameraController, AtmosphericComponent, BitmapTexture2D, makeAloneSprite, WorldPanel, GPUCullMode, UIPanel, Color } from '@orillusion/core' | ||
|
||
class Sample_UIMultipleTextures { | ||
async run() { | ||
// initializa engine | ||
await Engine3D.init() | ||
// create new scene as root node | ||
let scene3D: Scene3D = new Scene3D() | ||
scene3D.addComponent(AtmosphericComponent) | ||
// create camera | ||
let cameraObj: Object3D = new Object3D() | ||
let camera = cameraObj.addComponent(Camera3D) | ||
// adjust camera view | ||
camera.perspective(60, Engine3D.aspect, 1, 5000.0) | ||
// set camera controller | ||
let controller = cameraObj.addComponent(HoverCameraController) | ||
controller.setCamera(15, 10, 80) | ||
// add camera node | ||
scene3D.addChild(cameraObj) | ||
let view = new View3D() | ||
view.scene = scene3D | ||
view.camera = camera | ||
Engine3D.startRenderView(view) | ||
// create panel root | ||
let panelRoot: Object3D = new Object3D() | ||
let panel: UIPanel = panelRoot.addComponent(WorldPanel) | ||
panel.cullMode = GPUCullMode.none; | ||
panelRoot.localScale.set(0.1, 0.1, 0.1) | ||
let canvas = view.enableUICanvas() | ||
canvas.addChild(panelRoot) | ||
|
||
for (let i = 0; i < 10; i++) { | ||
let bitmapTexture2D = new BitmapTexture2D() | ||
bitmapTexture2D.flipY = true | ||
await bitmapTexture2D.load('textures/digit/digit_' + i + '.png') | ||
|
||
// create image node | ||
let imageQuad = new Object3D() | ||
panelRoot.addChild(imageQuad) | ||
// create image component | ||
let image: UIImage = imageQuad.addComponent(UIImage) | ||
// set image size | ||
image.uiTransform.resize(10, 10) | ||
image.uiTransform.setXY((i - 5) * 8, 0); | ||
image.color = Color.random(); | ||
// set image source | ||
image.sprite = makeAloneSprite('webgpu' + i, bitmapTexture2D) | ||
} | ||
|
||
} | ||
} | ||
|
||
new Sample_UIMultipleTextures().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,4 +67,4 @@ | |
</script>` | ||
document.body.appendChild(iframe) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.