Skip to content

Commit

Permalink
0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
klevron committed May 11, 2021
1 parent 116733b commit d7fd23f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "troisjs",
"version": "0.3.0-beta.5",
"version": "0.3.0",
"scripts": {
"dev": "vite",
"types": "tsc",
Expand Down
8 changes: 4 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -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 }" />
Expand All @@ -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
})
}
},
Expand Down
2 changes: 0 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
}

0 comments on commit d7fd23f

Please sign in to comment.