mirror of
https://github.com/troisjs/trois.git
synced 2024-11-23 20:02:32 +08:00
0.3.0
This commit is contained in:
parent
116733b68a
commit
d7fd23f4f7
10
README.md
10
README.md
@ -2,13 +2,13 @@
|
||||
[![NPM Package][npm]][npm-url]
|
||||
[![Build Size][build-size]][build-size-url]
|
||||
[![NPM Downloads][npm-downloads]][npmtrends-url]
|
||||
[![Support][support]][support-url]
|
||||
<!-- [![Discord][discord]][discord-url] -->
|
||||
<!-- [![Support][support]][support-url] -->
|
||||
[![Discord][discord]][discord-url]
|
||||
|
||||
[npm]: https://img.shields.io/npm/v/troisjs
|
||||
[npm-url]: https://www.npmjs.com/package/troisjs
|
||||
[build-size]: https://badgen.net/bundlephobia/minzip/troisjs@0.1.19
|
||||
[build-size-url]: https://bundlephobia.com/result?p=troisjs@0.1.19
|
||||
[build-size]: https://badgen.net/bundlephobia/minzip/troisjs
|
||||
[build-size-url]: https://bundlephobia.com/result?p=troisjs
|
||||
[npm-downloads]: https://img.shields.io/npm/dw/troisjs
|
||||
[npmtrends-url]: https://www.npmtrends.com/troisjs
|
||||
[discord]: https://img.shields.io/discord/828384755778846772
|
||||
@ -39,8 +39,6 @@ I wanted to code something similar to *react-three-fiber* but for VueJS.
|
||||
|
||||
I started from scratch, I will rewrite some of my [WebGL demos](https://codepen.io/collection/AGZywR) to see if this little toy can do the job.
|
||||
|
||||
Next version (*v0.3*, rewrited with Typescript) will be soon released !
|
||||
|
||||
*Trois* is a french word, it means *Three*.
|
||||
|
||||
## Usage (CDN)
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "troisjs",
|
||||
"version": "0.3.0-beta.5",
|
||||
"version": "0.3.0",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"types": "tsc",
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Renderer ref="renderer" antialias :pointer="{ resetOnEnd: true }" :orbit-ctrl="{ enableDamping: true }" resize="window">
|
||||
<Renderer ref="renderer" antialias :orbit-ctrl="{ enableDamping: true }" resize="window">
|
||||
<Camera :position="{ z: 10 }" />
|
||||
<Scene>
|
||||
<PointLight :position="{ y: 50, z: 50 }" />
|
||||
@ -18,10 +18,10 @@ export default defineComponent({
|
||||
components: { Box, Camera, LambertMaterial, PointLight, Renderer, Scene },
|
||||
mounted() {
|
||||
const renderer = this.$refs.renderer as RendererPublicInterface
|
||||
const mesh = (this.$refs.box as MeshPublicInterface).mesh
|
||||
if (renderer && mesh) {
|
||||
const box = this.$refs.box as MeshPublicInterface
|
||||
if (renderer && box) {
|
||||
renderer.onBeforeRender(() => {
|
||||
mesh.rotation.x += 0.01
|
||||
box.mesh.rotation.x += 0.01
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -16,7 +16,5 @@
|
||||
"outDir": "types",
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.vue"],
|
||||
"exclude": ["src/components/**/*.ts"],
|
||||
// "include": ["src/export.ts"],
|
||||
// "exclude": ["src/App.vue", "src/main.ts"],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user