forked from Tresjs/tres
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Failed attempt at adding WebGPU renderer support
- Loading branch information
1 parent
46ec2e9
commit a475a3f
Showing
5 changed files
with
73 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script setup lang="ts"> | ||
import WebGPURenderer from 'three/examples/jsm/renderers/webgpu/WebGPURenderer'; | ||
import { extend, TresCanvas } from '@tresjs/core' | ||
import { TeapotGeometry } from 'three/examples/jsm/geometries/TeapotGeometry.js'; | ||
import { MeshBasicNodeMaterial } from 'three/examples/jsm/nodes/Nodes'; | ||
// import TheSphere from './TheSphere.vue' | ||
// import { OrbitControls } from '@tresjs/cientos' | ||
const renderer = (canvas: any) => new WebGPURenderer(); | ||
extend({ TeapotGeometry, MeshBasicNodeMaterial }); | ||
</script> | ||
|
||
<template> | ||
<TresCanvas ref="context" :custom-renderer="renderer"> | ||
<TresPerspectiveCamera :position="[0, 200, 800]" :look-at="[0, 0, 0]" :fov="45" /> | ||
<TresMesh :position="[0, 4, 0]"> | ||
<TresTeapotGeometry :args="[50, 18]" /> | ||
<TresMeshBasicNodeMaterial /> | ||
</TresMesh> | ||
<TresAmbientLight :intensity="1" /> | ||
</TresCanvas> | ||
</template> |
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